fix(ci): install the conventionalcommits preset the release config needs #1452

Closed
nicholasgower wants to merge 1 commit from fix/release-conventionalcommits-preset into main
nicholasgower commented 2026-11-10 03:15:18 +00:00 (Migrated from github.com)

Why the Release workflow fails

Every push to main that reaches semantic-release fails at analyzeCommits with:

Error: Cannot find module 'conventional-changelog-conventionalcommits'
code: 'MODULE_NOT_FOUND'
pluginName: '@semantic-release/commit-analyzer'

.releaserc.json asks both @semantic-release/commit-analyzer and @semantic-release/release-notes-generator for the conventionalcommits preset. semantic-release loads a preset as the package conventional-changelog-<preset>. The plugins bring conventional-changelog-angular with them, but nothing declares conventional-changelog-conventionalcommits. With no lock file, a fresh npm install in the workflow installs only the declared dependencies, so the module is absent.

This is why it happens on pushes and not just releases: analyzeCommits always runs once a v* tag exists, even when the commits would not make a release.

Evidence: run #176 (42743378060) on 9a2e80e fails in the semantic-release step; earlier runs such as 42730522541 and 42718870130 have the same error.

The fix

Add conventional-changelog-conventionalcommits 9.3.1 to devDependencies.

Version note: 10.x requires conventional-changelog-writer@9 or newer, while @semantic-release/release-notes-generator 14.1.1 still bundles writer 8; installing 10.x moves the failure from analyzeCommits to generateNotes (a missing handlebars helper). 9.3.1 works with the writer semantic-release 25 installs.

Testing

  • npm install --no-audit --no-fund --ignore-scripts in a clean checkout.
  • npx semantic-release --dry-run reaches The next release version is 2.1.0, completes generateNotes, and exits 0.
  • A full release against a local bare remote (CI=true) runs python3 scripts/changelog.py 2.1.0 v2.0.11, commits chore(release): 2.1.0 [skip ci] [skip release], creates v2.1.0, and pushes both to the remote.

Related: #1201 covers the same missing preset together with a fork-specific repository URL change; this PR keeps the upstream fix to the one dependency so it can land independently.

## Why the Release workflow fails Every push to `main` that reaches semantic-release fails at `analyzeCommits` with: ``` Error: Cannot find module 'conventional-changelog-conventionalcommits' code: 'MODULE_NOT_FOUND' pluginName: '@semantic-release/commit-analyzer' ``` `.releaserc.json` asks both `@semantic-release/commit-analyzer` and `@semantic-release/release-notes-generator` for the `conventionalcommits` preset. semantic-release loads a preset as the package `conventional-changelog-<preset>`. The plugins bring `conventional-changelog-angular` with them, but nothing declares `conventional-changelog-conventionalcommits`. With no lock file, a fresh `npm install` in the workflow installs only the declared dependencies, so the module is absent. This is why it happens on pushes and not just releases: `analyzeCommits` always runs once a `v*` tag exists, even when the commits would not make a release. Evidence: [run #176 (42743378060)](https://github.com/NotRexed/Hookshot/actions/runs/42743378060) on 9a2e80e fails in the `semantic-release` step; earlier runs such as [42730522541](https://github.com/NotRexed/Hookshot/actions/runs/42730522541) and [42718870130](https://github.com/NotRexed/Hookshot/actions/runs/42718870130) have the same error. ## The fix Add `conventional-changelog-conventionalcommits` 9.3.1 to `devDependencies`. Version note: 10.x requires `conventional-changelog-writer@9` or newer, while `@semantic-release/release-notes-generator` 14.1.1 still bundles writer 8; installing 10.x moves the failure from `analyzeCommits` to `generateNotes` (a missing handlebars helper). 9.3.1 works with the writer semantic-release 25 installs. ## Testing - `npm install --no-audit --no-fund --ignore-scripts` in a clean checkout. - `npx semantic-release --dry-run` reaches `The next release version is 2.1.0`, completes `generateNotes`, and exits 0. - A full release against a local bare remote (`CI=true`) runs `python3 scripts/changelog.py 2.1.0 v2.0.11`, commits `chore(release): 2.1.0 [skip ci] [skip release]`, creates `v2.1.0`, and pushes both to the remote. Related: #1201 covers the same missing preset together with a fork-specific repository URL change; this PR keeps the upstream fix to the one dependency so it can land independently.
hckrman101 (Migrated from github.com) reviewed 2026-11-10 03:15:18 +00:00
hckrman101 (Migrated from github.com) reviewed 2026-11-10 04:18:40 +00:00
hckrman101 (Migrated from github.com) left a comment
No description provided.
Looks good. The diagnosis is right: .releaserc.json asks both plugins for the `conventionalcommits` preset, semantic-release loads that as `conventional-changelog-conventionalcommits`, and release.yml does a bare `npm install` with no lock file, so the module is never there. Exact pin matches the style of the other devDependencies. CI is green (the release jobs are skipped, as expected). Overlaps, for the maintainers: - #1201 (already approved) adds the same dependency, pinned at 8.0.0, plus the `--repository-url` change in release.yml. Whichever lands second will conflict on the same package.json line, so only one of the two should add it. This PR is the better base for the dependency: 9.3.1 is what the author actually ran through a dry run and a full local release, and 8.0.0 is also compatible with the writer 8 that release-notes-generator 14.1.1 bundles, so either would work. #1201 could then be reduced to the release.yml line. - #1059 / #1062 (release-please) delete package.json and .releaserc.json entirely, so this fix becomes moot once either lands. Until then the Release workflow is broken on main, so landing this small fix first seems worth it. - #1414 doesn't touch package.json or the semantic-release config, so no conflict. No code issues from me.
hckrman101 commented 2026-11-10 16:16:42 +00:00 (Migrated from github.com)

#1059 replaces the entire release system, let's wait for that to land

https://git.magicbean.dev/MagicBeanDev/Hookshot/pulls/1059 replaces the entire release system, let's wait for that to land
hckrman101 commented 2026-11-11 15:51:08 +00:00 (Migrated from github.com)

#1059 has landed now, so this can go ahead. It conflicts with main: could you rebase onto main and resolve the conflicts? Thanks!

[#1059](https://git.magicbean.dev/MagicBeanDev/Hookshot/pulls/1059) has landed now, so this can go ahead. It conflicts with main: could you rebase onto main and resolve the conflicts? Thanks!
NotRexed commented 2026-11-11 21:22:01 +00:00 (Migrated from github.com)

Thanks. Releases moved from semantic-release to release-please (#1059), and package.json is gone from main, so the preset install isn't needed any more. Closing as superseded.

Thanks. Releases moved from semantic-release to release-please (#1059), and package.json is gone from main, so the preset install isn't needed any more. Closing as superseded.
Commenting is not possible because the repository is archived.
No description provided.