aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts/src/utils/utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/monorepo-scripts/src/utils/utils.ts')
-rw-r--r--packages/monorepo-scripts/src/utils/utils.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/monorepo-scripts/src/utils/utils.ts b/packages/monorepo-scripts/src/utils/utils.ts
index 2ce36942c..5e2e877c7 100644
--- a/packages/monorepo-scripts/src/utils/utils.ts
+++ b/packages/monorepo-scripts/src/utils/utils.ts
@@ -54,6 +54,13 @@ export const utils = {
}
return packages;
},
+ async getPackagesByNameAsync(packageNames: string[]): Promise<Package[]> {
+ const allPackages = utils.getPackages(constants.monorepoRootPath);
+ const updatedPackages = _.filter(allPackages, pkg => {
+ return _.includes(packageNames, pkg.packageJson.name);
+ });
+ return updatedPackages;
+ },
async getUpdatedPackagesAsync(shouldIncludePrivate: boolean): Promise<Package[]> {
const updatedPublicPackages = await utils.getLernaUpdatedPackagesAsync(shouldIncludePrivate);
const updatedPackageNames = _.map(updatedPublicPackages, pkg => pkg.name);