fix(deps): hold the changelog preset on 9.x so releases can render - #569
Merged
Conversation
The release for #568 failed, and every release would have. #564 bumped conventional-changelog-conventionalcommits to 10.4.0, and 10.x cannot be rendered by the writer our release actually runs. Releases go through cycjimmy/semantic-release-action with semantic_version: 25. semantic-release@25 depends on @semantic-release/release-notes-generator@^14.1.0, 14.1.1 is the latest, and it pins conventional-changelog-writer@^8 — resolving 8.4.0. So no semantic-release upgrade escapes this today. Preset 10 plants a deliberate tripwire for exactly this mismatch: its writer options carry a `mainTemplate` whose text is the error message (@conventional-changelog/template, createLegacyWriterGuard). A modern writer has no `mainTemplate` and ignores it; a handlebars writer (<=8) compiles it, hits helperMissing and throws. Hence "Missing helper: ... requires conventional-changelog-writer@9 or newer". Neither major declares a peerDependency on the writer, so nothing warned, and nothing in the test suite touches the release path — the bump went green and broke publishing instead. Verified against the real component rather than by reading version ranges: @semantic-release/release-notes-generator@14 (writer 8.4.0) throws the exact error with preset 10.4.0, and generates correct notes with 9.3.1. renovate is told to hold the preset below 10 until release-notes-generator ships a writer@9, with the reasoning in the rule so the next person does not simply un-pin it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
🎉 This PR is included in version 29.6.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
What broke
The release for #568 failed — and every release would have, regardless of what was merged. #564 bumped
conventional-changelog-conventionalcommitsto10.4.0, and 10.x cannot be rendered by the writer our release actually runs.Why no semantic-release upgrade fixes it
Releases run through
cycjimmy/semantic-release-action@v6withsemantic_version: 25, so semantic-release is not a repo dependency and brings its own plugin tree:semantic-release@25(25.0.9, latest)@semantic-release/release-notes-generator@^14.1.0@semantic-release/release-notes-generator@14.1.1(latest)conventional-changelog-writer@^8→ resolves 8.4.0conventional-changelog-conventionalcommits@10.4.0, which needs writer ≥9There is no
release-notes-generator@15, so there is currently no version of semantic-release that pairs with preset 10.Why it failed so loudly
Preset 10 plants a deliberate tripwire for this exact mismatch.
createWriterOptsspreads increateLegacyWriterGuard(...)from@conventional-changelog/template, which sets:mainTemplate: `{{[<preset> requires conventional-changelog-writer@9 or newer …] true}}`A modern writer has no
mainTemplateoption and ignores the string. A handlebars writer (≤8) compiles it, cannot find a helper by that name, and throws with the message as the helper name — which is why the CI error readsMissing helper: "conventional-changelog-conventionalcommits requires conventional-changelog-writer@9 or newer …".Preset 9 supplies
mainTemplateas a genuine template, which is why it renders.Why nothing caught it
Neither preset major declares a
peerDependencyon the writer, so npm and renovate had nothing to check. And nothing in the test suite touches the release path, so the bump went green in CI and broke publishing instead.The fix
conventional-changelog-conventionalcommitsto9.3.1— the newest release a handlebars writer can render.@semantic-release/release-notes-generatorships aconventional-changelog-writer@9, with the reasoning inline in the rule so it does not simply get un-pinned.Verification
Against the real component rather than by reading version ranges — driving
@semantic-release/release-notes-generator@14(which resolved writer 8.4.0) over a syntheticfeat(errors): …commit:Also:
npm ciclean,npm run lintclean, unit suite 163/163. The preset is release tooling only — nothing undersrc/imports it.After merge
This should release the already-merged #568 as a minor. Worth a glance at the run to confirm the changelog for that commit renders as expected.