Keep a Changelog tooling for linting and automatically releasing changelogs
- Node 8+
- package.json contains a valid git repository URL
npm i -D @brightcove/kacl
You can also install globally to easily initialize changelogs in your projects:
npm i -g @brightcove/kacl
If installed globally, you can run the
kacl command. If not, you can run it from your project's node_modules folder:
Usage: kacl init|lint|prerelease|release init - Initializes a new CHANGELOG.md lint - Lints your changelog for errors prerelease - Checks the requirements for creating a new release (should be added to the "preversion" script) release - Creates a new release matching your package.json version (should be added to the "version" script)
Usage in package.json
kacl is most effective when added to package.json scripts as it can be used to completely automate changelog changes when running
npm version. The following is a recommendation for setting up package.json scripts to use kacl.
This setup does the following:
- Lints your changelog after running tests
- Checks the changelog before bumping the version with
npm versionto ensure there is an unreleased entry
- Updates the changelog and adds it to git after the version has been bumped with
npm version. The changelog changes will automatically be committed as part of
gh-release is a tool which will automatically create a tag and release on GitHub. It pairs nicely with kacl, and with both tools you can completely automate your version bumping. The following is a recommendation for setting up package.json scripts to use kacl with gh-release.
This performs the same steps as what's laid out in the Usage in package.json section, with the addition of the following:
- Pushes the new version to GitHub and creates a GitHub release using the updated changelog.
- Status: Active
- Type: Utility
- Versioning: Semantic Versioning
- Ted Janeczko - @tjaneczko
Contributions are welcome, please see the contributing guidelines.
Issues and Questions
This project uses github issues, please file issues and questions here.
Attributions and Thanks
This project uses the keep-a-changelog library from Oscar Otero for parsing and manipulating changelogs. It's an awesome library which you should definitely check out if you're interested in helping improve project changelogs.