feat(setup-js): support pnpm/setup for pnpm > 11 - #21
Merged
Conversation
Auto-detect the package manager and the declared pnpm version in setup-js, then pick the toolchain: - pnpm > 11 (or undeclared pnpm version, which resolves to latest): pnpm/setup@v2, which installs pnpm and the Node.js runtime in one step (node-version is mapped to its runtime input; lts/* -> lts) - otherwise (npm/yarn, or pnpm <= 11): the classic setup-node path (pnpm/action-setup), unchanged pnpm/setup only supports pnpm >= 11, and v11 ships no binary for Intel macOS runners, hence the > 11 boundary. The detected package manager is passed to setup-node to avoid a second detection pass.
setup-node is an internal building block of setup-js, which now always detects the package manager and passes it in. Remove the duplicated lockfile detection and make `package-manager` a required input.
- package-manager detection and pnpm version/strategy detection are now
separate steps (detect / pnpm-strategy)
- drop the node_runtime output: the node-version -> pnpm/setup runtime
mapping is inlined into the pnpm/setup step's `runtime` input
('' or lts/* -> node@lts, otherwise node@<version>)
Gate the pnpm-strategy step on pm == 'pnpm' and drop the now-redundant
inner guard. When the step is skipped (npm/yarn), its output is empty,
which the downstream conditions already handle ('' != 'true' keeps the
classic setup-node path).
setup-vp was a pure passthrough of version/run-install/cache to voidzero-dev/setup-vp@v1. Call it directly from setup-js like pnpm/setup, and delete the wrapper. The setup-js input surface (vp/vp-version/auto-install/cache) is unchanged.
and add Checkout / Detect / Setup section separators to setup-js steps.
…sage - rename detect step ids: vp -> detect-vp, detect -> detect-pm, pnpm-strategy -> detect-pnpm - skip package-manager and pnpm strategy detection when Vite+ is used (detect-pm gated on use_vp != 'true', detect-pnpm additionally on pm == 'pnpm'); all downstream references updated
Each detect step now logs its own outcome (Vite+ usage, package manager, detected pnpm version and strategy). Drop the old log lines that announced subsequent steps in advance.
northword
force-pushed
the
feat/pnpm-setup
branch
from
August 31, 2026 11:24
181484b to
07989a3
Compare
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.
Closes #20
What
setup-jsauto-detects the toolchain and picks a setup strategy:vite-plusin devDependencies)voidzero-dev/setup-vp@v1pnpm/setup@v2— installs pnpm + Node.js runtime in one stepsetup-node(internal;pnpm/action-setup@v6for pnpm)The > 11 boundary is deliberate: pnpm/setup only supports pnpm >= 11, and v11 ships no binary for Intel macOS (darwin-x64) — keeping v11 on the classic path avoids that.
Changes
setup-js/action.ymldetect-vp/detect-pm/detect-pnpm, outputtinguse_vp,pm,use_new_pnpmsetup-node; pnpm major parsed frompackageManager/devEngines.packageManager(handles^12.0.0,+sha256...,12.x, minified JSON)runtimederived fromnode-versioninline (lts/*→node@lts),install/cacheforwardedvoidzero-dev/setup-vp@v1called directly (was thesetup-vpwrapper)setup-node: internal — duplicated package-manager detection removed,package-managerbecomes a required input (always supplied bysetup-js)setup-vp: deleted (was a pure passthrough wrapper)setup-js/example.yml,README.md: updated (README lists the three setup paths)Notes
autofix/release-npm/release-plugin, tracking@main) pass nopackage-managerinput; current behavior is preserved unless their pnpm version is > 11 or undeclared