aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/monorepo-scripts/src/deps_versions.ts7
1 files changed, 1 insertions, 6 deletions
diff --git a/packages/monorepo-scripts/src/deps_versions.ts b/packages/monorepo-scripts/src/deps_versions.ts
index c4ee90775..84b024427 100644
--- a/packages/monorepo-scripts/src/deps_versions.ts
+++ b/packages/monorepo-scripts/src/deps_versions.ts
@@ -31,15 +31,10 @@ function getDependencies(path: string): Dependencies {
return dependencies;
}
-function getPackageName(path: string): string {
- const [dotDot, packageName, packageJSON] = path.split('/');
- return packageName;
-}
-
const files = globSync(PACKAGE_JSON_GLOB);
const versionsByDependency: VersionsByDependency = {};
files.map(path => {
- const packageName = getPackageName(path);
+ const [_1, packageName, _2] = path.split('/');
const dependencies = getDependencies(path);
_.map(dependencies, (version: string, depName: string) => {
if (_.isUndefined(versionsByDependency[depName])) {