Symptom
Every release commit since at least v0.11.7 has added two identical sections to the top of CHANGELOG.md:
- one with the proper tag range (
compare/v0.11.7...v0.11.8) - one with a
...HEADrange (compare/v0.11.7...HEAD)
Examples:
Root cause
The release:* scripts chain two changelog generators:
"release:patch": "bun --bun run changelog:generate && bunx --bun bumpx patch --recursive --yes"bun run changelog:generate(=bunx --bun logsmith --output CHANGELOG.md) runs before the new tag exists, so logsmith generates a<last-tag>...HEADsection and prepends it.bunx --bun bumpx patch ...then runs.bumpxhas--changelogenabled by default and internally calls@stacksjs/logsmith'sgenerateChangelogwith the properfrom/totag range — generating a second section, this time with the freshly-created tag.
Both prepend to CHANGELOG.md, hence the duplicate.
Fix
Drop the redundant pre-step from every release script; let bumpx handle the changelog itself. The standalone changelog / changelog:generate scripts stay available for ad-hoc use.
- "release": "bun --bun run changelog:generate && bunx --bun bumpx prompt --recursive",
- "release:patch": "bun --bun run changelog:generate && bunx --bun bumpx patch --recursive --yes",
- "release:minor": "bun --bun run changelog:generate && bunx --bun bumpx minor --recursive --yes",
- "release:major": "bun --bun run changelog:generate && bunx --bun bumpx major --recursive --yes",
+ "release": "bunx --bun bumpx prompt --recursive",
+ "release:patch": "bunx --bun bumpx patch --recursive --yes",
+ "release:minor": "bunx --bun bumpx minor --recursive --yes",
+ "release:major": "bunx --bun bumpx major --recursive --yes",Landed on main as 43d0172.
Cross-repo scope
This release-script pattern is copy-pasted across most stacksjs repos (seen in tlsx, bumpx, dtsx, etc. — anywhere using bumpx + logsmith). Sweeping the same fix across them next; will reference this issue in those commits.
The CHANGELOG.md history in this repo (and others) carries the historical dupes; not cleaning those up unless requested — fresh releases will be clean.