dv-plugin-analyze-commits v1.0.1
Semantic Release Analyze Commits Plugin!
A semantic-release plugin to configure the logic of analyzing commits for bumping the package semver by major, minor, or patch release.
Getting Started
This is a plugin for semantic-release so you'll need to have it already installed.
npm install -D dv-plugin-analyze-commits
// or
yarn add -D dv-plugin-analyze-commitsConfigure semantic-release to use the plugin for analyzing commits in your
package.json:
{
"release": {
"analyzeCommits": "node_modules/dv-plugin-analyze-commits/src/index.js"
}
}The plugin uses this default config file to determine how to bump the semver.
Configuration
.acrc.js or .acrc.json config file
To configure the behavior yourself, create a .acrc.js file at the root of your
project and the plugin will pick it up.
// .acrc.js
module.exports = {
major: {
types: [...],
notes: [...]
},
minor: {
types: [...],
notes: [...]
},
patch: {
types: [...],
notes: [...]
}
};config from package.json
You can also add the same configuration inside your package.json as well:
// package.json
{
...
"config": {
"dvAnalyzeCommits": {
major: {
types: [...],
notes: [...]
},
minor: {
types: [...],
notes: [...]
},
patch: {
types: [...],
notes: [...]
}
}
}
...
}.acrc.js has priority over the config in package.json.
Specifying a config filepath
You can also specify a specific path for the config inside your package.json
and it'll look for it instead of .acrc.js.
// package.json
{
...
"config": {
"dvAnalyzeCommits": {
"configFilepath": 'config/dvAnalyzeCommits.js'
}
}
...
}All notes and types are case sensitive
Analyzing Commit Messages
type and note are all case sensitive based on the configuration.
Type
feat: add a new feature
Add the new featurefeat is the type.
Note
feat: add a new feature
BUMP MAJOR: Will needBUMP MAJOR is the note.
License
MIT. Copyright (c) 2017 Dexter Vu.