Repository navigation
chore(pnpm): move to 11.25.0 and retire the packageManager workaround - #75
Merged
Merged
Conversation
mise pinned pnpm not as a convenience but because the `packageManager` field could not be satisfied here at all: pnpm refused to switch to a version it could not verify, and the 1ES proxy publishes no npm registry signatures -- no dist.signatures, no /-/npm/v1/keys, no attestations, only a SHA-1 shasum. Having the pinned version already on PATH meant no switch was ever attempted. pnpm 11.21.0 lifted that. pnpm/pnpm#13728 fixed both halves against this exact proxy -- Microsoft filed it, and the PR names the shasum-only case directly. Package-manager entries are now recorded integrity-only, because the bootstrap always derives the download URL from the trusted registries rather than from the lockfile, and the engine signature falls back to registry.npmjs.org when the configured registry cannot provide one. Demonstrated both ways against this repo's .npmrc, in a scratch project pinning a different pnpm: 11.17.0 [ERROR] The packageManager dependency "[email protected]" in pnpm-lock.yaml must use a registry package path and an integrity-only resolution 11.25.0 switches and reports 11.23.0 The two versions stay equal anyway -- a switch that works is still a download nobody asked for -- but the comment no longer claims a constraint that has been fixed. This does NOT change the lockfile tarball-host problem. That is a different code path: an ordinary --frozen-lockfile install fetches the recorded URL without resolving, so pnpm cannot drop a URL it is unable to reconstruct, and ours is unreconstructible on the host alone. The strip script stays. Verified: the lockfile is byte-identical under 11.25.0 and the format version is unchanged at 9.0; verify:workspace passes; the container suite is 15/15 with pnpm v11.25.0 inside; mise.lock carries the linux-x64 and linux-arm64 checksums the Docker build reads. One transition cost, for anyone not on mise: a local pnpm older than 11.21.0 now fails on entry to this repo, because it tries to switch to 11.25.0 and hits the bug above. `mise install` resolves it. CI is unaffected -- pnpm/action-setup installs the pinned version directly and never switches.
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.
Why the pin existed
mise.tomlpinned pnpm not as a convenience but because thepackageManagerfield could not be satisfied here at all. pnpm refused to switch to a version
it could not verify, and the 1ES proxy publishes no npm registry signatures — no
dist.signatures, no/-/npm/v1/keys, no attestations, only a SHA-1shasum.Keeping the pinned version already on PATH meant no switch was ever attempted.
That constraint is gone
pnpm 11.21.0 lifted it. pnpm/pnpm#13728
fixed both halves against this exact proxy — Microsoft filed it, and the PR
names the shasum-only case directly. Package-manager entries are now recorded
integrity-only (the bootstrap always derives the download URL from the trusted
registries rather than from the lockfile), and the engine signature falls back to
registry.npmjs.org when the configured registry cannot provide one.
Demonstrated both ways against this repo's
.npmrc, in a scratch project pinninga different pnpm:
The two versions stay equal anyway — a switch that works is still a download
nobody asked for — but the comment no longer asserts a constraint that has been
fixed.
What this does not fix
The lockfile tarball hosts. Different code path, different constraint: an
ordinary
--frozen-lockfileinstall fetches the recorded URL without resolving,so pnpm cannot drop a URL it is unable to reconstruct — a frozen install would
have nothing to fetch. Ours is unreconstructible on the host alone
(
ms-feed-N.pkgs.visualstudio.comvs the registry host), so it is kept.That asymmetry is why #13728 could drop the URL for the bootstrap and not here.
scripts/strip-lockfile-hosts.mjsstays. Worth recording that it rests on solidground — the registry-derived URL genuinely resolves:
The one supported alternative,
trustLockfile, is worse on both axes: itkeeps the URLs (so every install still churns ~1700 lines) and gives up the
anti-tamper binding that #12134 added.
Stripping leaves no URL to tamper with at all.
Verification
9.0.verify:workspacepasses (14 assertions).pnpm v11.25.0inside.mise.lockcarries thelinux-x64andlinux-arm64checksums the Dockerbuild reads (
scripts/docker-test.mjscross-checks it againstpackageManager).One transition cost
For anyone not on mise: a local pnpm older than 11.21.0 now fails on entry to
this repo, because it tries to switch to 11.25.0 and hits the very bug above.
mise installresolves it. CI is unaffected —pnpm/action-setupinstalls thepinned version directly and never switches.
Do not jump to pnpm 12
It is the Rust rewrite, and there is an open issue about it refusing
integrity-less tarball resolutions — which is exactly what this shasum-only proxy
serves.