Skip to content

Commit 8f35dae

Browse files
QuentinRoymarionebl
authored andcommitted
fix(config-lerna-scopes): fix package list get with recent lerna versions
1 parent 2f5ef25 commit 8f35dae

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
+7-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const Repository = require('lerna/lib/Repository');
2+
const PackageUtilities = require('lerna/lib/PackageUtilities');
23

34
module.exports = {
45
utils: {getPackages},
@@ -8,8 +9,12 @@ module.exports = {
89
};
910

1011
function getPackages() {
11-
const repo = new Repository(process.cwd());
12-
return repo.packages
12+
const cwd = process.cwd();
13+
const repository = new Repository(cwd);
14+
return PackageUtilities.getPackages({
15+
packageConfigs: repository.packageConfigs,
16+
rootPath: cwd
17+
})
1318
.map(pkg => pkg.name)
1419
.map(name => (name.charAt(0) === '@' ? name.split('/')[1] : name));
1520
}

0 commit comments

Comments
 (0)