Skip to content

Changelog Standards

Maintaining a changelog helps track changes between releases, improving transparency and usability for contributors and users. Follow these guidelines to ensure consistency:

  1. Changelog File:

  2. Name the file CHANGELOG.md.

  3. Use the (Keep a Changelog)[https://keepachangelog.com/en/1.0.0/?spm=5aebb161.2ef5001f.0.0.14b05171VnhK3Q] format for structure.
    • Example:
## [Unreleased]
- Added new feature X.
- Fixed issue Y.

## [1.0.1] - 2024-01-15
- Fixed bug Z.

## [1.0.0] - 2024-01-01
- Initial release.
  1. Commit Message Standards:

  2. Use structured commit messages to facilitate automatic changelog generation.

  3. Adopt the Conventional Commits specification: <type>(<scope>): <subject>.
    • Types: feat (new feature), fix (bug fix), docs (documentation), style (formatting), refactor, test, etc.
    • Example: feat(user): add login functionality.
  4. Tools for Standardization:

  5. Use Commitizen to enforce consistent commit messages.

    • Install Commitizen globally: npm install -g commitizen cz-conventional-changelog.
    • Configure your repository to use Commitizen:
// package.json
{
  "config": {
    "commitizen": {
      "path": "./node_modules/cz-conventional-changelog"
    }
  }
}

Run git cz instead of git commit to interactively create standardized commits.

  1. Automated Changelog Generation:

  2. Use tools like standard-version or conventional-changelog to automatically generate changelogs based on commit history.

    • Example with standard-version:
npm install --save-dev standard-version
npx standard-version
  1. Release Process:

  2. Update the CHANGELOG.md file during each release.

  3. Include all relevant changes grouped by type (Added, Changed, Deprecated, Removed, Fixed, Security).