From 7311f863564557597e821ce419d6c911e1bd646d Mon Sep 17 00:00:00 2001 From: Thomas E Lackey Date: Mon, 14 Dec 2020 18:44:09 -0600 Subject: [PATCH] fix bad logic --- dist/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dist/index.js b/dist/index.js index 73699b9a..ae66af8f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -8647,7 +8647,7 @@ class ConventionalCommits { if (result && result.level !== null) { // Demote everything one level with bumpMinorOnBreaking. const level = this.bumpMinorOnBreaking ? - Math.max(result.level - 1, 2) : + Math.min(result.level + 1, 2) : result.level; result.releaseType = VERSIONS[level]; } @@ -8657,7 +8657,8 @@ class ConventionalCommits { // we have slightly different logic than the default of conventional commits, // the minor should be bumped when features are introduced for pre 1.x.x libs: if (result.reason.indexOf(' 0 features') === -1 && - result.releaseType === 'patch') { + result.releaseType === 'patch' && + !this.bumpMinorOnBreaking) { result.releaseType = 'minor'; } return resolve(result);