Skip to content

Commit dedd4ae

Browse files
Run the bump script with node so the automatic CLI release does not stop at pnpm's frozen install (#387)
The automatic CLI release for `@prisma/orm-toolchain` 8.0.0-rc.23 failed before it opened its pull request ([run 42269193200](https://github.com/prisma/prisma-cli/actions/runs/42269193200)). This change makes the "Bump the CLI version" step run the script with node: ```yaml run: | corepack enable node scripts/bump-version.ts ``` ## Why it failed The step used to run `pnpm bump-version`. pnpm 11 checks the install before it runs any script, and in CI that check is a frozen install. By that point the workflow has already written rc.23 into the manifests, so the lockfile (still rc.22) does not match and pnpm stops with `ERR_PNPM_OUTDATED_LOCKFILE`. The script never ran, so it never got to refresh the lockfile itself. This started with #384, which replaced the old "Refresh the lockfile" step with `pnpm bump-version`. Today's earlier composer run used the old step and passed. ## How I checked it Locally on this branch, with `CI=true`: 1. `node scripts/update-product-versions.mjs --channel release` rewrote `@prisma/orm-toolchain` 8.0.0-rc.22 → 8.0.0-rc.23. 2. `pnpm bump-version` failed with the same `runDepsStatusCheck` error as the CI run. 3. `node scripts/bump-version.ts` succeeded: it bumped every package to 8.0.0-rc.32 and refreshed `pnpm-lock.yaml` to rc.23. 4. `pnpm install --frozen-lockfile --lockfile-only` then passed. After this merges I will dispatch the workflow so it opens the rc.23 release pull request. ## Alternatives considered - `pnpm --config.verify-deps-before-run=false bump-version`: works, but hides why in a config flag. - A `pnpm install --lockfile-only` step before the bump: refreshes the lockfile twice. Agent: bellatrix-52 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io>
1 parent 4473f23 commit dedd4ae

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎.github/workflows/update-product-versions.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,13 @@ jobs:
7070
- name: Bump the CLI version
7171
id: bump
7272
if: ${{ steps.compare.outputs.changed == 'true' }}
73+
# Not `pnpm bump-version`: pnpm verifies the install before running a
74+
# script, and in CI that is a frozen install, which fails because
75+
# the manifests now pin versions the lockfile does not. The script
76+
# refreshes the lockfile itself.
7377
run: |
7478
corepack enable
75-
pnpm bump-version
79+
node scripts/bump-version.ts
7680
echo "version=$(node -p "require('./package.json').version")" >> "$GITHUB_OUTPUT"
7781
7882
- name: Open the pull request with auto-merge

0 commit comments

Comments
 (0)