From 9baedeb9df7fd206252309e0bba6c44fb1a74698 Mon Sep 17 00:00:00 2001 From: Nicolas DUBIEN Date: Wed, 8 Jul 2026 09:29:27 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Use=20pnpm=20version=20in=20chan?= =?UTF-8?q?gelog=20script=20(#7117)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description > AI-agent disclosure: this PR was authored by an automated > agent (Claude Code, claude-opus-4-8) and has not been > line-by-line reviewed by a human before submission. The release-automation script `.github/workflows/scripts/generate-changelog.cjs` bumps each impacted package's version while generating changelogs. It did so by shelling out to `npm`: ```js await execFile('npm', ['--no-git-tag-version', '--workspaces-update=false', 'version', releaseKind], { cwd: packageLocation, }); ``` Since the repository migrated to pnpm, `npm` is no longer part of the toolchain, and this command fails at runtime (`Command failed: npm --no-git-tag-version --workspaces-update=false version minor`), breaking changelog/version generation. This PR restores that step by using the pnpm equivalent: ```js await execFile('pnpm', ['version', releaseKind, '--no-git-tag-version'], { cwd: packageLocation, }); ``` For end users there is no runtime or API impact — this is a CI/tooling-only fix that unblocks the release changelog workflow. Why this design: `pnpm version --no-git-tag-version` is the direct counterpart of the previous call — it bumps only the local package's `package.json` and creates no git tag. The npm-specific `--workspaces-update=false` flag is intentionally dropped because pnpm's `version` command never rewrites dependent workspace `package.json` files in the first place, so there is no equivalent behavior to disable. I verified this in a scratch pnpm workspace: running the command inside a package subdirectory bumped only that package and left a dependent's `workspace:^` reference untouched. Scope and impact: the change is limited to a single line in the CI script, touches no published package, and therefore needs no changeset. There are no automated tests around this workflow script, so the fix was validated manually against pnpm's `version` behavior as described above. ## Checklist — _Don't delete this checklist and make sure you do the following before opening the PR_ - [ ] I have a full understanding of every line in this PR — whether the code was hand-written, AI-generated, copied from external sources or produced by any other tool - [ ] I flagged the impact of my change (minor / patch / major) either by running `pnpm run bump` or by following the instructions from the changeset bot - [ ] I kept this PR focused on a single concern and did not bundle unrelated changes - [ ] I followed the [gitmoji](https://gitmoji.dev/) specification for the name of the PR, including the package scope (e.g. `🐛(vitest) Something...`) when the change targets a package other than `fast-check` - [ ] I added relevant tests and they would have failed without my PR (when applicable) 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01QUiujUahNvnxraLeegWmqy --- _Generated by [Claude Code](https://claude.ai/code/session_01QUiujUahNvnxraLeegWmqy)_ --------- Co-authored-by: Claude --- .github/workflows/scripts/generate-changelog.cjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/scripts/generate-changelog.cjs b/.github/workflows/scripts/generate-changelog.cjs index 915e9055..0ac85c41 100644 --- a/.github/workflows/scripts/generate-changelog.cjs +++ b/.github/workflows/scripts/generate-changelog.cjs @@ -272,7 +272,7 @@ async function run() { await execFile('git', ['add', changelogPath]); // Update the package.json - await execFile('npm', ['--no-git-tag-version', '--workspaces-update=false', 'version', releaseKind], { + await execFile('pnpm', ['version', releaseKind, '--no-git-tag-version'], { cwd: packageLocation, }); const packageJsonPath = path.join(packageLocation, 'package.json'); -- 2.51.2