conventional-changelog-cli
Generate a changelog from git metadata
Last updated 4 years ago by bcoe .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install conventional-changelog-cli 
SYNC missed versions from official npm registry.

conventional-changelog-cli

NPM version Build Status Dependency Status Coverage percentage

Generate a changelog from git metadata

Changelog?

Note 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.

Quick start

$ npm install -g conventional-changelog-cli
$ cd my-project
$ conventional-changelog -p angular -i CHANGELOG.md -s

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".

If this is your first time using this tool and you want to generate all previous changelogs, you could do

$ conventional-changelog -p angular -i CHANGELOG.md -s -r 0

This will overwrite any previous changelogs if they 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. Note: config here can work with preset, which is different than options.config in conventional-changelog.

Example output

Recommended workflow

  1. Make changes
  2. Commit those changes
  3. Make sure Travis turns green
  4. Bump version in package.json
  5. conventionalChangelog
  6. Commit package.json and CHANGELOG.md files
  7. Tag
  8. Push

The 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.

With npm version

Using the npm scripts to our advantage with the following hooks:

{
  "scripts": {
    "version": "conventional-changelog -p angular -i CHANGELOG.md -s && git add CHANGELOG.md"
  }
}

You could follow the following workflow

  1. Make changes
  2. Commit those changes
  3. Pull all the tags
  4. Run the npm version [patch|minor|major] command
  5. Push

You could optionally add a preversion script to package your project or running a full suit of test. And a postversion script to clean your system and push your release and tags.

By adding a .npmrc you could also automate your commit message and set your tag prefix as such:

tag-version-prefix=""
message="chore(release): %s :tada:"

Why

  • Used by AngularJS, JSHint and related projects.
  • Easy fully automate changelog generation. You could still add more points on top of it.
  • Ignoring reverted commits, templating with handlebars.js and links to references, etc. Open an issue if you want more reasonable features.
  • Intelligently setup defaults but yet fully configurable with presets of popular projects.
  • Everything internally or externally is pluggable.
  • A lot of tests and actively maintained.

Problems with github-changelog-generator or similar projects

  • Opinionated on how to write commits, issues or PRs.
  • No or partially support reference links.
  • Not system agnostic. Only support GitHub.
  • No template support. The output is mostly certain format of markdown.
  • No presets of popular commit message conventions.
  • Not modularized. Over the years modularization is proven to be the best practice.
  • No tests or coverage is too low. Program might be buggy.
  • Do not read your project's environment.
  • No or few task runner or build tool integrations.

API

Please use conventional-changelog

License

MIT © Steve Mao

Current Tags

  • 5.0.0                                ...           latest (8 months ago)
  • 2.1.1                                ...           next (4 years ago)

67 Versions

  • 5.0.0                                ...           8 months ago
  • 4.1.0                                ...           a year ago
  • 4.0.0                                ...           a year ago
  • 3.0.0                                ...           2 years ago
  • 2.2.2                                ...           3 years ago
  • 2.1.1                                ...           4 years ago
  • 2.1.0                                ...           4 years ago
  • 2.0.35                                ...           5 years ago
  • 2.0.34                                ...           5 years ago
  • 2.0.33                                ...           5 years ago
  • 2.0.32                                ...           5 years ago
  • 2.0.31                                ...           5 years ago
  • 2.0.30                                ...           5 years ago
  • 2.0.29                                ...           5 years ago
  • 2.0.28                                ...           5 years ago
  • 2.0.27                                ...           5 years ago
  • 2.0.26                                ...           5 years ago
  • 2.0.25                                ...           5 years ago
  • 2.0.23                                ...           5 years ago
  • 2.0.22                                ...           6 years ago
  • 2.0.21                                ...           6 years ago
  • 2.0.20                                ...           6 years ago
  • 2.0.19                                ...           6 years ago
  • 2.0.18                                ...           6 years ago
  • 2.0.17                                ...           6 years ago
  • 2.0.16                                ...           6 years ago
  • 2.0.15                                ...           6 years ago
  • 2.0.14                                ...           6 years ago
  • 2.0.12                                ...           6 years ago
  • 2.0.11                                ...           6 years ago
  • 2.0.10                                ...           6 years ago
  • 2.0.9                                ...           6 years ago
  • 2.0.8                                ...           6 years ago
  • 2.0.7                                ...           6 years ago
  • 2.0.5                                ...           6 years ago
  • 2.0.4                                ...           6 years ago
  • 2.0.3                                ...           6 years ago
  • 2.0.2                                ...           6 years ago
  • 2.0.1                                ...           7 years ago
  • 2.0.0                                ...           7 years ago
  • 1.3.22                                ...           7 years ago
  • 1.3.21                                ...           7 years ago
  • 1.3.20                                ...           7 years ago
  • 1.3.19                                ...           7 years ago
  • 1.3.18                                ...           7 years ago
  • 1.3.17                                ...           7 years ago
  • 1.3.16                                ...           7 years ago
  • 1.3.15                                ...           7 years ago
  • 1.3.14                                ...           7 years ago
  • 1.3.13                                ...           7 years ago
  • 1.3.12                                ...           7 years ago
  • 1.3.10                                ...           7 years ago
  • 1.3.9                                ...           7 years ago
  • 1.3.8                                ...           7 years ago
  • 1.3.5                                ...           7 years ago
  • 1.3.4                                ...           7 years ago
  • 1.3.3                                ...           7 years ago
  • 1.3.2                                ...           7 years ago
  • 1.3.1                                ...           8 years ago
  • 1.3.0                                ...           8 years ago
  • 1.2.1                                ...           8 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.1                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
  • 0.0.1                                ...           9 years ago
  • 0.0.0                                ...           10 years ago
Downloads
Total 5
Today 0
This Week 0
This Month 1
Last Day 0
Last Week 0
Last Month 0
Dependencies (5)
Dev Dependencies (0)
None
Dependents (2)

© 2010 - cnpmjs.org x YWFE | Home | YWFE