From c186b364ac4c0a58c69c77accf4edc2be96487f9 Mon Sep 17 00:00:00 2001 From: Gerard Rovira Date: Wed, 8 Jul 2026 10:12:08 -0400 Subject: [PATCH] Upgrade to pnpm 11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- .pnpmrc | 5 --- package.json | 27 ++------------- .../lexical-website/docs/maintainers-guide.md | 2 +- pnpm-workspace.yaml | 33 +++++++++++++++++++ 4 files changed, 37 insertions(+), 30 deletions(-) delete mode 100644 .pnpmrc diff --git a/.pnpmrc b/.pnpmrc deleted file mode 100644 index ac3de111502..00000000000 --- a/.pnpmrc +++ /dev/null @@ -1,5 +0,0 @@ -# Use hoisted node_modules structure for ESM compatibility -# This is needed because test files use ESM (.mjs) which has issues -# with pnpm's default symlinked structure -node-linker=hoisted -onnxruntime-node-install=skip diff --git a/package.json b/package.json index 629722fe6ad..55e9cd09385 100644 --- a/package.json +++ b/package.json @@ -4,14 +4,14 @@ "version": "0.46.0", "license": "MIT", "private": true, - "packageManager": "pnpm@10.34.1", + "packageManager": "pnpm@11.10.0", "workspaces": [ "packages/*", "dev-examples/*" ], "engines": { "node": ">=20.19.0", - "pnpm": ">=9.0.0" + "pnpm": ">=11.0.0" }, "engineStrict": true, "scripts": { @@ -210,26 +210,5 @@ "Firefox >= 115", "Safari >= 15", "Edge >= 86" - ], - "pnpm": { - "peerDependencyRules": { - "allowedVersions": { - "eslint": "10" - } - }, - "overrides": { - "react": "19.2.5", - "react-dom": "19.2.5", - "@types/node": "25.9.1", - "postcss": "8.5.15", - "prettier": "3.8.1", - "yaml@^1": "^1.10.3", - "uuid": ">=14.0.0", - "webpack-dev-server": ">=5.2.4", - "onnxruntime-node": "link:./stubs/empty", - "sharp": "link:./stubs/empty", - "yjs": "$yjs", - "tmp": ">=0.2.6" - } - } + ] } diff --git a/packages/lexical-website/docs/maintainers-guide.md b/packages/lexical-website/docs/maintainers-guide.md index 4235718c563..1adb5af95aa 100644 --- a/packages/lexical-website/docs/maintainers-guide.md +++ b/packages/lexical-website/docs/maintainers-guide.md @@ -299,7 +299,7 @@ Re-run it whenever a new public package is added. #### Prerequisites - Node.js — whatever the repo's root `package.json#engines.node` says (currently `>=20.19.0`). Running with Node 24+ is recommended because that's what CI uses for publishes. -- pnpm — pinned by `package.json#packageManager` (currently `pnpm@10.34.1`). Activate with [corepack](https://nodejs.org/api/corepack.html) or install directly. +- pnpm — pinned by `package.json#packageManager` (currently `pnpm@11.10.0`). Activate with [corepack](https://nodejs.org/api/corepack.html) or install directly. - npm CLI — **`npm ≥ 11.10`** (`npm i -g npm@latest`). The `npm trust` subcommand was added in npm 11; older versions will fail the preflight check. - An authenticated npm session (`npm login --registry https://registry.npmjs.org`) on a publisher account that has **account-level 2FA enabled** and write access to every `@lexical/*` package. diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8a848acad38..b60c216f87d 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -8,3 +8,36 @@ minimumReleaseAge: 10080 minimumReleaseAgeExclude: - '@lexical/*' - 'lexical' + +catalog: + yjs: '^13.6.31' + +overrides: + react: '19.2.5' + react-dom: '19.2.5' + '@types/node': '25.9.1' + postcss: '8.5.15' + prettier: '3.8.1' + 'yaml@^1': '^1.10.3' + uuid: '>=14.0.0' + webpack-dev-server: '>=5.2.4' + onnxruntime-node: 'link:./stubs/empty' + sharp: 'link:./stubs/empty' + yjs: 'catalog:' + tmp: '>=0.2.6' + +peerDependencyRules: + allowedVersions: + eslint: '10' + +# Build scripts stay disabled — matches pre-migration (pnpm 10) behavior where +# no dependency build scripts were approved and CI passed on prebuilt binaries. +allowBuilds: + '@parcel/watcher': false + '@swc/core': false + core-js: false + esbuild: false + leveldown: false + protobufjs: false + spawn-sync: false + unrs-resolver: false