Repository navigation
fix(lockfile): keep plain keys for packages of the default registry - #17581
Conversation
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Same-run regression checkHEAD and main are measured on the same runner. The tolerance is 5% of the main median or 2 ms, whichever is larger. A regression requires both the median slowdown and the gap between the fastest retained HEAD sample and slowest retained main sample to exceed this tolerance, after trimming up to 10% from each tail. Suspected regressions are rerun once with target order reversed and only fail if reproduced. This conservative noise guard is not a statistical confidence interval. Inconclusive rows do not fail the check. They remain visible for performance review. Bencher retains absolute minimum timings for historical tracking; historical alerts do not gate this PR. Sequential measurements can still be affected by runner drift.
Same-run syscall checkEach install runs 2 more times per revision, untimed, under
Integrated-Benchmark Report (Linux)Commit: Compared against main at: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm; the linked, injected, and Cargo workspace scenarios compare current Rust against main Rust. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ. Bencher tracks absolute minimum latency; PR regression checks compare HEAD and main samples from the same runner. Historical timing alerts do not gate PRs. Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.4631482386199997,
"stddev": 0.05762281091794236,
"median": 2.4460515978200004,
"user": 2.73884184,
"system": 2.0408853000000002,
"min": 2.38709607332,
"max": 2.56977384932
},
{
"command": "pacquet@main",
"mean": 2.53275024142,
"stddev": 0.11847911388848233,
"median": 2.4821544713200003,
"user": 2.7843918400000005,
"system": 1.9902849999999996,
"min": 2.41783531332,
"max": 2.71579196032
},
{
"command": "pnpr@HEAD",
"mean": 1.47369642012,
"stddev": 0.14916744726875572,
"median": 1.43654334032,
"user": 2.1416248399999995,
"system": 1.6861779,
"min": 1.29668449032,
"max": 1.7404435333200001
},
{
"command": "pnpr@main",
"mean": 1.4627478860199998,
"stddev": 0.09543543792681618,
"median": 1.46793492782,
"user": 1.7902895399999998,
"system": 1.4787611999999997,
"min": 1.3000577393200001,
"max": 1.60739018132
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.26446846184000006,
"stddev": 0.014264156590624784,
"median": 0.26573004774000003,
"user": 0.32056981999999995,
"system": 0.6499527599999999,
"min": 0.24354627774000004,
"max": 0.28417231274000004
},
{
"command": "pacquet@main",
"mean": 0.26379299734,
"stddev": 0.02135968323798895,
"median": 0.25911628524,
"user": 0.32078422,
"system": 0.6378933599999999,
"min": 0.23951323574000002,
"max": 0.31429422474
},
{
"command": "pnpr@HEAD",
"mean": 0.28648840444000007,
"stddev": 0.015168812029613505,
"median": 0.28469145674,
"user": 0.32175662,
"system": 0.64741586,
"min": 0.26706131674000005,
"max": 0.31493570974
},
{
"command": "pnpr@main",
"mean": 0.2981060410400001,
"stddev": 0.033233471258666644,
"median": 0.28921983524000006,
"user": 0.35369651999999996,
"system": 0.6464125599999998,
"min": 0.27153396574000005,
"max": 0.38303362774000005
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.011214358062845847,
"stddev": 0.0012969798384965595,
"median": 0.0109597193,
"user": 0.006421707588932807,
"system": 0.005879540474308298,
"min": 0.0092838033,
"max": 0.0183374313
},
{
"command": "pacquet@main",
"mean": 0.011906783932743368,
"stddev": 0.001551677464957005,
"median": 0.0116205408,
"user": 0.007290065663716812,
"system": 0.005707185486725664,
"min": 0.0092681133,
"max": 0.019386961299999998
},
{
"command": "pnpr@HEAD",
"mean": 0.011946435434259262,
"stddev": 0.0022352384232723387,
"median": 0.0113645893,
"user": 0.0072777103703703695,
"system": 0.005753384537037037,
"min": 0.0090827263,
"max": 0.022406992300000005
},
{
"command": "pnpr@main",
"mean": 0.013058306901562495,
"stddev": 0.003186905612155509,
"median": 0.0122468513,
"user": 0.007942406406249998,
"system": 0.006237588515624995,
"min": 0.0087452213,
"max": 0.0322023323
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.011548365123535916,
"stddev": 0.0010828519041729795,
"median": 0.011401456560000002,
"user": 0.006761885524861879,
"system": 0.005769817679558008,
"min": 0.009616154560000001,
"max": 0.01565637156
},
{
"command": "pacquet@main",
"mean": 0.01145086711339806,
"stddev": 0.0011197277995289505,
"median": 0.01132208156,
"user": 0.006544273203883493,
"system": 0.005979291262135922,
"min": 0.00928384456,
"max": 0.01455206856
},
{
"command": "pnpr@HEAD",
"mean": 0.010756982803589749,
"stddev": 0.0009684856106740792,
"median": 0.01074435106,
"user": 0.006519559487179483,
"system": 0.005207882051282054,
"min": 0.009036674560000001,
"max": 0.01331720756
},
{
"command": "pnpr@main",
"mean": 0.010892812559999998,
"stddev": 0.0010218330356333235,
"median": 0.01080026656,
"user": 0.006415440538116588,
"system": 0.005441247533632286,
"min": 0.009252674560000002,
"max": 0.014168239560000002
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.60126734708,
"stddev": 0.05917174252021605,
"median": 2.5941196359800003,
"user": 2.44571012,
"system": 1.7182648,
"min": 2.51163363348,
"max": 2.68657467148
},
{
"command": "pacquet@main",
"mean": 2.5275893206799998,
"stddev": 0.06371419866031577,
"median": 2.50295852148,
"user": 2.1832873200000003,
"system": 1.545055,
"min": 2.48034619248,
"max": 2.69156253548
},
{
"command": "pnpr@HEAD",
"mean": 1.52936952938,
"stddev": 0.1382759120234664,
"median": 1.49641424598,
"user": 1.7353937199999998,
"system": 1.4218605,
"min": 1.36830694548,
"max": 1.7045702494800001
},
{
"command": "pnpr@main",
"mean": 1.6217351718800004,
"stddev": 0.11458041630390599,
"median": 1.6176476539800002,
"user": 1.7146192199999999,
"system": 1.4741879,
"min": 1.4121390634800002,
"max": 1.7985307204800003
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.58419683174,
"stddev": 0.03959244123480617,
"median": 0.57737406924,
"user": 0.8808027199999999,
"system": 1.27607996,
"min": 0.54022445824,
"max": 0.67004146524
},
{
"command": "pacquet@main",
"mean": 0.57562589354,
"stddev": 0.018564102146500228,
"median": 0.57576574774,
"user": 0.8815213199999998,
"system": 1.2133799599999997,
"min": 0.54668271224,
"max": 0.61538821224
},
{
"command": "pnpr@HEAD",
"mean": 0.34151934064,
"stddev": 0.03322084107301151,
"median": 0.3319305342400001,
"user": 0.31730562000000007,
"system": 0.6634984599999999,
"min": 0.30403992024000004,
"max": 0.42196289624000005
},
{
"command": "pnpr@main",
"mean": 0.32876800054000005,
"stddev": 0.016927841381360324,
"median": 0.3265432542400001,
"user": 0.31629392,
"system": 0.63115046,
"min": 0.30545125724000005,
"max": 0.35762809524000005
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.82480024764,
"stddev": 0.02672170923375561,
"median": 1.82697988764,
"user": 1.25282338,
"system": 1.1522894,
"min": 1.77754834764,
"max": 1.87111635964
},
{
"command": "pacquet@main",
"mean": 1.84467689754,
"stddev": 0.03244513789057751,
"median": 1.84021224914,
"user": 1.3374748799999998,
"system": 1.0829808,
"min": 1.79472260564,
"max": 1.8914121026400001
},
{
"command": "pnpr@HEAD",
"mean": 0.38627382174,
"stddev": 0.011802358743625858,
"median": 0.38425287064,
"user": 0.35561107999999997,
"system": 0.7858537999999999,
"min": 0.37050761464000004,
"max": 0.40314319464000004
},
{
"command": "pnpr@main",
"mean": 0.37458997393999993,
"stddev": 0.01966046954506,
"median": 0.37161271614,
"user": 0.37518697999999995,
"system": 0.7141263999999999,
"min": 0.34610217764,
"max": 0.40103260164000004
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.36970702942,
"stddev": 0.04745415966094326,
"median": 0.38157783422,
"user": 0.4027662199999999,
"system": 0.28494217999999993,
"min": 0.29327652722,
"max": 0.44874244322
},
{
"command": "pacquet@main",
"mean": 0.30653164222,
"stddev": 0.027197528848659763,
"median": 0.30294601622,
"user": 0.3339738199999999,
"system": 0.21668298,
"min": 0.26973112422,
"max": 0.36976680722
},
{
"command": "pnpr@HEAD",
"mean": 0.10199510062740741,
"stddev": 0.005118197611018312,
"median": 0.10170308822,
"user": 0.04513316444444445,
"system": 0.019818117037037036,
"min": 0.09249965922,
"max": 0.11514872122
},
{
"command": "pnpr@main",
"mean": 0.09608802776838711,
"stddev": 0.0034511460757091373,
"median": 0.09647514322,
"user": 0.03959384903225806,
"system": 0.01757191612903226,
"min": 0.09076416822000001,
"max": 0.10233919922000001
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24143866704000003,
"stddev": 0.01437777942595992,
"median": 0.23920422704,
"user": 0.2717535911111111,
"system": 0.06588672222222221,
"min": 0.21686260604000002,
"max": 0.26436789404000005
},
{
"command": "pacquet@main",
"mean": 0.24995473215111114,
"stddev": 0.014950488448026173,
"median": 0.25098602004000004,
"user": 0.2870569244444444,
"system": 0.06180538888888888,
"min": 0.22089573004000002,
"max": 0.27085742604
},
{
"command": "pnpm@HEAD",
"mean": 4.57129622304,
"stddev": 0.15616668462827019,
"median": 4.56422484504,
"user": 7.211568368888887,
"system": 0.42096116666666666,
"min": 4.323981020040001,
"max": 4.789607510040001
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.0984518405925,
"stddev": 0.009714245071197416,
"median": 0.09457462228000002,
"user": 0.08630705375000003,
"system": 0.0675375025,
"min": 0.08880127928,
"max": 0.13378919328
},
{
"command": "pacquet@main",
"mean": 0.10284403544666666,
"stddev": 0.013397144792469977,
"median": 0.09819970028000002,
"user": 0.10464356,
"system": 0.05817350666666665,
"min": 0.09141096728,
"max": 0.15118813728
}
]
}Scenario: Isolated linker: injected workspace repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.11187976933846153,
"stddev": 0.009265922514646798,
"median": 0.11293821230000001,
"user": 0.041791499999999995,
"system": 0.07886228615384615,
"min": 0.0951882913,
"max": 0.12942630330000002
},
{
"command": "pacquet@main",
"mean": 0.10508320197857146,
"stddev": 0.007764284091830943,
"median": 0.10379489880000001,
"user": 0.035578107142857134,
"system": 0.07771051142857142,
"min": 0.09469415230000001,
"max": 0.12325697430000002
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.66603457504,
"stddev": 0.12981018790266682,
"median": 4.615315268640001,
"user": 2.65085096,
"system": 1.8758203999999998,
"min": 4.51908739964,
"max": 4.9040000386400004
},
{
"command": "pacquet@main",
"mean": 4.58198626234,
"stddev": 0.1682368024082413,
"median": 4.508614766640001,
"user": 2.45483196,
"system": 1.7802747,
"min": 4.43313828864,
"max": 4.97724360664
},
{
"command": "pnpr@HEAD",
"mean": 3.6567816298399998,
"stddev": 0.09044696687184013,
"median": 3.64734169664,
"user": 2.3885006600000005,
"system": 1.6941204999999997,
"min": 3.54763316864,
"max": 3.81015511164
},
{
"command": "pnpr@main",
"mean": 3.64507355784,
"stddev": 0.12018667058994434,
"median": 3.60764443414,
"user": 2.3655105599999997,
"system": 1.705716,
"min": 3.54571062164,
"max": 3.86633717064
}
]
}Scenario: GVS linker: fresh restore, hot cache + hot storeSame install as the isolated fresh-restore hot/hot scenario, into the shared virtual store, the layout pnpm 12 installs into by default. Scenarios run on separate machines, so compare main and branch within each table.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.1296532686764706,
"stddev": 0.010351824020031115,
"median": 0.13058525550000002,
"user": 0.1585662176470588,
"system": 0.13804554941176472,
"min": 0.11521700550000001,
"max": 0.15020251850000002
},
{
"command": "pacquet@main",
"mean": 0.12771526392105265,
"stddev": 0.0069824272980250875,
"median": 0.12708430250000002,
"user": 0.16912804736842102,
"system": 0.13092101999999997,
"min": 0.11736238650000001,
"max": 0.1423558635
},
{
"command": "pnpr@HEAD",
"mean": 0.14126965333333333,
"stddev": 0.0054217864676394745,
"median": 0.14183325350000003,
"user": 0.17410832222222222,
"system": 0.13466596444444445,
"min": 0.13103253650000002,
"max": 0.14934155750000003
},
{
"command": "pnpr@main",
"mean": 0.1442086615625,
"stddev": 0.008448726987924714,
"median": 0.14259009850000004,
"user": 0.18211609999999998,
"system": 0.13303664499999998,
"min": 0.13435304850000002,
"max": 0.1608352255
}
]
}Scenario: Store only: unlocked direct deps, cold cache + hot storeStore-only install (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.32448427098,
"stddev": 0.04881722922041831,
"median": 1.3019080120800002,
"user": 0.6986461999999998,
"system": 0.27747564,
"min": 1.2770988030800001,
"max": 1.39878144708
},
{
"command": "pacquet@main",
"mean": 1.31727427248,
"stddev": 0.043310695264708585,
"median": 1.3109357025800001,
"user": 0.6607882,
"system": 0.22873923999999998,
"min": 1.26135167808,
"max": 1.39743811608
}
]
}Scenario: Cargo: repeat install, hot cache + hot storeFrozen repeat install of a Cargo workspace (
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.026142353821818176,
"stddev": 0.0005180078089322971,
"median": 0.02599976584,
"user": 0.018977252727272735,
"system": 0.014254266545454544,
"min": 0.02541431134,
"max": 0.028584864340000002
},
{
"command": "pacquet@main",
"mean": 0.025832609961621632,
"stddev": 0.0007526569036329427,
"median": 0.02566480334,
"user": 0.01942905657657658,
"system": 0.013525123963963971,
"min": 0.02508633234,
"max": 0.03076807734
}
]
} |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #17581 +/- ##
==========================================
+ Coverage 92.75% 92.78% +0.03%
==========================================
Files 2033 2048 +15
Lines 262192 264029 +1837
==========================================
+ Hits 243192 244990 +1798
- Misses 19000 19039 +39 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Nothing new recorded
TS CI / Test / ubuntu (24.0.0, 2) / Node 24 / chunk 2/3 · nothing new
How to read thisbash › curl ← ancestry as captured, then the process that acted └─ example[.]com ← what it reached Recorded by Garnet · Add it to your CI ↗ |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
🟡 Changes recommended
The changeset omits an @pnpm/pnpr patch target, leaving the server-side lockfile-key fix unrecorded for pnpr’s separate release group.
1 open issue
1 file not reviewed
pnpm-lock.yaml: Generated file
What changed in this PR
This PR restores plain lockfile keys when projects redirect built-in registry aliases to a mirror, addressing #17575 in both CLI implementations.
Changes:
- Excludes built-in alias names from declared prefixes without changing alias routing.
- Adds regression coverage for mirror configuration and re-keying during resolving installs.
- Updates documentation, runtime dependency metadata, and release notes.
| File | Description |
|---|---|
pnpm11/pnpm/test/install/registryPrefixKeys.ts |
Tests mirror configuration, hooks, and re-keying. |
pnpm11/docs/settings/dependency-resolution.md |
Documents built-in alias key behavior. |
pnpm11/config/pick-registry-for-package/test/declaredRegistryPrefix.test.ts |
Tests built-in alias exclusion and custom-prefix selection. |
pnpm11/config/pick-registry-for-package/src/index.ts |
Excludes built-in aliases from declared-prefix selection. |
pnpm11/config/pick-registry-for-package/package.json |
Makes constants a runtime dependency. |
pnpm/docs/settings/dependency-resolution.md |
Documents matching behavior for the Rust CLI. |
pnpm/crates/config/src/tests/declared_registry_prefixes.rs |
Tests alias routing and declared-prefix filtering. |
pnpm/crates/config/src/tests.rs |
Registers the new configuration tests. |
pnpm/crates/config/src/registry_options.rs |
Filters built-in aliases from declared prefixes. |
pnpm/crates/cli/tests/suite/registry_prefix_keys.rs |
Tests plain keys and resolving-install recovery. |
pnpm-lock.yaml |
Records the constants dependency move. |
.changeset/17575-builtin-alias-keeps-plain-keys.md |
Adds release notes for the lockfile fix. |
Review effort: Balanced
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
…ointed Since pnpm#17259, a prefix the project sets qualifies every lockfile key of its registry. The built-in npmjs and gh aliases counted too. A project that sets registry to an npm mirror and points npmjs at the same mirror, so npmjs: specifiers don't bypass it, therefore had every package re-keyed as `<name>@npmjs:<version>`. The built-in alias names are now left out of the declared prefixes in both stacks. Setting one re-points the alias and nothing else: like an alias that is not set, it qualifies only the specifiers that spell it. A project that wants a registry's keys qualified declares a prefix that is not built in. A lockfile a 12.16 install already re-keyed this way is re-keyed to plain by the reuse gate on the next install that resolves. The key alone cannot tell such an entry from one an npmjs: specifier minted, so the stale-key check does not flag it, and an install with nothing to resolve keeps it. Closes pnpm#17575. Co-Authored-By: Claude Opus 5.5 <[email protected]>
93b9842 to
b8da832
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
Code Review by Qodo
1. Resolver docs preserve old keying
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
@coderabbitai review |
|
@coderabbitai approve |
Action not completed
|
Action performed
|
Action performed
|
…exception Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Code review by qodo was updated up to the latest commit 87ebe76 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR.
|
|
Status on 87ebe76. This replaces my earlier comment, which described the built-in-alias approach this PR no longer takes.
No remaining work within scope. The PR stays ready for review. Written by an agent (Claude Code, claude-opus-5-5). |
pnpm#17581 made the declared-prefix lookup take the default registry, whose packages keep plain keys. Pass it from pack in both stacks.
Since pnpm#17581 a prefix that names the default registry qualifies nothing, so the publish-and-install test pointed both at the hosted registry and published a plain dependency. The siblings now publish through publishConfig.registry, and the default registry is unreachable, so a plain resolution fails.
pnpm#17581 made the declared-prefix lookup take the default registry, whose packages keep plain keys. Pass it from pack in both stacks.
Since pnpm#17581 a prefix that names the default registry qualifies nothing, so the publish-and-install test pointed both at the hosted registry and published a plain dependency. The siblings now publish through publishConfig.registry, and the default registry is unreachable, so a plain resolution fails.
pnpm#17581 made the declared-prefix lookup take the default registry, whose packages keep plain keys. Pass it from pack in both stacks.
Since pnpm#17581 a prefix that names the default registry qualifies nothing, so the publish-and-install test pointed both at the hosted registry and published a plain dependency. The siblings now publish through publishConfig.registry, and the default registry is unreachable, so a plain resolution fails.
pnpm#17581 made the declared-prefix lookup take the default registry, whose packages keep plain keys. Pass it from pack in both stacks.
Since pnpm#17581 a prefix that names the default registry qualifies nothing, so the publish-and-install test pointed both at the hosted registry and published a plain dependency. The siblings now publish through publishConfig.registry, and the default registry is unreachable, so a plain resolution fails.

Summary
Closes #17575.
A project that installs through a mirror of the npm registry, such as Verdaccio or Artifactory, sets
registryto the mirror. It often points the built-innpmjsalias at the mirror too, so thatnpmjs:specifiers don't bypass it.Since #17259, any prefix the project sets qualifies every lockfile key of its registry. That mirror setup therefore re-keys every package in the lockfile as
<name>@npmjs:<version>. The issue's minimal repro restates the built-in URL and has the same effect:This PR implements option 2 from the issue: packages from the default registry keep plain keys.
npmjs,ghor a custom one).<prefix>:specifier that resolves from the default registry gets a plain key when a plain range of the same name routes there too. It shares the plain entry, sofoo@^1andnpmjs:foo@^1record onepackages:entry and one copy innode_modules/.pnpm.gh:keys staygh:, and a declared prefix still qualifies every key of its registry.defaultRegistry(the normalized default registry URL) next toregistryPrefixes, in both CLIs, because keys now depend on it. A state an older pnpm wrote has the prefixes without it, so a project that declares prefixes skips the repeat-install fast path once after upgrading and gets re-keyed. Changingregistrywhile prefixes are declared is aregistryPrefixesdrift too.An earlier revision of this PR special-cased the built-in alias names instead. That fixed the repro, but a dependency written as
npmjs:foothen got a second entry beside the plainfooentry from the same registry. A custom prefix pointed at the default registry still re-keyed everything.This reverses a documented choice of #17259: the docs said "one the default registry serves when the prefix points at it" is keyed with the prefix.
Changes
DeclaredRegistryPrefixestakes the default registry and gainsalias_key_prefix. The named-registry resolver,RegistryContext::rekeyed, and the lockfile-reuse range check use it.check_lockfile_registry_keysno longer returns early without a declared prefix. The revision-refresh pin compares registries instead of key prefixes, since a plain key can now stand for an alias-resolved package. pnpr gets the rule through the sharedConfig.pickDeclaredRegistryPrefixtakes the registries and skips the default registry. A newpickAliasKeyPrefixmirrorsalias_key_prefix.rekeyDepPathre-keys a qualified key to plain, andfindOutdatedRegistryKeychecks qualified keys without a declared prefix.defaultRegistrysetting, recorded, compared, and reset together withregistryPrefixes.Squash Commit Body
Checklist
already linked to it solves it.
are implemented in every affected version.
pnpm changeset) if this PR changes any publishedpackage. Keep it short and written for pnpm users — it becomes a release note.
Written by an agent (Claude Code, claude-opus-5-5).
Summary by CodeRabbit