Skip to content

chore(pnpm): move to 11.25.0 and retire the packageManager workaround - #75

Merged
stuffbucket merged 1 commit into
mainfrom
chore/pnpm-11-25
Sep 7, 2026
Merged

stuffbucket merged 1 commit into
mainfrom
chore/pnpm-11-25

Conversation

@stuffbucket

Copy link
Copy Markdown
Owner

Why the pin existed

mise.toml 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.
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 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 asserts a constraint that has been
fixed.

What this does not fix

The lockfile tarball hosts. Different code path, different constraint: an
ordinary --frozen-lockfile install 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.com vs 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.mjs stays. Worth recording that it rests on solid
ground — the registry-derived URL genuinely resolves:

https://packagefeedproxy.microsoft.io/npm/wrappy/-/wrappy-1.0.2.tgz
  → 303 → signed blob → 1676 bytes, sha1 b5243d8f… (matches the advertised shasum)

The one supported alternative, trustLockfile, is worse on both axes: it
keeps 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

  • Lockfile byte-identical under 11.25.0; format version unchanged at 9.0.
  • verify:workspace passes (14 assertions).
  • Container suite 15/15, with pnpm v11.25.0 inside.
  • mise.lock carries the linux-x64 and linux-arm64 checksums the Docker
    build reads (scripts/docker-test.mjs cross-checks it against
    packageManager).

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 install resolves it. CI is unaffected — pnpm/action-setup installs the
pinned 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.

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.
@stuffbucket
stuffbucket merged commit e292a56 into main Sep 7, 2026
6 checks passed
@stuffbucket
stuffbucket deleted the chore/pnpm-11-25 branch September 8, 2026 20:12
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