Skip to content

Upgrade to pnpm 11#8816

Open
zurfyx wants to merge 1 commit into
mainfrom
pnpm-11
Open

Upgrade to pnpm 11#8816
zurfyx wants to merge 1 commit into
mainfrom
pnpm-11

Conversation

@zurfyx

@zurfyx zurfyx commented Jul 8, 2026

Copy link
Copy Markdown
Member

Summary

Upgrades the pinned package manager from pnpm@10.34.1 to pnpm@11.10.0 and adapts the repo config to pnpm 11's breaking changes.

pnpm-lock.yaml is unchanged — no dependency resolution drift; this is a package-manager version bump plus config relocation.

Changes

  • packageManagerpnpm@11.10.0, engines.pnpm>=11.0.0.
  • Moved overrides and peerDependencyRules out of package.json into pnpm-workspace.yaml — pnpm 11 no longer reads the pnpm field in package.json.
  • Migrated .pnpmrcpnpm-workspace.yaml — pnpm 11 no longer reads .pnpmrc. node-linker=hoisted (required for the ESM .mjs tests) becomes nodeLinker: hoisted. The onnxruntime-node-install=skip setting is dropped as dead config (onnxruntime-node is already stubbed via an override).
  • yjs override now uses a catalog (catalog:) instead of the deprecated $yjs reference syntax, silencing pnpm 11's deprecation warning. Same resolved version.
  • allowBuilds declared (all disabled) to preserve the pre-migration behavior where no dependency build scripts were approved (matches pnpm 10, on which CI passed with prebuilt binaries).
  • Updated the pnpm version reference in the maintainers' guide.

CI needs no changes — pnpm/action-setup@v6 derives the version from the packageManager field.

Test plan

All run locally under pnpm 11.10.0:

  • pnpm install --frozen-lockfile (lockfile consistent, still lockfileVersion: 9.0)
  • node_modules confirmed hoisted
  • pnpm run ci-check — tsc, tsc-scripts, tsc-extension, tsc-website, flow, prettier, lint (no errors)
  • pnpm run test-unit — 216 files, 4610 passed, 1 skipped
  • pnpm run build

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 8, 2026
@vercel

vercel Bot commented Jul 8, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
lexical Ready Ready Preview Jul 8, 2026 7:54pm
lexical-playground Ready Ready Preview Jul 8, 2026 7:54pm

Request Review

Bump the pinned package manager from pnpm@10.34.1 to pnpm@11.10.0 and
adapt config to pnpm 11's breaking changes:

- pnpm 11 no longer reads the "pnpm" field in package.json, so move
  overrides and peerDependencyRules into pnpm-workspace.yaml.
- Remove .pnpmrc: pnpm 11 does not read it (and pnpm never did). Its
  node-linker=hoisted setting was therefore inert — the repo builds and
  the ESM (.mjs) tests pass on pnpm's default (isolated) linker — and its
  onnxruntime-node-install=skip setting is moot since onnxruntime-node is
  stubbed via an override.
- Replace the deprecated "$yjs" override reference with a catalog entry
  and catalog: reference to silence the pnpm 11 deprecation warning.
- Declare dependency build scripts as disabled (allowBuilds) to preserve
  the pre-migration behavior where no build scripts were approved.
- Bump engines.pnpm to >=11.0.0 and update the maintainers' guide.

pnpm-lock.yaml is unchanged (no dependency resolution drift). Verified
against a clean --frozen-lockfile install: ci-check (tsc/flow/prettier/
lint), test-unit (4610 passed), and build all pass under pnpm 11.10.0.
@zurfyx

zurfyx commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

Deploy note: enable Corepack on the Vercel projects

The Vercel checks fail until Corepack is enabled, because Vercel defaults to pnpm 9.x (it infers the version from pnpm-lock.yaml v9 / project creation date and does not read packageManager unless Corepack is opted in). With this PR's engines.pnpm: >=11.0.0, pnpm 9 aborts install:

Detected pnpm-lock.yaml 9 ... Using pnpm@9.x based on project creation date
ERR_PNPM_UNSUPPORTED_ENGINE  Expected version: >=11.0.0  Got: 9.15.9

Relaxing engines is not a real fix: pnpm 9 does not read overrides/catalog from pnpm-workspace.yaml (a pnpm 10.9+ feature), so a pnpm-9 build would drop the version pins and diverge from the lockfile.

Fix (one-time, per project): on the lexical and lexical-playground Vercel projects, set env var ENABLE_EXPERIMENTAL_COREPACK=1 (Production + Preview) and redeploy. Vercel will then honor packageManager: pnpm@11.10.0. Docs: https://vercel.com/docs/deployments/configure-a-build#corepack

@zurfyx zurfyx added the extended-tests Run extended e2e tests on a PR label Jul 8, 2026
Comment thread package.json
"Safari >= 15",
"Edge >= 86"
],
"pnpm": {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This refactoring also needs to happen for the examples in order for the integration tests to pass

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants