From c9d2797b0af2c26f9535d938846f47216c47a144 Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 14 Dec 2020 18:37:22 -0600 Subject: [PATCH] redo --- dist/index.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index f7e26968..73699b9a 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8637,7 +8637,7 @@ class ConventionalCommits { } async guessReleaseType(preMajor) { const VERSIONS = ['major', 'minor', 'patch']; - const preset = await presetFactory({ preMajor: preMajor || this.bumpMinorOnBreaking }); + const preset = await presetFactory({ preMajor }); return new Promise((resolve, reject) => { const stream = this.commitsReadable() .pipe(conventionalCommitsParser(preset.parserOpts)) @@ -8645,7 +8645,11 @@ class ConventionalCommits { const commits = conventionalCommitsFilter(data); let result = preset.recommendedBumpOpts.whatBump(commits, preset.recommendedBumpOpts); if (result && result.level !== null) { - result.releaseType = VERSIONS[result.level]; + // Demote everything one level with bumpMinorOnBreaking. + const level = this.bumpMinorOnBreaking ? + Math.max(result.level - 1, 2) : + result.level; + result.releaseType = VERSIONS[level]; } else if (result === null) { result = {};