chore(package): re-init package with commitizen and standard-release

This commit is contained in:
Pavel Pertsev
2018-05-16 12:54:46 +03:00
parent cb4e7a5643
commit eaf2328575
10640 changed files with 609660 additions and 117 deletions

View File

@@ -0,0 +1,39 @@
'use strict'
module.exports = {
whatBump: commits => {
let level = 2
let breakings = 0
let features = 0
commits.forEach(commit => {
if (!commit.type) {
return
}
if (commit.type.toLowerCase() === 'breaking') {
breakings += 1
level = 0
} else if (commit.type.toLowerCase() === 'new') {
features += 1
if (level === 2) {
level = 1
}
}
})
return {
level: level,
reason: `There are ${breakings} breaking changes and ${features} features`
}
},
parserOpts: {
headerPattern: /^(\w*): (.*)$/,
headerCorrespondence: [
'type',
'subject'
],
revertPattern: /^[rR]evert:\s([\s\S]*?)\s*This reverts commit (\w*)\./,
revertCorrespondence: ['header', 'hash']
}
}