Skip to content
Latchkey

How to Generate Per-Package Changelogs in a Monorepo

Each package gets its own CHANGELOG.md scoped to that package changes, so a consumer never wades through unrelated entries.

Changesets writes a CHANGELOG.md per package by default. Nx enables it with projectChangelogs: true. The changelog entries come from the changeset summaries or the conventional commits that touched that package.

Steps

  • Keep changelog generation per package (the Changesets default).
  • In Nx, set changelog.projectChangelogs: true and workspaceChangelog: false.
  • Enrich Changesets entries with a GitHub changelog generator for PR links.
  • Commit the updated CHANGELOG.md files alongside the version bump.

GitHub changelog entries

.changeset/config.json
{
  "changelog": [
    "@changesets/changelog-github",
    { "repo": "acme/monorepo" }
  ]
}

Nx config

nx.json
{
  "release": {
    "changelog": {
      "workspaceChangelog": false,
      "projectChangelogs": true
    }
  }
}

Gotchas

  • The GitHub changelog generator needs a GITHUB_TOKEN to resolve PR and author links.
  • A single root changelog is fine for fixed versioning but confusing when packages release independently.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →