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.tag) return |
× |
UNCOV
14
|
|
× |
UNCOV
15
|
if (commit.tag.toLowerCase() === 'breaking') { |
× |
UNCOV
16
|
breakings += 1
|
× |
UNCOV
17
|
level = 0
|
× |
UNCOV
18
|
} else if (commit.tag.toLowerCase() === 'new') { |
× |
UNCOV
19
|
features += 1
|
× |
UNCOV
20
|
if (level === 2) { |
× |
UNCOV
21
|
level = 1
|
× |
UNCOV
22
|
} |
× |
UNCOV
23
|
} |
× |
UNCOV
24
|
}) |
× |
UNCOV
25
|
|
× |
UNCOV
26
|
return {
|
× |
UNCOV
27
|
level: level,
|
× |
UNCOV
28
|
reason: `There are ${breakings} breaking changes and ${features} features` |
× |
UNCOV
29
|
} |
× |
UNCOV
30
|
} |
× |
31 |
} |
4✔ |
32 |
} |
4✔ |
33 |
|
4✔ |
34 |
module.exports.createConventionalRecommendedBumpOpts = createConventionalRecommendedBumpOpts |
4✔ |