Update Lerna and fix private package issue

This commit is contained in:
Fabio Berger
2019-08-08 08:04:58 -07:00
parent 8ce390be3c
commit 9a800264a2
2 changed files with 7 additions and 8 deletions

View File

@@ -77,17 +77,16 @@ export const utils = {
},
async getLernaUpdatedPackagesAsync(shouldIncludePrivate: boolean): Promise<UpdatedPackage[]> {
try {
const result = await execAsync(`${constants.lernaExecutable} updated --json`, {
cwd: constants.monorepoRootPath,
});
const result = await execAsync(
`${constants.lernaExecutable} changed --json ${shouldIncludePrivate ? '--all' : ''}`,
{
cwd: constants.monorepoRootPath,
},
);
if (result.stdout === '') {
return [];
}
const updatedPackages = JSON.parse(result.stdout);
if (!shouldIncludePrivate) {
const updatedPublicPackages = _.filter(updatedPackages, updatedPackage => !updatedPackage.private);
return updatedPublicPackages;
}
return updatedPackages;
} catch (err) {
return [];