aboutsummaryrefslogtreecommitdiffstats
path: root/packages/monorepo-scripts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2017-12-05 23:17:57 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2017-12-06 20:48:30 +0800
commit55083316fc7f4bcfbb77470a3f66e621a68ebb95 (patch)
treedaf5600c48e1e453ebbe1da5a618007bfdfd12f4 /packages/monorepo-scripts
parent8c87394b2b0cea4c3fc6126c9b22830041fff889 (diff)
downloaddexon-sol-tools-55083316fc7f4bcfbb77470a3f66e621a68ebb95.tar
dexon-sol-tools-55083316fc7f4bcfbb77470a3f66e621a68ebb95.tar.gz
dexon-sol-tools-55083316fc7f4bcfbb77470a3f66e621a68ebb95.tar.bz2
dexon-sol-tools-55083316fc7f4bcfbb77470a3f66e621a68ebb95.tar.lz
dexon-sol-tools-55083316fc7f4bcfbb77470a3f66e621a68ebb95.tar.xz
dexon-sol-tools-55083316fc7f4bcfbb77470a3f66e621a68ebb95.tar.zst
dexon-sol-tools-55083316fc7f4bcfbb77470a3f66e621a68ebb95.zip
Inline function
Diffstat (limited to 'packages/monorepo-scripts')
-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])) {