fix(release): consolidate release config and pin conventionalcommits preset to v9 - #128
Conversation
…preset to v9 - **Resolved config shadowing:** `.releaserc.json` (which had no `presetConfig`) was silently overriding `release.config.js` (cosmiconfig loads the first match), so the preset fell back to defaults and hid `chore(deps)` — dependency-only releases (e.g. v1.11.1) came out empty. Moved the `presetConfig` into `.releaserc.json` and **deleted the dead `release.config.js`**. - Aligned `presetConfig.types` to studio's superset. - `conventional-changelog-conventionalcommits` devDependency `^10.0.0` → `^9.3.1` (+ regenerated `package-lock.json`) — hygiene so it can't bite if `extra_plugins` is ever added. - Added the Renovate guard. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request configures the @semantic-release/release-notes-generator in .releaserc.json and downgrades conventional-changelog-conventionalcommits to ^9.3.1 (with a corresponding pinning rule in renovate.json) to avoid empty release notes due to compatibility issues with conventional-changelog-writer@8. Feedback points out that the conventionalcommits preset does not support filtering or grouping by scope (such as "scope": "deps"). As a result, the first "chore" entry will match all chore commits, rendering the second entry unreachable and misgrouping all chores under "Dependency Updates". It is recommended to combine these entries.
|
🎉 This PR is included in version 1.11.2 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Why
Our semantic-release repos generate GitHub release notes with the
conventionalcommitspreset, but the behavior had drifted and, in several repos, notes were coming out empty. Two separate causes:@semantic-release/release-notes-generator@14still bundles the Handlebars-basedconventional-changelog-writer@8. Theconventional-changelog-conventionalcommitsv10 preset rewrote its templates as JS functions for the newer@conventional-changelog/templateengine (writer@9); fed to writer@8 only the header survives, so every release note collapses to just its## [x.y.z]…line.presetConfig.typesdrift. Types likechore/chore(deps)/ci/build/stylewere hidden or missing, so dependency-only releases (the common Renovate case) produced empty notes.This PR makes the repo consistent with studio's canonical release config (which surfaces every commit type) and holds the preset on v9 where relevant. Reference: HarperFast/studio#1560.
What changed
.releaserc.json(which had nopresetConfig) was silently overridingrelease.config.js(cosmiconfig loads the first match), so the preset fell back to defaults and hidchore(deps)— dependency-only releases (e.g. v1.11.1) came out empty. Moved thepresetConfiginto.releaserc.jsonand deleted the deadrelease.config.js.presetConfig.typesto studio's superset.conventional-changelog-conventionalcommitsdevDependency^10.0.0→^9.3.1(+ regeneratedpackage-lock.json) — hygiene so it can't bite ifextra_pluginsis ever added.Canonical
presetConfig.types(matches studio)feat→Features,fix→Bug Fixes,perf→Performance Improvements,refactor→Refactoring,chore(deps)→Dependency Updates,chore→Chores,docs→Documentation,style→Styles,test→Tests,build→Build System,ci→Continuous Integration,revert→Reverts — nothing hidden, so no release comes out empty.Renovate guard
Added a
packageRulesentry pinningconventional-changelog-conventionalcommitsto<10so Renovate won't re-introduce the v10 breakage. Remove once@semantic-release/release-notes-generatorships awriter@9-based major.Verification
.releaserc.jsonis valid JSON;renovate-config-validatorpasses.--package-lock-only);npm cipasses under npm 10.8.2 (the Node 20/22 CI matrix version). Lock diff is limited to the preset 10→9 swap — no unrelated churn.🤖 Generated with Claude Code