Skip to content

Simplify the changelog scripts - #5959

Merged
Eugene (OEvgeny) merged 5 commits into
mainfrom
OEvgeny/dev-simplify-changelog-scripts
Oct 22, 2026
Merged

Eugene (OEvgeny) merged 5 commits into
mainfrom
OEvgeny/dev-simplify-changelog-scripts

Conversation

@OEvgeny

@OEvgeny Eugene (OEvgeny) commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Follow-up to #5934: the changelog scripts are more complex than they need to be.

Changelog Entry

Changed

  • 👷🏻 Changelog scripts: one shared module instead of two, fewer options, and a shorter pull request check step, with the same output, in PR #5959, by @OEvgeny

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: same changelog-unreleased commit for the current main, same release, same check summaries.

Design

  • keep-a-changelog is not used: it reformats about 160 lines of CHANGELOG.md (blank lines, 3-space nested bullets), and a count of entries was its only remaining use.
  • Releases go through consume(), like publishing, so consume.mjs is no longer a command.

Specific Changes

  • changelog.mjs: merges fragment.mjs and consume.mjs; includes releaseChangelog(); rejects unknown sections in [Unreleased], as keep-a-changelog did

  • check.mjs: takes --labels, prints the summary once, also on errors; drops --changelog-edit, --no-changelog, --output

  • publish.mjs: drops --branch and --remote

  • pull-request-changelog.yml: the check step is one command instead of a 13-line shell script

  • publish-changelog-unreleased.yml: no longer installs npm packages

  • Specs: 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>.md

  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

Eugene Olonov 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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.

@OEvgeny
Eugene (OEvgeny) merged commit 2da5a49 into main Oct 22, 2026
33 checks passed
@OEvgeny
Eugene (OEvgeny) deleted the OEvgeny/dev-simplify-changelog-scripts branch October 22, 2026 19:00
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.

3 participants