Skip to content

Make Changelog Round-Trips a Fixpoint - #143

Merged
AndrewRedican merged 9 commits into
mainfrom
week-2026-08-17_3
Aug 20, 2026
Merged

Make Changelog Round-Trips a Fixpoint#143
AndrewRedican merged 9 commits into
mainfrom
week-2026-08-17_3

Conversation

@AndrewRedican

@AndrewRedican AndrewRedican commented Aug 19, 2026

Copy link
Copy Markdown
Owner

Description

Changelog generation was not idempotent: every regeneration re-parsed its own output and re-emitted the decorations it found, so breaking-change markers and commit/issue references piled up on item text. Entries in libs/features/CHANGELOG.md had accumulated runs like **BREAKING** **BREAKING:** **BREAKING:** … ⚠️ BREAKING: in front of a single description.

This PR makes a parse then serialize pass a fixpoint. Breaking markers are now lifted off item text onto the item's breaking flag at parse time, the generator stops baking the marker into the text at all, and the serializer skips any commit hash or issue reference the description already spells out. The already-corrupted changelog entries are rewritten, and @hyperfrontend/versioning is released as 0.6.3.

Type of Change

🐛 Bug fix

Changes Made

  • Added parseBreakingFromItem (libs/versioning/src/changelog/parse/breaking.ts): a regex-free, ReDoS-safe scanner that strips repeated leading breaking markers (**BREAKING**, **BREAKING:**, [BREAKING], ⚠️ BREAKING:, bare BREAKING:, and the BREAKING CHANGE/CHANGES spellings, case-insensitive) and returns the flag plus the remaining text.
  • Wired the parser to run breaking detection on the stripped text, so the serializer's own marker can no longer feed back into the next parse.
  • Stopped generate-changelog from prefixing ⚠️ BREAKING: onto item text; the flag is passed to createChangelogItem instead, and the breaking-changes section items carry breaking: true.
  • Taught the serializer to filter out commit refs and issue refs the description already contains, so re-serializing reproduces the item byte for byte instead of growing a duplicate tail.
  • Rewrote the corrupted entries in libs/features/CHANGELOG.md and libs/nexus/CHANGELOG.md to a single **BREAKING** marker per item.
  • Released @hyperfrontend/versioning 0.6.3 and updated its dependents (libs/builder, libs/features, the versioning package E2E fixture and lockfiles).
  • Minor JSDoc formatting cleanup in the features liveness browser spec.

Testing

  • New libs/versioning/src/changelog/parse/breaking.spec.ts covers each marker spelling, repeated markers, the colon requirement that keeps prose like Breaking apart the parser intact, and the emoji variation selector.
  • New libs/versioning/src/changelog/round-trip.spec.ts asserts that parse → serialize → parse → serialize reaches a fixpoint, including on changelogs already carrying stacked markers.
  • Extended parser.spec.ts, serialize/to-string.spec.ts, and flow/steps/generate-changelog.spec.ts for the flag-based breaking path and the duplicate-reference filter.

Checklist

  • I have performed a self-review of my code
  • I have added/updated tests as needed
  • I have updated relevant documentation
  • I have used npm run commit for conventional commit messages

AI Assistance

GitHub Copilot was used to generate this PR description.

Additional Notes

  • Behavioral change for downstream consumers of @hyperfrontend/versioning: generated changelog items no longer contain a ⚠️ BREAKING: text prefix. The information now lives on the item's breaking flag, and serialization emits exactly one **BREAKING** marker.
  • The changelog edits under libs/features and libs/nexus are corrections to already-published entries; no package behavior changed there.

📝 CLA Requirement

By submitting this pull request, you acknowledge that:

  • You have read and agree to sign our Contributor License Agreement (CLA)
  • The CLA Assistant bot will automatically check your signature status
  • If you haven't signed yet, the bot will provide instructions in the comments
  • By signing, you grant the project maintainer exclusive rights to your contributions

For more information, see our Contributing Guide.


Thank you for contributing to hyperfrontend! 🚀

@vercel

vercel Bot commented Aug 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs-site Ready Ready Preview Aug 20, 2026 12:51am

Request Review

@nx-cloud

nx-cloud Bot commented Aug 19, 2026

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit 8d30b1a

Command Status Duration Result
nx run-many -t=e2e --projects=e2e-lib-versionin... ✅ Succeeded 2m 44s View ↗
nx run-many -t=build --projects=e2e-lib-version... ✅ Succeeded 52m 1s View ↗
nx run-many -t=typecheck --projects=e2e-lib-ver... ✅ Succeeded 1m 48s View ↗
nx run-many -t=test --projects=e2e-lib-versioni... ✅ Succeeded 1m 24s View ↗
nx run-many -t=lint --projects=e2e-lib-versioni... ✅ Succeeded 1m 16s View ↗
nx run-many -t=format:check --projects=e2e-lib-... ✅ Succeeded <1s View ↗
nx version-check lib-versioning ✅ Succeeded <1s View ↗
nx version-check lib-features ✅ Succeeded <1s View ↗
nx version-check lib-builder ✅ Succeeded 1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-20 01:49:47 UTC

@AndrewRedican AndrewRedican changed the title Fix linting issue Make Changelog Round-Trips a Fixpoint Aug 20, 2026
@AndrewRedican
AndrewRedican merged commit b22d333 into main Aug 20, 2026
15 checks passed
@AndrewRedican
AndrewRedican deleted the week-2026-08-17_3 branch August 20, 2026 01:52
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.

1 participant