Skip to content

Monorepo Toolkit

Changelog ​

The changelog command writes a dated CHANGELOG.md section from the commits since the last matching tag, grouped by Conventional Commit type. It reads local git history only; no network.

Usage ​

bash
# Preview the entry
dart run monorepo_toolkit changelog --dry-run

# Write it for a release
dart run monorepo_toolkit changelog --version 1.4.0

# One package: tags <package>-v*, commits under the path, <package>/CHANGELOG.md
dart run monorepo_toolkit changelog --package packages/auth --version 0.3.0

# Another tag scheme, and keep chore/ci/docs/test/style/build commits
dart run monorepo_toolkit changelog --tag-pattern 'app/v*' --all

Flags ​

FlagDefaultDescription
--packagenonePackage path. Scopes the commits, the default tag pattern and the CHANGELOG.md location
--tag-patternv*, or <package>-v*Glob of the tags to start from. The highest version wins
--versionUnreleasedVersion in the section heading
--allfalseAlso list chore, ci, docs, test, style and build commits
--dry-run, -dfalsePrint the entry without writing

Groups ​

Breaking changes (a ! after the type, or a BREAKING CHANGE: footer), Features (feat), Fixes (fix), Performance (perf) and Other. A commit that is not a Conventional Commit goes to Other. Merge commits are skipped. With no matching tag, the whole history is used.

Rewrites ​

The section goes on top of the file, which is created if missing. A version that already has a heading is left unchanged. Unreleased is replaced, so you can run the command again as commits land.

Also available as melos run changelog -- --version 1.4.0.