From 55083316fc7f4bcfbb77470a3f66e621a68ebb95 Mon Sep 17 00:00:00 2001 From: Leonid Logvinov Date: Tue, 5 Dec 2017 18:17:57 +0300 Subject: Inline function --- packages/monorepo-scripts/src/deps_versions.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'packages') 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])) { -- cgit v1.2.3