Commit 01aa5b9
authored
## Summary
- Scope only the `@pnpm` package to the npmjs registry so pnpm's
package-manager self-install resolves canonically, while every other
install keeps flowing through the corp artifactory mirror.
## Why
pnpm 11 hardened its package-manager self-install: when a repo pins
`packageManager` (e.g. `pnpm@10.23.0`), pnpm fetches it as `@pnpm/exe`
and asserts an **integrity-only** resolution. The artifactory npm mirror
rewrites the tarball host to its own domain, so the resolution carries a
`tarball` field alongside `integrity` and the assertion throws. The
result is that every `pnpm` invocation in such a repo fails with:
```
The packageManager dependency "@pnpm/exe@10.23.0" in pnpm-lock.yaml must use a registry package path and an integrity-only resolution
```
This is not the pnpm version, the pin format, or
`manage-package-manager-versions`. Each variable was isolated to confirm
the sole trigger is the mirror's rewritten tarball host. Pinning the
`@pnpm` scope to npmjs makes the package manager resolve from the
canonical registry, where the resolution is integrity-only and the
assertion passes.
## Test plan
- [x] `nixos-rebuild switch --flake .#wsl` applies cleanly
- [x] `pnpm --version` in a repo pinning `packageManager` returns the
pinned version instead of erroring
- [x] `pnpm install`, `pnpm lint`, and a Dockerfile `pnpm` build all run
- [x] Non-`@pnpm` installs still resolve through the artifactory mirror
1 parent 2dc6bf1 commit 01aa5b9
2 files changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
| 164 | + | |
164 | 165 | | |
165 | 166 | | |
166 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
| 119 | + | |
| 120 | + | |
119 | 121 | | |
120 | 122 | | |
121 | 123 | | |
| 124 | + | |
122 | 125 | | |
123 | 126 | | |
124 | 127 | | |
| |||
0 commit comments