Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
conventional-changelog-cli
Advanced tools
The conventional-changelog-cli package is a command-line tool that helps automate the process of generating changelogs based on conventional commit messages. It follows the Conventional Commits specification, which is a standardized way of writing commit messages that makes it easier to create automated tools for versioning and changelog generation.
Generate Changelog
This command generates a changelog based on the Angular preset and writes it to the CHANGELOG.md file. The '-s' flag ensures that the file is saved.
npx conventional-changelog -p angular -i CHANGELOG.md -s
Generate Changelog for a Specific Release
This command generates a changelog for the last two releases based on the Angular preset and writes it to the CHANGELOG.md file.
npx conventional-changelog -p angular -i CHANGELOG.md -s -r 2
Generate Changelog for a Specific Commit Range
This command generates a changelog for commits in a specific path or range and writes it to the CHANGELOG.md file.
npx conventional-changelog -p angular -i CHANGELOG.md -s --commit-path ./path/to/commits
standard-version is a tool for versioning and changelog generation based on conventional commit messages. It automates the process of version bumping, changelog generation, and Git tagging. Compared to conventional-changelog-cli, standard-version provides a more integrated approach to version management and release automation.
semantic-release automates the whole package release workflow including determining the next version number, generating the changelog, and publishing the package. It uses the commit messages to determine the type of changes in the codebase. Compared to conventional-changelog-cli, semantic-release offers a more comprehensive solution for continuous delivery and release management.
release-it is a versatile CLI tool for automating versioning and package publishing. It supports conventional changelog generation and can be extended with plugins for additional functionality. Compared to conventional-changelog-cli, release-it provides a more flexible and extensible approach to release automation.
Generate a changelog from git metadata
$ npm install -g conventional-changelog-cli
$ cd my-project
$ conventional-changelog -p angular -i CHANGELOG.md -s
This will not overwrite any previous changelog. The above generates a changelog based on commits since the last semver tag that match the pattern of a "Feature", "Fix", "Performance Improvement" or "Breaking Changes".
If you first time use this tool and want to generate all previous changelog, you could do
$ conventional-changelog -p angular -i CHANGELOG.md -s -r 0
This will overwrite any previous changelog if exist.
All available command line parameters can be listed using CLI: conventional-changelog --help
.
Hint: You can alias your command or add it to your package.json. EG: "changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 0"
.
To fully customize the tool, please checkout conventional-changelog and conventional-changelog-core docs. You can find more details there.
package.json
conventionalChangelog
package.json
and CHANGELOG.md
filesThe reason why you should commit and tag after conventionalChangelog
is that the CHANGELOG should be included in the new release, hence gitRawCommitsOpts.from
defaults to the latest semver tag.
Please use this gist to make a release or change it to your needs.
MIT © Steve Mao
FAQs
Generate a changelog from git metadata.
The npm package conventional-changelog-cli receives a total of 129,443 weekly downloads. As such, conventional-changelog-cli popularity was classified as popular.
We found that conventional-changelog-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.