ci: migrate to pnpm/setup@v1 action - #291
Open
lanesawyer wants to merge 1 commit into
Open
Conversation
lanesawyer
requested review from
chrisj and
suyli7
and removed request for
a team
August 14, 2026 04:29
Replaces the pnpm/action-setup + actions/setup-node + `pnpm install` triple in every workflow job with a single pnpm/setup@v1 step. The action reads Node from `devEngines.runtime` and pnpm from `packageManager`, so the toolchain versions live in package.json instead of being duplicated across 8 workflow steps. `onFail` is "warn" rather than "download" deliberately: the action installs the runtime itself, and "download" makes pnpm install a second Node into node_modules, which links a host-architecture binary that fails to exec on the CI runner. With "warn" the lockfile is untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
lanesawyer
force-pushed
the
lane/pnpm-setup-action
branch
from
August 14, 2026 04:36
e98636a to
8a5c3b5
Compare
lanesawyer
changed the base branch from
lane/upgrade-pnpm-11
to
lane/lint-fix-and-pre-commit-hooks
August 14, 2026 04:36
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Replaces the per-job pnpm/Node setup boilerplate in every workflow with the single
pnpm/setup@v1action, and moves the toolchain pins intopackage.json.How
Workflows — every job had the same three steps:
replaced by:
The action installs the runtime (replacing
actions/setup-node), reads Node fromdevEngines.runtimeand pnpm frompackageManager, and runspnpm installitself. That drops 8 duplicated version pins — #289 had to bump every one by hand; the next bump is a one-linepackage.jsonchange.All 8 jobs across
ci.yml(5),deploy_examples.yml,publish.yml, andrelease.ymlneed dependencies, so all usecache: true; none qualified forinstall: false.package.json— the two fields the action reads:voltais left alone so Volta users keep working.Why
onFailiswarn, notdownloadWorth calling out, because
downloadis the more obvious choice and it fails CI.With
onFail: "download", pnpm treats the runtime as a project dependency: it adds anode: runtime:24.15.0entry to the lockfile and installs Node intonode_modules/.bin/node. That entry resolves to a multi-platformvariationslist, and the binary linked on the Linux runner was the host-architecture one, so every job died at the firstparcelinvocation:This does not reproduce locally on macOS — the linked binary happens to be the correct one there — so it only showed up on CI.
warnis the right value regardless: the action already installs the runtime, so having pnpm install a second Node intonode_modulesis redundant. It also keepsdevEnginesadvisory rather than hard-failing contributors whose Node is a patch off.Lockfile
Unchanged.
pnpm install --frozen-lockfilepasses against #198's lockfile as-is —warnmeans the runtime never becomes a dependency, so nothing to regenerate.Note for reviewers
publish.ymllosesregistry-url/scope—pnpm/setup@v1doesn't support them. That job publishes via OIDC provenance (id-token: write, noNODE_AUTH_TOKEN) toregistry.npmjs.org, which is also pnpm's default, so it should be a no-op. It's the only change with external impact that CI can't exercise, so worth a second opinion before the next release.Verification
Ran on pnpm 11.21.0 / Node 24.15.0 (darwin-arm64) against this branch rebased onto #198, all exit 0:
pnpm install --frozen-lockfile(working tree stays clean afterward)pnpm build·pnpm typecheck·pnpm test·pnpm lint:check·pnpm fmt:checkThe workflow changes themselves can only be proven by CI on this PR.
PR Checklist
main? — stacked on chore: add lefthook pre-commit hooks #198, notmain🤖 Generated with Claude Code