From aa11325f0ee93291b31699014fc9b90f5b1a5400 Mon Sep 17 00:00:00 2001 From: Paul Sherman Date: Wed, 24 Apr 2019 17:32:05 -0500 Subject: [PATCH] fix(version): Resolve prerelease for version without bump (#2041) --- commands/version/index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/commands/version/index.js b/commands/version/index.js index 55dee284f2..85bc7ebab0 100644 --- a/commands/version/index.js +++ b/commands/version/index.js @@ -278,10 +278,9 @@ class VersionCommand extends Command { const { bump, conventionalCommits, preid } = this.options; const repoVersion = bump ? semver.clean(bump) : ""; const increment = bump && !semver.valid(bump) ? bump : ""; - const isPrerelease = increment.startsWith("pre"); const getExistingPreId = version => (semver.prerelease(version) || []).shift(); - const resolvePrereleaseId = existingPreid => preid || (isPrerelease && existingPreid) || "alpha"; + const resolvePrereleaseId = existingPreid => preid || existingPreid || "alpha"; const makeGlobalVersionPredicate = nextVersion => { this.globalVersion = nextVersion;