Skip to content

Commit

Permalink
fix bad logic
Browse files Browse the repository at this point in the history
  • Loading branch information
telackey committed Dec 15, 2020
1 parent c9d2797 commit 7311f86
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand All @@ -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);
Expand Down

0 comments on commit 7311f86

Please sign in to comment.