fix(cli): post-upgrade What's-new parses the modern changelog format#880
Conversation
The summary parser only matched standalone **Heading** lines (the pre-1.20.4x
changelog format). Every release since moved to single-line '- **Title.** prose'
entries, so the post-upgrade What's-new printed a bare version header with zero
bullets. Extract the bold heading from both formats; prose still dropped.
Verified against the real CHANGELOG.md: renderWhatsNew('1.20.49','1.20.50')
now emits all four 1.20.50 entry titles.
Code ReviewerVerdict: Changes requested Build: ✅ Read before reviewing: root Issues that need attentionThe modern-format regex over-matches old-format sections, reintroducing the exact "noisy/wrong summary" failure mode for any upgrade range that crosses a pre-1.20.36 version. The correct heading ( Before this PR, the old-format matcher ( A fix likely needs the entry-bullet match to only fire when NOT already inside an old-style heading's sub-bullet list — e.g. track whether the current version section is using the standalone-heading format (seen a Things to verify manuallyNone beyond the above — the described 1.20.49→1.20.50 verification in the PR body reproduces correctly locally against the real changelog. Reviewed by Code Reviewer — actually ran the build and tests on this branch. |
Review follow-up (prix-cloud): the modern-entry regex matched any '- **' line,
so old-format sections with bold-led sub-bullets ('- **Claim.** detail') rendered
those details as top-level entries — garbage for ranges crossing pre-1.20.36
versions. Track per version section whether a standalone **Heading** line was
seen; once seen, '- **' lines in that section are sub-bullets and are skipped.
Re-verified the reviewer's repro against the real CHANGELOG.md:
renderWhatsNew('1.20.7','1.20.30') now emits one bullet per heading, zero
sentence fragments.
|
Addressed in 13fe819: the Re-ran your exact repro against the real CHANGELOG.md via the built |
Code ReviewerVerdict: Ready to merge Build: Green ( Read Changes that work well
Things to verify manually
Reviewed by Code Reviewer — actually ran the build and tests on this branch. |
# Conflicts: # apps/cli/CHANGELOG.md
Resolves the CHANGELOG.md Unreleased-section conflict by keeping both entries: the RUSH-1522 NEEDS-YOU precision fix and the post-upgrade What's-new parser fix from main (#880).
Problem
The post-upgrade "What's new" summary (
showWhatsNew→renderWhatsNew) only recognizes the old changelog format — standalone**Heading**lines with-sub-bullets. The changelog moved to single-line- **Title.** verbose prose…entries several releases ago (all of 1.20.48–1.20.50 + Unreleased), soline.startsWith('**')matches nothing and every recent upgrade prints a bare version header with zero bullets — releases look like they shipped nothing.Fix
renderWhatsNewextracts the bold heading from both formats:^- \*\*(.+?)\*\*for modern single-line entries (heading kept, prose dropped) and the existing standalone-line match for old sections. Range semantics(from, to]and the Unreleased exclusion are unchanged and now pinned by tests.Verification
renderWhatsNew('1.20.49', '1.20.50')renders:Previously that range rendered
v1.20.50with no bullets.