@nordnet/cz-conventional-changelog v2.0.0
@nordnet/cz-conventional-changelog
conventional-changelog config for commitizen
Prerequisite
As far as its commitizen config, you should have one in the first place.
npm install --save-dev commitizen
# or
yarn add --dev commitizenInstall
npm install --save-dev @nordnet/cz-conventional-changelog
# or
yarn add --dev @nordnet/cz-conventional-changelogAdd this field into your package.json
"config": {
"commitizen": {
"path": "@nordnet/cz-conventional-changelog"
}
},Add commit script to your npm scripts in package.json:
"scripts": {
"commit": "git-cz",
// …
},Usage
npm run commit
# or
yarn commitAPI
commitizen with this config enabled will ask 6 questions.
Note:
BREAKING CHANGEwill trigger major releasefeattype will trigger minor releasefixtype will trigger patch release
{npm,yarn} run commit will generate messages like these:
fix: fix broken buttonfix(Button): fix broken onClick handlerfeat(CtaButton): add new component new Call-to-Action Button component to be used in Marketing campaignsfix: remove deprecated endpoints BREAKING CHANGE: remove previously exported endpoints (endpoint1, endpoint2)docs: document gravity Closed issues: UNIVERSE-1feat(standardModel): proof Higgs boson validate the Standard Model BREAKING CHANGE: Symmetry of the electroweak interaction Closed issues: UNIVERSE-21
Template is:
${type}{${ scope ? `(${scope})` : '' }}: ${shortDescription}
${longerDescription}
${breaking ? : `BREAKING CHANGE: ${breaking}` : ''}
${closes ? : `Closes issues: ${closes}` : ''}Type
- Required:
true - Examples:
feat,fix, etc
- build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
- ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- docs: Documentation only changes
- feat: A new feature
- fix: A bug fix
- perf: A code change that improves performance
- refactor: A code change that neither fixes a bug nor adds a feature
- style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
- test: Adding missing tests or correcting existing tests
Note:
featwill trigger minor releasefixwill trigger patch release
Scope
- Required:
false - Examples:
Button,historyDuck,l10n, etc
The scope should be the name of code entity affected. Say react component, redux duck, l10n
Short description
- Required:
true
The short description contains succinct description of the change
- use the imperative, present tense: "change" not "changed" nor "changes"
- don't capitalize first letter
- no dot (.) at the end
Longer description
- Required:
false
Just as in the short description, use the imperative, present tense: "change" not "changed" nor "changes". The body should include the motivation for the change and contrast this with previous behavior.
BREAKING CHANGE
- Required:
false - Examples:
remove previously exported endpoints (endpoint1, endpoint2)
Free text input. Will be prepended with BREAKING CHANGE: automatically.
Closes issues
- Required:
false - Examples:
UNIVERSE-1,CERN-13, CERN-29, etc
Free text input. Will be prepended with Closes issues: automatically.
License
MIT © Nordnet Bank AB