Skip to content

fix(deps): hold the changelog preset on 9.x so releases can render - #569

Merged
nicola-smartive merged 1 commit into
mainfrom
fix/pin-changelog-preset
Sep 3, 2026
Merged

fix(deps): hold the changelog preset on 9.x so releases can render#569
nicola-smartive merged 1 commit into
mainfrom
fix/pin-changelog-preset

Conversation

@smartive-nicolai

Copy link
Copy Markdown
Contributor

What broke

The release for #568 failed — and every release would have, regardless of what was merged. #564 bumped conventional-changelog-conventionalcommits to 10.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@v6 with semantic_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.0
repo pin conventional-changelog-conventionalcommits@10.4.0, which needs writer ≥9

There 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. createWriterOpts spreads in createLegacyWriterGuard(...) from @conventional-changelog/template, which sets:

mainTemplate: `{{[<preset> requires conventional-changelog-writer@9 or newer …] true}}`

A modern writer has no mainTemplate option 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 reads Missing helper: "conventional-changelog-conventionalcommits requires conventional-changelog-writer@9 or newer …".

Preset 9 supplies mainTemplate as a genuine template, which is why it renders.

Why nothing caught it

Neither preset major declares a peerDependency on 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

  • Pin conventional-changelog-conventionalcommits to 9.3.1 — the newest release a handlebars writer can render.
  • Tell renovate to hold it below 10 until @semantic-release/release-notes-generator ships a conventional-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 synthetic feat(errors): … commit:

preset 10.4.0 -> THREW  Missing helper: "conventional-changelog-conventionalcommits requires …"
preset  9.3.1 -> OK     ## [29.5.0](https://github.com/smartive/graphql-magic/compare/v29.4.0...v29.5.0) (2026-09-03)

Also: npm ci clean, npm run lint clean, unit suite 163/163. The preset is release tooling only — nothing under src/ 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.

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>
@nicola-smartive
nicola-smartive marked this pull request as ready for review September 3, 2026 13:59
@nicola-smartive
nicola-smartive merged commit 033c5ff into main Sep 3, 2026
23 checks passed
@nicola-smartive
nicola-smartive deleted the fix/pin-changelog-preset branch September 3, 2026 14:01
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 29.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant