Repository navigation
feat: implement changesets changelog module - #83
Closed
GuillaumeRx wants to merge 1 commit into
Closed
GuillaumeRx wants to merge 1 commit into
GuillaumeRx wants to merge 1 commit into
Conversation
GuillaumeRx
force-pushed
the
gr/changesets-changelog-implementation
branch
from
October 15, 2026 10:01
536ba0a to
8d6cb8b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
The scaffolding PR added the
@metamask/changesets-changelogpackage with only the generated template files. This PR adds the actual changelog module.Changesets renders release entries through a changelog module. The default module writes
### Minor Changessections, which do not match the "Keep a Changelog" format MetaMask changelogs use. This module renders those sections instead, through the categorized changelog support in@metamask/apply-release-plan.Each changeset holds one entry: a category heading and one top-level bullet, parsed by
parseChangesetSummaryfrom@metamask/changesets-utils. The module renders one section per category, in the orderAdded,Changed,Deprecated,Removed,Fixed,Security. Sub-bullets and continuation lines stay below the entry. Entries of amajorrelease get a**BREAKING:**prefix, since onlymajorbumps are breaking. Dependency bumps render as- Bump \name` from `^old` to `^new`and go intoChanged`.Pull request links are resolved locally. The module reads the subject of the commit that added the changeset file with
git show -s --format=%s, the same approach@metamask/auto-changeloguses, and extracts the number from it. This needs no GitHub token and makes no network call. It accepts squash subjects such asAdd a feature (#1234)and merge subjects such asMerge pull request #1234 from owner/branch. Rendering fails when no number is found, so no entry is published without a link.Two things are worth calling out for reviewers:
CategorizedReleaseLinetype rather than importing it from@metamask/apply-release-plan. The loaded module should not depend on the package that loads it, and importing the type across package sources also breaks the TypeScriptrootDirof this package.greetingsplaceholder is removed. It was scaffolding, and it would otherwise fail this package's 100% coverage gate. The logic lives in named modules rather thanindex.ts, because the shared Vitest config excludes index files from coverage.Tests cover each module directly, plus an integration test that runs the real
applyReleasePlanagainst a fixture package and asserts the rendered changelog survives anauto-changeloground trip unchanged.References
apply-release-plan#25Checklist