We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2f5ef25 commit 8f35daeCopy full SHA for 8f35dae
@commitlint/config-lerna-scopes/index.js
@@ -1,4 +1,5 @@
1
const Repository = require('lerna/lib/Repository');
2
+const PackageUtilities = require('lerna/lib/PackageUtilities');
3
4
module.exports = {
5
utils: {getPackages},
@@ -8,8 +9,12 @@ module.exports = {
8
9
};
10
11
function getPackages() {
- const repo = new Repository(process.cwd());
12
- return repo.packages
+ const cwd = process.cwd();
13
+ const repository = new Repository(cwd);
14
+ return PackageUtilities.getPackages({
15
+ packageConfigs: repository.packageConfigs,
16
+ rootPath: cwd
17
+ })
18
.map(pkg => pkg.name)
19
.map(name => (name.charAt(0) === '@' ? name.split('/')[1] : name));
20
}
0 commit comments