Get a recommended version bump based on conventional commits
Got the idea from conventional-changelog/conventional-changelog#29
$ npm install --save conventional-recommended-bump
var conventionalRecommendedBump = require('conventional-recommended-bump');
conventionalRecommendedBump({
conventionalRecommendedBump({
preset: 'angular'
}, function(err, releaseAs) {
console.log(releaseAs);
//=> 'major'
});
});
$ npm install --global conventional-recommended-bump
$ conventional-recommended-bump --help
Get a recommended version bump based on conventional commits
Usage
conventional-recommended-bump
Example
conventional-recommended-bump
Options
-p, --preset Name of the preset you want to use
-h, --header-pattern Regex to match header pattern
-c, --header-correspondence Comma separated parts used to define what capturing group of headerPattern captures what
-r, --reference-actions Comma separated keywords that used to reference issues
-i, --issue-prefixes Comma separated prefixes of an issue
-n, --note-keywords Comma separated keywords for important notes
-f, --field-pattern Regex to match other fields
-v, --verbose Verbose output
Type: boolean
Default: true
If true, reverted commits will be ignored.
Type: string
Possible values: 'angular'
A set of options of a popular project.
Type: function
A function that takes parsed commits as argument and returns a number indicating what bump it should be.
####### commits
Type: array
An array of parsed commits. The commits are from last semver tag to HEAD
and is parsed by conventional-commits-parser.
If it returns 0
it will be a major
bump. If 1
, minor
bump. If 2
, patch
.
See the conventional-commits-parser docs.
Type: function
Type: string
Possible values: 'major'
, 'minor'
and 'patch'
The value of what it should release as. If it cannot decide this is an empty string.
- conventional-changelog - Generate a changelog from git metadata
MIT © Steve Mao