Repository navigation
build(repo): move the workspace to pnpm 12 - #205
Merged
Merged
Conversation
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.
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.
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.yamlis now two documents:packageManagerDependenciesplus 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 thepackageManagerpin or--frozen-lockfilefails withERR_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 archivecopy with an isolated store, then again on the branch:pnpm -C packages/mcp packdist/index.mjsBUILD_IDtimestamppnpm dedupe(Renovate'spostUpdateOptions)v11— shared store and the setup-node pnpm cache carry overThe setting worth naming: v12 turns an unrecognized key in
pnpm-workspace.yamlinto a hardERR_PNPM_UNRECOGNIZED_WORKSPACE_SETTINGSwhen the project pins a pnpm the running one satisfies, and the settings docs now list onlyallowBuilds.onlyBuiltDependenciesis still recognized — confirmed from both sides, by injecting a typo (which fails, suggestingonlyBuiltDependenciesback) and by the real file warning about nothing.Nothing else in v12's breaking set reaches us: no git dependencies, no
--resolution-only, noengineStrict, no pnpmfile.Why the action bump is its own commit
pnpm/action-setupv6.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'sregistry-urlfor npm OIDC trusted publishing, andpnpm/setuphas no input for it — so it would stay in the workflow anyway. It also takes its Node version fromdevEngines.runtimerather than the.node-versionthat fnm already reads locally. Its own README callspnpm/action-setupa supported path, not a deprecated one.Known follow-up, deliberately not here
onlyBuiltDependenciesstill listsesbuildand@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.