Skip to content

build: generate CHANGELOG.md from conventional commits - #66

Merged
camcima merged 1 commit into
mainfrom
feat/conventional-changelog
Aug 19, 2026
Merged

build: generate CHANGELOG.md from conventional commits#66
camcima merged 1 commit into
mainfrom
feat/conventional-changelog

Conversation

@camcima

@camcima camcima commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Adds @release-it/conventional-changelog so every release updates a maintained CHANGELOG.md, instead of the history living only in GitHub release notes.

Follow-up to the v4.2.0 release.

What's here

  • CHANGELOG.md, backfilled to v1.0.0. The plugin creates the file with full history on first release, but generating it now means the changelog exists today rather than after the next release.
  • Plugin config in .release-it.json with explicitly declared preset types, so the output is deliberate rather than preset defaults: feat / fix / perf / revert get sections, docs and refactor appear without implying a bump (effect: "changelog"), and chore / ci / build / style / test are hidden.
  • A "Releasing" section in CONTRIBUTING.md — the command, what it runs, the GITHUB_TOKEN requirement, and the --dry-run preview.
  • CHANGELOG.md ships in the npm tarball (added to files), so it renders on the package page. Verified via npm pack --dry-run.

The version stays a manual decision

I set ignoreRecommendedBump: true, so pnpm release <version> still takes an explicit version rather than inferring one from commit types.

The v4.2.0 release is exactly why. Its one substantive commit was typed fix:, but it also added LockCanNotBeReleasedError, AmbiguousTransitionCandidate, and the Factory options template — so an inferred bump would have produced 4.1.1, when the correct answer was 4.2.0. Automatic versioning is only as good as commit-type discipline, and the semver call is worth keeping with a human. Flip the flag to false later if you'd rather have it inferred.

The same root cause produced one artifact worth flagging: the generated v4.2.0 entry was a single "Bug Fixes" line, with two malformed links (closes [53-#57](.../53-/issues/57)) parsed out of the #53-#57 ranges in the squash-commit body. I corrected that entry by hand to list the features and fixes accurately. The plugin only ever prepends new sections, so hand-corrected history is safe — noted in CONTRIBUTING.

Note on the lockfile diff

pnpm-lock.yaml is larger than the plugin alone accounts for: node_modules had release-it 20.2.1 installed while package.json has declared ^21.0.2 since #49 merged, so pnpm install also picked up that pending upgrade. Worth knowing that the v4.2.0 release was cut with 20.2.1.

Verification

pnpm lint clean · pnpm test 389/389 · pnpm format:check clean · npx release-it --dry-run resolves the plugin, computes the compare link, and reports "Writing changelog to CHANGELOG.md".

🤖 Generated with Claude Code

https://claude.ai/code/session_01JLxceiNFfXfpGoxdfQEZqw

Adds @release-it/conventional-changelog so each release updates a
maintained CHANGELOG.md instead of leaving the history only in GitHub
release notes. Backfills the file with the full history back to v1.0.0.

The version stays an explicit argument to `pnpm release`
(ignoreRecommendedBump), so the semver call remains the maintainer's:
the v4.2.0 release is the case in point — its one substantive commit was
typed `fix:` but added public API, so an inferred bump would have been
4.1.1 rather than the correct 4.2.0.

Preset types are declared explicitly: feat, fix, perf and revert are
released sections; docs and refactor appear without implying a bump; and
chore, ci, build, style and test are hidden.

Also corrects the generated v4.2.0 entry, which the parser reduced to a
single "Bug Fixes" line with two malformed issue links (the squash body's
"#53-#57" ranges), and ships CHANGELOG.md in the npm tarball.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JLxceiNFfXfpGoxdfQEZqw
Copilot AI lite review requested due to automatic review settings August 19, 2026 11:13

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Aug 19, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (ff9c708) to head (281af2d).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #66   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           62        62           
  Lines         1870      1870           
  Branches       277       277           
=========================================
  Hits          1870      1870           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@camcima
camcima merged commit 127ba18 into main Aug 19, 2026
8 checks passed
@camcima
camcima deleted the feat/conventional-changelog branch August 19, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants