push
github
1340 of 1499 branches covered (89.39%)
143 of 149 new or added lines in 6 files covered. (95.97%)
325 existing lines in 16 files now uncovered.3276 of 3662 relevant lines covered (89.46%)
49681.89 hits per line
1 |
'use strict'
|
|
2 |
|
4✔ |
3 |
function createConventionalRecommendedBumpOpts (parserOpts) { |
|
4 |
return {
|
4✔ |
5 |
parserOpts, |
4✔ |
6 |
|
4✔ |
7 |
whatBump (commits) { |
4✔ |
UNCOV
8
|
let level = 2
|
× |
UNCOV
9
|
let breakings = 0
|
× |
UNCOV
10
|
let features = 0
|
× |
UNCOV
11
|
|
× |
UNCOV
12
|
commits.forEach(commit => { |
× |
UNCOV
13
|
if (commit.notes.length > 0) { |
× |
UNCOV
14
|
breakings += commit.notes.length |
× |
UNCOV
15
|
level = 0
|
× |
UNCOV
16
|
} else if (commit.type === 'feat') { |
× |
UNCOV
17
|
features += 1
|
× |
UNCOV
18
|
if (level === 2) { |
× |
UNCOV
19
|
level = 1
|
× |
UNCOV
20
|
} |
× |
UNCOV
21
|
} |
× |
UNCOV
22
|
}) |
× |
UNCOV
23
|
|
× |
UNCOV
24
|
return {
|
× |
UNCOV
25
|
level: level,
|
× |
UNCOV
26
|
reason: `There are ${breakings} BREAKING CHANGES and ${features} features` |
× |
UNCOV
27
|
} |
× |
UNCOV
28
|
} |
× |
29 |
} |
4✔ |
30 |
} |
4✔ |
31 |
|
4✔ |
32 |
module.exports.createConventionalRecommendedBumpOpts = createConventionalRecommendedBumpOpts |
4✔ |