Skip to content

build(repo): move the workspace to pnpm 12 - #205

Merged
awdr74100 merged 2 commits into
mainfrom
chore/pnpm-12
Sep 6, 2026
Merged

awdr74100 merged 2 commits into
mainfrom
chore/pnpm-12

Conversation

@awdr74100

Copy link
Copy Markdown
Owner

pnpm 12 is the Rust rewrite of the CLI. It keeps pnpm 11's commands, flags, settings and lockfile format, so this is a small diff — but the whole of v12's behavioural delta was checked against this repo rather than assumed.

The migration

pnpm 12 records the pinned package manager in a new leading YAML document, so pnpm-lock.yaml is now two documents: packageManagerDependencies plus the eight @pnpm/exe.* platform binaries, then the lockfile as it already was. +101/-0, and the second document is byte-identical to the old file — no resolution churn. It has to be committed alongside the packageManager pin or --frozen-lockfile fails with ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE.

pnpm 11.25 still reads the two-document file and leaves it untouched, so the pin can be reverted on its own.

Verified, not assumed

Run first on a clean git archive copy with an isolated store, then again on the branch:

six gates green — 200 files / 1972 tests
pnpm -C packages/mcp pack same four entries as pnpm 11
dist/index.mjs same length; differs only in its BUILD_ID timestamp
pnpm dedupe (Renovate's postUpdateOptions) no-op, converges
store version still v11 — shared store and the setup-node pnpm cache carry over
warm-store install 1.68s → 0.44s

The setting worth naming: v12 turns an unrecognized key in pnpm-workspace.yaml into a hard ERR_PNPM_UNRECOGNIZED_WORKSPACE_SETTINGS when the project pins a pnpm the running one satisfies, and the settings docs now list only allowBuilds. onlyBuiltDependencies is still recognized — confirmed from both sides, by injecting a typo (which fails, suggesting onlyBuiltDependencies back) and by the real file warning about nothing.

Nothing else in v12's breaking set reaches us: no git dependencies, no --resolution-only, no engineStrict, no pnpmfile.

Why the action bump is its own commit

pnpm/action-setup v6.1.0 exists for one reason — "feat: support pnpm v12" (pnpm/action-setup#288) — and it lands first so no commit in this branch has CI that cannot install the pnpm it asks for. v6.1.0 still installs pnpm 11, so that commit is a no-op on its own.

v6.0.10 bootstraps pnpm 11.19.0 and then pnpm self-update <target>; that path does reach 12.3.4 on macOS when driven by hand, so ubuntu was likely fine either way. Windows is the half that cannot be checked from here, and Windows is also where v6.0.10 was reported broken under pnpm 12 (a \\?\-prefixed store path failing the post-job cache save, pnpm/action-setup#286). That prefix is fixed on pnpm's side as of 12.0.0-rc.9, but the action release carrying Windows pnpm 12 smoke coverage is this one.

Not switching to pnpm/setup

The release workflow needs actions/setup-node's registry-url for npm OIDC trusted publishing, and pnpm/setup has no input for it — so it would stay in the workflow anyway. It also takes its Node version from devEngines.runtime rather than the .node-version that fnm already reads locally. Its own README calls pnpm/action-setup a supported path, not a deprecated one.

Known follow-up, deliberately not here

onlyBuiltDependencies still lists esbuild and @parcel/watcher, neither of which is in the dependency tree any more. Unrelated to v12; left out so a red CI here can only mean one thing.

v6.1.0 exists for exactly one reason — "feat: support pnpm v12" (pnpm/action-setup#288) — and it lands before the pin that needs it so no commit in this branch has CI that cannot install the pnpm it asks for. v6.1.0 still installs pnpm 11, so this commit is a no-op on its own.

v6.0.10 bootstraps pnpm 11.19.0 and then `pnpm self-update <target>`; that path does reach 12.3.4 on macOS when driven by hand, so ubuntu was likely fine either way. Windows is the half that cannot be checked from here, and Windows is also where v6.0.10 was reported broken under pnpm 12 (a `\\?\`-prefixed store path failing the post-job cache save, pnpm/action-setup#286). That prefix is fixed on pnpm's side as of 12.0.0-rc.9, but the action release that carries Windows pnpm 12 smoke coverage is this one.

Staying on pnpm/action-setup + actions/setup-node rather than moving to the newer pnpm/setup: the release workflow needs setup-node's `registry-url` for npm OIDC trusted publishing, which pnpm/setup has no input for, and pnpm/setup takes its Node version from `devEngines.runtime` rather than the `.node-version` that fnm already reads locally. Its own README calls action-setup a supported path, not a deprecated one.
pnpm 12 is the Rust rewrite of the CLI. It keeps pnpm 11's commands, flags, settings and lockfile format, and the whole of its behavioural delta was checked against this repo rather than assumed.

The lockfile change is the migration. pnpm 12 records the pinned package manager in a new leading YAML document, so `pnpm-lock.yaml` is now two documents: `packageManagerDependencies` plus the eight `@pnpm/exe.*` platform binaries, then the lockfile as it already was — byte-identical, +101/-0, no resolution churn. This has to be committed alongside the `packageManager` pin or `--frozen-lockfile` fails with ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE. pnpm 11.25 still reads the two-document file and leaves it untouched, so the pin can be reverted on its own.

Verified on a clean `git archive` copy before touching the tree, and again here: all six gates green (1972 tests), `pnpm -C packages/mcp pack` produces the same four entries, `dist/index.mjs` differs from the pnpm 11 build only in its BUILD_ID timestamp, and `pnpm dedupe` — which Renovate runs via postUpdateOptions — is a no-op that converges. The store is still `v11`, so the shared store and the setup-node pnpm cache carry over.

The one setting worth naming: v12 turns an unrecognized key in pnpm-workspace.yaml into a hard ERR_PNPM_UNRECOGNIZED_WORKSPACE_SETTINGS when the project pins a pnpm the running one satisfies, and the settings docs now list only `allowBuilds`. `onlyBuiltDependencies` is still recognized — confirmed from both sides, by injecting a typo (which fails, suggesting `onlyBuiltDependencies` back) and by the real file warning about nothing.

Nothing else in v12's breaking set reaches us: no git dependencies, no `--resolution-only`, no `engineStrict`, no pnpmfile.
@awdr74100
awdr74100 merged commit 75d150d into main Sep 6, 2026
6 checks passed
@awdr74100
awdr74100 deleted the chore/pnpm-12 branch September 6, 2026 08:34
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