npm.io
8.1.0 • Published 1 week agoCLI

conventional-changelog

Licence
MIT
Version
8.1.0
Deps
8
Size
82 kB
Vulns
0
Weekly
0
Stars
8.5K

conventional-changelog

ESM-only package NPM version Node version Dependencies status Install size Build status Coverage status

Generate a changelog from git metadata.

Changelog?

You don't have to use the angular commit convention. For the best result of the tool to tokenize your commit and produce flexible output, it's recommended to use a commit convention.

Install

Install conventional-changelog along with the preset you want to use, for example angular:

# pnpm
pnpm add conventional-changelog conventional-changelog-angular
# yarn
yarn add conventional-changelog conventional-changelog-angular
# npm
npm i conventional-changelog conventional-changelog-angular

Usage

Pass the preset name with -p:

conventional-changelog -p angular

This will not overwrite any previous changelogs. The above generates a changelog based on commits since the last semver tag that matches the pattern of "Feature", "Fix", "Performance Improvement" or "Breaking Changes".

All available command line parameters can be listed using CLI: conventional-changelog --help.

JS API is also available:

import { ConventionalChangelog } from 'conventional-changelog'

const generator = new ConventionalChangelog()
  .readPackage()
  .loadPreset('angular')

generator
  .writeStream()
  .pipe(process.stdout)

Documentation

For comprehensive guides, CLI options, and API reference, visit the documentation website.

License

MIT

Keywords