Skip to content

chore(deps): upgrade pnpm to 11.21.0 - #289

Open
lanesawyer wants to merge 1 commit into
mainfrom
lane/upgrade-pnpm-11
Open

chore(deps): upgrade pnpm to 11.21.0#289
lanesawyer wants to merge 1 commit into
mainfrom
lane/upgrade-pnpm-11

Conversation

@lanesawyer

Copy link
Copy Markdown
Collaborator

What

Upgrades pnpm from 10.33.0 to 11.21.0 (latest v11) across the repo.

How

  • package.json — bumped the volta.pnpm pin to 11.21.0. This is the only package.json in the workspace carrying a pnpm pin; the sub-packages have none.
  • Workflows — bumped all 8 pnpm/action-setup version: pins across ci.yml, release.yml, publish.yml, and deploy_examples.yml.
  • pnpm-workspace.yaml — added an allowBuilds block.

Why allowBuilds was necessary

This one isn't cosmetic. pnpm 11 promotes ignored dependency build scripts from a warning to a hard error (ERR_PNPM_IGNORED_BUILDS), which made pnpm install --frozen-lockfile exit 1 — CI would have failed on every job.

All six affected packages (@parcel/watcher, @swc/core, esbuild, lmdb, msgpackr-extract, sharp) are set to false, which preserves existing behavior rather than changing it: pnpm 10 already defaults to not running dependency build scripts, and this repo has no onlyBuiltDependencies config — so these have been skipped on every install on main all along, with CI green. Setting them to true would be the actual behavior change.

Each follows the same pattern — a prebuilt platform-specific optional dependency, with the install script as a compile-from-source fallback:

package install script prebuilt dep
esbuild node install.js @esbuild/<platform>
sharp node install/check.js || npm run build @img/sharp-<platform>
@swc/core node postinstall.js @swc/core-<platform>
@parcel/watcher node scripts/build-from-source.js @parcel/watcher-<platform>
lmdb node-gyp-build-optional-packages @lmdb/lmdb-<platform>
msgpackr-extract node-gyp-build-optional-packages @msgpackr-extract/...-<platform>

allowBuilds is pnpm 11's unified replacement for pnpm 10's onlyBuiltDependencies / ignoredBuiltDependencies pair; pnpm scaffolded the block itself during install.

Lockfile

pnpm-lock.yaml is unchanged — pnpm 11 still uses lockfileVersion: '9.0'.

Heads-up for reviewers pulling this branch

Your first pnpm install after switching will want to purge node_modules. Interactively it just prompts; in a non-TTY context it aborts with ERR_PNPM_ABORTED_REMOVE_MODULES_DIR_NO_TTY. GitHub Actions sets CI=true, so CI purges silently.

Verification

Ran locally on pnpm 11.21.0 (darwin-arm64), all exit 0:

  • pnpm install --frozen-lockfile
  • pnpm build
  • pnpm test
  • pnpm typecheck
  • pnpm check

Prebuilt binary resolution was verified on darwin-arm64 only; CI covers ubuntu-latest (linux-x64).

PR Checklist

  • Is your PR title following our conventional commit naming recommendations?
  • Have you filled in the PR Description Template?
  • Is your branch up to date with the latest in main?
  • Do the CI checks pass successfully?
  • Have you smoke tested the example applications?
  • Did you check that the changes meet accessibility standards? — N/A, no UI changes
  • Have you tested the application on these browsers? — N/A, tooling-only change
    • Chrome (Fully supported)
    • Firefox (Major bug fixes supported)
    • Safari (Major bug fixes supported)

🤖 Generated with Claude Code

- Bump the volta pin and all pnpm/action-setup version pins in CI,
  release, publish, and deploy workflows
- Add an allowBuilds block to pnpm-workspace.yaml: pnpm 11 turns ignored
  build scripts into a hard error, which failed --frozen-lockfile. All
  six are set to false, matching the pnpm 10 behavior where they were
  already skipped; each ships a prebuilt platform binary.

pnpm-lock.yaml is unchanged — pnpm 11 still uses lockfileVersion 9.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant