aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-07-24 02:46:10 +0800
committerFabio Berger <me@fabioberger.com>2018-07-24 02:46:10 +0800
commit27d44e3021ed488419aa35173a97191e124c27d0 (patch)
treec44b112338900083f5ace03468676bcfd1df6798
parentdf00d93b9c3c9167700165500ff2dcc6c5681ac2 (diff)
downloaddexon-sol-tools-27d44e3021ed488419aa35173a97191e124c27d0.tar
dexon-sol-tools-27d44e3021ed488419aa35173a97191e124c27d0.tar.gz
dexon-sol-tools-27d44e3021ed488419aa35173a97191e124c27d0.tar.bz2
dexon-sol-tools-27d44e3021ed488419aa35173a97191e124c27d0.tar.lz
dexon-sol-tools-27d44e3021ed488419aa35173a97191e124c27d0.tar.xz
dexon-sol-tools-27d44e3021ed488419aa35173a97191e124c27d0.tar.zst
dexon-sol-tools-27d44e3021ed488419aa35173a97191e124c27d0.zip
Add missing vars
-rw-r--r--packages/monorepo-scripts/src/publish.ts6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/monorepo-scripts/src/publish.ts b/packages/monorepo-scripts/src/publish.ts
index e86036d57..bd26057fb 100644
--- a/packages/monorepo-scripts/src/publish.ts
+++ b/packages/monorepo-scripts/src/publish.ts
@@ -47,9 +47,11 @@ const packageNameToWebsitePath: { [name: string]: string } = {
const updatedPrivatePackages = _.filter(allUpdatedPackages, pkg => pkg.packageJson.private);
_.each(updatedPrivatePackages, pkg => {
- const nextPatchVersionIfValid = semver.inc(pkg.packageJson.version, 'patch');
+ const currentVersion = pkg.packageJson.version;
+ const packageName = pkg.packageJson.name;
+ const nextPatchVersionIfValid = semver.inc(currentVersion, 'patch');
if (!_.isNull(nextPatchVersionIfValid)) {
- packageToNextVersion[pkg.packageJson.name] = nextPatchVersionIfValid;
+ packageToNextVersion[packageName] = nextPatchVersionIfValid;
} else {
throw new Error(`Encountered invalid semver version: ${currentVersion} for package: ${packageName}`);
}