Repository navigation
Simplify the changelog scripts - #5959
Merged
Merged
Conversation
added 4 commits
October 22, 2026 10:58
- Merge fragment.mjs and consume.mjs into changelog.mjs, with one parser and one renderer of sections for the [Unreleased] section, the pull request preview, and releases - Release through consume(), the same write path as publish, and drop the consume.mjs command - check.mjs prints the preview or the error for the job summary and takes the labels as --labels, which removes the shell logic of the workflow step; publish.mjs drops --branch and --remote - Keep keep-a-changelog as the read-only check of the entries written: its stringify reformats CHANGELOG.md
…once - release refuses an empty [Unreleased] with its own parser, the entry count was the only use of keep-a-changelog - publish workflow no longer installs npm packages - mergeSections() as a plain loop, --labels in the README
Changelog tools do not like unknown sections, keep-a-changelog rejected them before. Released sections are history and not checked. The error names the heading and its line, the PR check, publish, and release all refuse it.
3 of 11 tasks
Eugene (OEvgeny)
marked this pull request as ready for review
October 22, 2026 18:34
Eugene (OEvgeny)
requested review from
William Wong (compulim),
Chris Whitten (cwhitten) and
TJ Durnford (tdurnford)
as code owners
October 22, 2026 18:34
William Wong (compulim)
approved these changes
Oct 22, 2026
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.
Changelog Entry
Changed
Description
The scripts now share one module,
changelog.mjs, with one parser and one renderer for[Unreleased], the preview, and releases (623 → 547 code lines, 13 → 9 options), using Node.js built-ins only. Output is unchanged: samechangelog-unreleasedcommit for the currentmain, same release, same check summaries.Design
CHANGELOG.md(blank lines, 3-space nested bullets), and a count of entries was its only remaining use.consume(), like publishing, soconsume.mjsis no longer a command.Specific Changes
changelog.mjs: mergesfragment.mjsandconsume.mjs; includesreleaseChangelog(); rejects unknown sections in[Unreleased], as keep-a-changelog didcheck.mjs: takes--labels, prints the summary once, also on errors; drops--changelog-edit,--no-changelog,--outputpublish.mjs: drops--branchand--remotepull-request-changelog.yml: the check step is one command instead of a 13-line shell scriptpublish-changelog-unreleased.yml: no longer installs npm packagesSpecs: same scenarios, plus a failed release writing nothing, no pointer, empty and unknown sections (98 → 107 tests)
I have added tests and executed them locally
I have added
.changelog/<PR#>-<slug>.mdI have updated documentation
Review Checklist
z-index)package.jsonandpackage-lock.jsonreviewed