Skip to content

Commit

Permalink
Fix prerelease continuation type in interactive mode (fixes #588)
Browse files Browse the repository at this point in the history
  • Loading branch information
webpro committed Feb 18, 2020
1 parent 90531ab commit 0e62393
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/plugin/version/Version.js
Expand Up @@ -16,9 +16,10 @@ const t = {
};

const getIncrementChoices = context => {
const types = context.latestIsPreRelease ? t.latestIsPreRelease : context.isPreRelease ? t.preRelease : t.default;
const { latestIsPreRelease, isPreRelease, preReleaseId } = context.version;
const types = latestIsPreRelease ? t.latestIsPreRelease : isPreRelease ? t.preRelease : t.default;
const choices = types.map(increment => ({
name: `${increment} (${semver.inc(context.latestVersion, increment, context.preReleaseId)})`,
name: `${increment} (${semver.inc(context.latestVersion, increment, preReleaseId)})`,
value: increment
}));
const otherChoice = {
Expand Down

0 comments on commit 0e62393

Please sign in to comment.