ci: use pnpm/setup for pnpm and Node setup, pin Node in package.json - #560
Merged
sharevb merged 3 commits intoAug 16, 2026
Conversation
Replace the corepack bootstrap + actions/setup-node + separate `pnpm install` steps with a single `pnpm/setup` step, which installs pnpm (version read from package.json `packageManager`), installs Node, caches the pnpm store and runs `pnpm install`. Node 24 stays pinned via `runtime: node@24`, and the GitHub Pages workflow drops `pnpm/action-setup` in favour of the same step (it now caches the store too). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YAwAJ6L3Mai8eSxXf5e6SA
Move the Node version out of the workflows and into package.json, so the `pnpm/setup` steps are just `cache: true`: - `engines.node` pins Node 24 as package metadata. - `devEngines.runtime` is the field `pnpm/setup` actually reads to pick the runtime, and pnpm itself uses it to run scripts, so it is needed for the pin to take effect. Bump `packageManager` from pnpm 11.11.0 to 11.22.0 (latest 11.x). pnpm records the runtime in the lockfile (`node@runtime:24.19.0`), and the 11.22.0 resolver writes peer suffixes differently from 11.11.0, so pnpm-lock.yaml is regenerated. Lint, typecheck, unit tests and build all pass on the updated lockfile. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YAwAJ6L3Mai8eSxXf5e6SA
The repo was already on Node 24 everywhere else (Dockerfile, workflows, and now engines/devEngines in package.json) while .nvmrc still selected 22.19.0. Align it with the rest, matching the node@runtime:24.19.0 version pnpm resolved into the lockfile. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YAwAJ6L3Mai8eSxXf5e6SA
There was a problem hiding this comment.
Pull request overview
This PR modernizes the repository’s CI/toolchain setup by switching GitHub Actions workflows to the pnpm/setup action for consistent pnpm + Node provisioning, and centralizes the Node version pin in package.json (instead of duplicating it across workflows). It also aligns local development (.nvmrc) and regenerates the lockfile to reflect the updated pnpm/runtime metadata.
Changes:
- Replace hand-rolled Corepack +
actions/setup-node+ explicitpnpm installsteps withpnpm/setup@v2.0.2across the affected workflows. - Pin Node 24 in
package.json(engines.node+devEngines.runtime) and update.nvmrcto 24.19.0. - Bump pnpm to 11.22.0 and regenerate
pnpm-lock.yamlaccordingly.
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Regenerated lockfile for pnpm 11.22.0 and Node runtime metadata (includes node@runtime:* entries and resolver output changes). |
| package.json | Bumps packageManager pnpm version and centralizes Node version via engines + devEngines.runtime. |
| .nvmrc | Aligns local Node version with CI/toolchain (24.19.0). |
| .github/workflows/sharevb-releases.yml | Switches dependency setup to pnpm/setup with caching. |
| .github/workflows/sharevb-github-pages-publish.yml | Switches Node + pnpm setup to pnpm/setup with caching. |
| .github/workflows/sharevb-e2e-tests.yml | Switches dependency setup to pnpm/setup; keeps Playwright cache/install flow. |
| .github/workflows/sharevb-docker-realease-latest.yml | Switches dependency setup to pnpm/setup with caching. |
| .github/workflows/sharevb-docker-realease-baseurl-it-tools.yml | Switches dependency setup to pnpm/setup with caching. |
| .github/workflows/sharevb-docker-nightly-release.yml | Switches both jobs’ dependency setup to pnpm/setup with caching. |
| .github/workflows/sharevb-ci.yml | Switches dependency setup to pnpm/setup with caching. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| - name: Get Playwright version | ||
| id: playwright-version | ||
| run: echo "PLAYWRIGHT_VERSION=$(jq -r .dependencies.playwright package.json)" >> "$GITHUB_OUTPUT" |
sebdanielsson
force-pushed
the
claude/update-pnpm-github-action-51td4u
branch
from
August 16, 2026 11:14
f910586 to
66aed8b
Compare
Owner
|
Hi @sebdanielsson thanks for this PR now merged |
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.
Description
This replaces the hand-rolled pnpm bootstrap in the workflows with the official
pnpm/setupaction, and moves the Node version out of the workflow files and intopackage.json.Every workflow currently repeats this block:
It becomes a single step:
pnpm/setupinstalls pnpm (reading the version frompackageManager), installs the Node runtime, caches the pnpm store, and runspnpm install— so the corepack bootstrap,actions/setup-nodeand the separate install step are all no longer needed.Changes in detail:
sharevb-ci,sharevb-e2e-tests,sharevb-docker-nightly-release(×2 jobs),sharevb-docker-realease-latest,sharevb-docker-realease-baseurl-it-tools,sharevb-releases,sharevb-github-pages-publish. Net −96/+32 lines in the workflows.sharevb-github-pages-publishalso dropspnpm/action-setup@v6.0.9for the same step, and gains pnpm store caching it did not have before.package.jsonviaengines.nodeanddevEngines.runtimeinstead of being repeated asnode-version: 24in every workflow.packageManager..nvmrcbumped from 22.19.0 to 24.19.0, which was out of step with the rest of the repo.pnpm-lock.yamlregenerated (see below — this is required, not cosmetic).The
sharevb-vercel-*andsharevb-codeql-analysisworkflows never set up pnpm, so they are untouched.Additional context
A few points reviewers may want to look at:
Why
devEnginesand not justengines.pnpm/setupreadsdevEngines.runtimeto choose the runtime; it ignoresengines.node. With onlyengines, the action silently falls back to Node LTS. Both fields are set here, pinned to Node 24:engines.nodealso affects Vercel. Per Vercel's docs,engines.nodeinpackage.jsonoverrides the Node version selected in project settings. Sincesharevb-vercel-previewandsharevb-vercel-prodrunvercel build, this pins those builds to Node 24 as well. That matches what CI and the Dockerfile already used, but it is a behaviour change worth being aware of. If you would rather leave Vercel on the dashboard setting,enginescan be dropped —devEngines.runtimealone is enough for CI and local pnpm.Why the lockfile diff is large (+753/−614). Two causes, neither of which changes any dependency version:
node@runtime:24.19.0is now an entry in the lockfile. Without regenerating,pnpm install --frozen-lockfilefails withERR_PNPM_OUTDATED_LOCKFILE, so this part is mandatory.(supports-color@8.1.1),(csso@5.0.5)(lightningcss@1.32.0)), which accounts for most of the churn.Node version sources are now consistent.
.nvmrc(24.19.0),engines.node(24.x),devEngines.runtime(24.x), the lockfile (node@runtime:24.19.0) and the Dockerfile (node:24-alpine) all agree..nvmrcpreviously said 22.19.0 while CI and Docker were already on 24.--ignore-scriptsis no longer passed.pnpm/setupruns a plainpnpm installand has no input for extra install args. This looks low risk here:package.jsonhas nopreinstall/install/postinstall/preparescripts, and pnpm 10+ blocks dependency build scripts by default unless allowlisted viaonlyBuiltDependencies, which this repo does not set.Action pinned to
v2.0.2rather than the floatingv2, to match how every other action in this repo is pinned (actions/checkout@v7.0.0,github/codeql-action/init@v4.36.3) and thehelpers:pinGitHubActionDigestspreset inrenovate.json.Verification. Run locally against the regenerated lockfile, all passing:
pnpm lint,pnpm lint:fix(no changes),pnpm typecheck,pnpm test(128 files, 1035 tests) andpnpm build. The workflows themselves have not been executed yet, so the action's behaviour on real runners is unverified until CI runs on this PR.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
chore/all-my-stuffsbranch.fixes #123).pnpm install --ignore-scripts && pnpm lint:fix && pnpm typecheckto ensure pnpm lock, oxlint and typecheck are ok🤖 Generated with Claude Code