Gathering detailed insights and metrics for @release-it/conventional-changelog
Gathering detailed insights and metrics for @release-it/conventional-changelog
Gathering detailed insights and metrics for @release-it/conventional-changelog
Gathering detailed insights and metrics for @release-it/conventional-changelog
Conventional changelog plugin for release-it
npm install @release-it/conventional-changelog
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
128 Stars
167 Commits
38 Forks
2 Watching
2 Branches
14 Contributors
Updated on 26 Nov 2024
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-6.6%
35,037
Compared to previous day
Last week
6.6%
211,567
Compared to previous week
Last month
19.3%
828,168
Compared to previous month
Last year
71%
6,658,703
Compared to previous year
1
5
This plugin will provide the recommended bump to release-it, and update the changelog file (e.g. CHANGELOG.md
).
npm install --save-dev @release-it/conventional-changelog
In the release-it config, for example:
1"plugins": { 2 "@release-it/conventional-changelog": { 3 "preset": { 4 "name": "angular" 5 }, 6 "infile": "CHANGELOG.md" 7 } 8}
The plugin is a wrapper around conventional-changelog packages conventional-recommended-bump, conventional-changelog-core and more.
preset
preset
For preset.name
, use one of:
angular
atom
codemirror
conventionalcommits
ember
eslint
express
jquery
jscs
jshint
Use an object with name
and types
to use a custom preset:
1"plugins": { 2 "@release-it/conventional-changelog": { 3 "infile": "CHANGELOG.md", 4 "preset": { 5 "name": "conventionalcommits", 6 "types": [ 7 { 8 "type": "feat", 9 "section": "Features" 10 }, 11 { 12 "type": "fix", 13 "section": "Bug Fixes" 14 }, 15 {} 16 ] 17 } 18 } 19}
This is passed as the first argument to bumper.loadPreset
(in both bumper and changelog writer).
See the Conventional Changelog Configuration Spec (v2.1.0) for the configuration object to pass as preset
.
tagOpts
bumper.tag
tagOpts
→ look for GetSemverTagsParams
commitsOpts
bumper.commits
commitsOpts
→ look for GetCommitsParams
whatBump
bumper.bump
whatBump
→ look for Preset['whatBump']
false
to skip releasing a new version:1{ 2 "plugins": { 3 "@release-it/conventional-changelog": { 4 "whatBump": false 5 } 6 } 7}
ignoreRecommendedBump
Default value: false
Use true
to ignore the recommended bump, and use the version provided by release-it (command line argument or prompt).
Note that the changelog preview shows the recommended bump, as the desired version isn't known yet in the release-it
process. The infile
will have the correct version.
strictSemVer
Default value: false
Use true
to strictly follow semver, also in consecutive pre-releases. This means that from a pre-release, a
recommended bump will result in a next pre-release for the next version.
For example, from 1.0.0-alpha.0
a recommended bump of minor
will result in a preminor
bump to 1.1.0-alpha.0
.
The default behavior results in a prerelease
bump to 1.0.0-alpha.1
.
infile
Default value: undefined
infile
to write the changelog to. If this file does not exist yet, it's created with the full
history.infile
is not set, the changelog generated by this plugin will still be used as release notes for e.g. GitHub
Releases.infile: false
to disable the changelog writing (and only use the recommended bump for the next version).header
Set the main header for the changelog document:
1{ 2 "plugins": { 3 "@release-it/conventional-changelog": { 4 "infile": "CHANGELOG.md", 5 "header": "# Changelog", 6 "preset": { 7 "name": "conventionalcommits" 8 } 9 } 10 } 11}
context
Default value: undefined
This option will be passed as the second argument (context
) to conventional-changelog-core, for example:
1"plugins": { 2 "@release-it/conventional-changelog": { 3 "context": { 4 "linkCompare": false 5 } 6 } 7}
gitRawCommitsOpts
Default value: undefined
Options for git-raw-commits
. For example, you can use the following option to include merge commits into
changelog:
1{ 2 "plugins": { 3 "@release-it/conventional-changelog": { 4 "gitRawCommitsOpts": { 5 "merges": null 6 } 7 } 8 } 9}
parserOpts
undefined
conventional-commits-parser
bumper.parserOptions
parserOpts
→ look for ParserOptions
For example, you can use the following option to set the merge pattern during parsing the commit message:
1{ 2 "plugins": { 3 "@release-it/conventional-changelog": { 4 "parserOpts": { 5 "mergePattern": "^Merge pull request #(\\d+) from (.*)$" 6 } 7 } 8 } 9}
writerOpts
undefined
conventional-changelog-writer
writerOpts
→ look for Options
For example, you can use the following option to group the commits by 'scope' instead of 'type' by default.
1{ 2 "plugins": { 3 "@release-it/conventional-changelog": { 4 "writerOpts": { 5 "groupBy": "scope" 6 } 7 } 8 } 9}
If you want to customize the templates used to write the changelog, you can do it like in a .release-it.js
file like
so:
1const fs = require('fs'); 2 3const commitTemplate = fs.readFileSync('commit.hbs').toString(); 4 5module.exports = { 6 plugins: { 7 '@release-it/conventional-changelog': { 8 writerOpts: { 9 commitPartial: commitTemplate 10 } 11 } 12 } 13};
Options for this plugin can be set from the command line. Some examples:
release-it --plugins.@release-it/conventional-changelog.infile=history.md
release-it --no-plugins.@release-it/conventional-changelog.infile
no-
.'
) such as --'deep.key=value'
or '--deep.key=value'
Depending on your shell or OS this may differ.
When using this plugin in a GitHub Action, make sure to set fetch-depth: 0
so the history is available to
determine the correct recommended bump and changelog.
Also see https://github.com/release-it/release-it/blob/master/docs/ci.md#github-actions
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
23 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
Found 5/25 approved changesets -- score normalized to 2
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More