github
1144 of 1192 branches covered (95.97%)
926 of 1058 new or added lines in 50 files covered. (87.52%)
7 existing lines in 2 files now uncovered.5299 of 5536 relevant lines covered (95.72%)
39706.05 hits per line
|
'use strict'
|
|
|
|
4✔ |
|
function createConventionalRecommendedBumpOpts (parserOpts) { |
|
|
return {
|
4✔ |
|
parserOpts, |
4✔ |
|
|
4✔ |
|
whatBump (commits) { |
4✔ |
NEW
|
let level = 2
|
× |
NEW
|
let breakings = 0
|
× |
NEW
|
let features = 0
|
× |
NEW
|
|
× |
NEW
|
commits.forEach(commit => { |
× |
NEW
|
if (commit.notes.length > 0) { |
× |
NEW
|
breakings += commit.notes.length |
× |
NEW
|
level = 0
|
× |
NEW
|
} else if (commit.type === 'feat') { |
× |
NEW
|
features += 1
|
× |
NEW
|
if (level === 2) { |
× |
NEW
|
level = 1
|
× |
NEW
|
} |
× |
NEW
|
} |
× |
NEW
|
}) |
× |
NEW
|
|
× |
NEW
|
return {
|
× |
NEW
|
level: level,
|
× |
NEW
|
reason: `There are ${breakings} BREAKING CHANGES and ${features} features` |
× |
NEW
|
} |
× |
NEW
|
} |
× |
|
} |
4✔ |
|
} |
4✔ |
|
|
4✔ |
|
module.exports.createConventionalRecommendedBumpOpts = createConventionalRecommendedBumpOpts |
4✔ |