Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

lerna-changelog

lerna142.7kMIT2.2.0

Generate a changelog for a lerna monorepo

changelog, lerna

readme

lerna-changelog

TravisCI Build Status Latest NPM release

PR-based changelog generator with monorepo support

Usage

npx lerna-changelog
## Unreleased (2018-05-24)

#### :bug: Bug Fix
* [#198](https://github.com/my-org/my-repo/pull/198) Avoid an infinite loop ([@helpful-hacker](https://github.com/helpful-hacker))

#### :house: Internal
* [#183](https://github.com/my-org/my-repo/pull/183) Standardize error messages ([@careful-coder](https://github.com/careful-coder))

#### Commiters: 2
- Helpful Hacker ([@helpful-hacker](https://github.com/helpful-hacker))
- [@careful-coder](https://github.com/careful-coder)

By default lerna-changelog will show all pull requests that have been merged since the latest tagged commit in the repository. That is however only true for pull requests with certain labels applied. The labels that are supported by default are:

  • breaking (:boom: Breaking Change)
  • enhancement (:rocket: Enhancement)
  • bug (:bug: Bug Fix)
  • documentation (:memo: Documentation)
  • internal (:house: Internal)

You can also use the --from and --to options to view a different range of pull requests:

npx lerna-changelog --from=v1.0.0 --to=v2.0.0

Monorepo support

If you have a packages folder and your projects in subfolders of that folder lerna-changelog will detect it and include the package names in the changelog for the relevant changes.

GitHub Token

Since lerna-changelog interacts with the GitHub API you may run into rate limiting issues which can be resolved by supplying a "personal access token":

export GITHUB_AUTH="..."

You'll need a personal access token for the GitHub API with the repo scope for private repositories or just public_repo scope for public repositories.

Configuration

You can configure lerna-changelog in various ways. The easiest way is by adding a changelog key to the package.json file of your project:

{
  // ...
  "changelog": {
    "labels": {
      "feature": "New Feature",
      "bug": "Bug Fix"
    }
  }
}

The supported options are:

  • repo: Your "org/repo" on GitHub (automatically inferred from the package.json file)

  • nextVersion: Title for unreleased commits (e.g. Unreleased)

  • labels: GitHub PR labels mapped to changelog section headers

  • ignoreCommitters: List of committers to ignore (exact or partial match). Useful for example to ignore commits from bots.

  • cacheDir: Path to a GitHub API response cache to avoid throttling (e.g. .changelog)

License

lerna-changelog is released under the MIT License.

changelog

Changelog

v2.2.0 (2021-10-11)

:rocket: Enhancement

Committers: 1

v2.1.0 (2021-08-07)

:rocket: Enhancement

Committers: 1

v2.0.1 (2021-08-07)

:bug: Bug Fix

:house: Internal

Committers: 3

v2.0.0 (2021-08-07)

:boom: Breaking Change

:rocket: Enhancement

  • #492 Add dependabot-preview to default list of ignored committers (@Turbo87)

:memo: Documentation

  • #472 README: Recommend npx usage instead of global install (@Turbo87)

:house: Internal

Committers: 3

v1.0.1 (2020-03-04)

:bug: Bug Fix

  • #259 Allow ; characters in merge commit messages (@tuchk4)

:house: Internal

Committers: 2

v1.0.0 (2019-12-16)

:boom: Breaking Change

:rocket: Enhancement

:bug: Bug Fix

  • #189 Abort process when github response is not OK (@emmenko)

:house: Internal

Committers: 5

v0.8.3 (2019-11-11)

:rocket: Enhancement

:bug: Bug Fix

  • #155 Fix incorrect repo parsing for project names with . characters (@shrikanthkr)

:house: Internal

Committers: 3

v0.8.2 (2018-10-14)

:bug: Bug Fix

:house: Internal

Committers: 1

v0.8.1 (2018-10-10)

:rocket: Enhancement

:memo: Documentation

Committers: 2

v0.8.0 (2018-06-19)

:boom: Breaking Change

:rocket: Enhancement

:bug: Bug Fix

:memo: Documentation

:house: Internal

Committers: 1

v0.7.0 (2017-10-22)

:rocket: Enhancement

  • #81 Add support for nested/scoped packages. (@Turbo87)

:bug: Bug Fix

:house: Internal

  • #80 GitHubAPI class refactorings. (@Turbo87)
  • #72 Convert "cli" script to TypeScript and wrap in a run() function. (@Turbo87)

Committers: 1

v0.6.0 (2017-07-11)

  • Don't have to specify "repo" in the config
  • Have a set of default labels

:rocket: Enhancement

  • #71 configuration: Derive repo from package.json and use default labels. (@Turbo87)
  • #60 Add support for homu merge commits. (@Turbo87)

:bug: Bug Fix

  • #70 configuration-error: Add missing "message" property. (@Turbo87)
  • #64 progressBar: Split tick() into setTitle() and tick(). (@Turbo87)

:house: Internal

Committers: 1

v0.5.0 (2017-05-31)

  • Make lerna-changelog work better for a regular repo (including this one)

:rocket: Enhancement

  • #51 Use async/await to request commit infos concurrently. (@Turbo87)

:bug: Bug Fix

  • #53 Skip package heading for single package repos. (@Turbo87)

:house: Internal

  • #49 Exclude arrow functions, classes and generator functions from being transpiled. (@Turbo87)
  • #50 Update "jest" to v20.0.4. (@Turbo87)
  • #48 Adjust "lint" script. (@Turbo87)
  • #47 Move configuration from "lerna.json" into "package.json". (@Turbo87)

Committers: 1

v0.4.0 (2017-03-24)

Notable changes:

  • We dropped Node 0.10/0.12
  • Adds support for the "changelog" config key from "package.json" instead of from "lerna.json"
  • Removes "lerna" peerDep

Basically removes ties to lerna so can be used standalone.

:boom: Breaking Change

  • Other
    • #37 Babel: Use "preset-env" instead of "preset-es2015". (@Turbo87)

:rocket: Enhancement

  • Other
    • #42 Read "changelog" config key from "package.json" too. (@Turbo87)

:house: Internal

Committers: 1

v0.3.0 (2017-01-29)

:rocket: Enhancement

  • #31 New CLI options, custom tags range and tests.. (@emmenko)

:house: Internal

Committers: 2

v0.2.3 (2016-11-27)

:bug: Bug Fix

  • Other
    • #28 Convert label name to lowercase before matching. (@fson)

Committers: 1

  • Ville Immonen (fson)

v0.2.2 (2016-10-24)

:bug: Bug Fix

  • #27 match other closes keywords for github - Closes #7. (@hzoo)

Committers: 1

v0.2.1 (2016-07-29)

:bug: Bug Fix

  • #24 If there is no name, just print the username. (@hzoo)

Committers: 1

v0.2.0 (2016-06-17)

:rocket: Enhancement

  • #18 Consolidate changes by affected packages. (@gigabo)

:bug: Bug Fix

  • #13 Remove the --first-parent option from log list generation. (@gigabo)
  • #20 Nicer error message on missing config. (@gigabo)
  • #14 Update repository URLs in package.json. (@gigabo)

Committers: 1