Repository navigation
Conversation
`--frozen-lockfile` rejected a lockfile the same pnpm had just written whenever `packageExtensions` added a peer dependency to a workspace project: `autoInstallPeers` records that peer as a dependency of the importer, but the freshness gates compared the entry against the `package.json` on disk, which declares no such peer, and reported it as a dependency that had been removed. The install already re-reads the project manifests through the pnpmfile's `readPackage` before the gates, for exactly this reason. `packageExtensions` runs ahead of that hook in the resolver, so apply it in the same place and in the same order — pnpm's built-in compatibility set, then the user's — leaving the gates comparing against the manifests the lockfile was written from. The extended manifests are built only when an extension applies, so a workspace that configures none keeps using what it read from disk rather than a set of identical clones. A selector that fails to parse now surfaces from the gates instead of the resolver, which is the same error either way. TypeScript is unaffected: `getContext` applies the whole `readPackage` hook — `packageExtensions` included — to the project manifests, so `satisfiesPackageManifest` already compares against the extended shape. Confirmed against the reporter's repro: the TypeScript CLI accepts the lockfile pacquet rejected. Closes #13836. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe install pipeline now applies compatibility and configured ChangesPackage extension freshness handling
Estimated code review effort: 3 (Moderate) | ~20 minutes Assessment against linked issues
Sequence Diagram(s)sequenceDiagram
participant ProjectManifest
participant PackageExtender
participant InstallFreshness
ProjectManifest->>PackageExtender: provide manifest
PackageExtender-->>ProjectManifest: apply injected peer dependency
ProjectManifest->>InstallFreshness: provide extended manifest
InstallFreshness-->>ProjectManifest: accept generated frozen lockfile
Possibly related PRs
Suggested labels: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoFix frozen-lockfile freshness checks to honor packageExtensions
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (2): Last reviewed commit: "perf(package-manager): clone only the ma..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@pnpm/crates/package-manager/src/install/run.rs`:
- Around line 1028-1051: The manifest extension flow around compat_extender and
extender currently clones every project manifest even when neither extension
changes it. Track whether either extension applies to each project, retain only
changed cloned manifests, and return the original project_manifests collection
unchanged when no project is modified; preserve the existing empty fast path
when both extenders are absent.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 06ee7d42-c78b-498f-8f83-c5221d7b6739
📒 Files selected for processing (4)
.changeset/frozen-lockfile-package-extensions-peer.mdpnpm/crates/cli/tests/suite/install.rspnpm/crates/package-manager/src/install.rspnpm/crates/package-manager/src/install/run.rs
Code Review by Qodo
1. Missing mirrored TS parity test
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Micro-Benchmark ResultsLinux |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13850 +/- ##
==========================================
+ Coverage 88.23% 88.25% +0.02%
==========================================
Files 627 627
Lines 103279 103384 +105
==========================================
+ Hits 91126 91246 +120
+ Misses 12153 12138 -15 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Regular scenarios report direct and pnpr installs. The peer-heavy resolver scenario compares current Rust, main Rust, and TypeScript pnpm. Bencher consumes pacquet@HEAD and pnpr@HEAD. The tables below show mean ± σ; Bencher thresholds on the minimum latency, which is far less perturbed by shared-runner contention (noise only adds time). Scenario: Isolated linker: fresh restore, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.6257255994400004,
"stddev": 0.15589225235444343,
"median": 2.60752657664,
"user": 2.13091604,
"system": 1.67482026,
"min": 2.4465001616400004,
"max": 2.8475425426400003,
"times": [
2.46596060764,
2.4465001616400004,
2.8475425426400003,
2.8195128356400003,
2.4876732126400003,
2.62437056164,
2.8321885956400004,
2.6227234156400003,
2.5184543236400003,
2.59232973764
]
},
{
"command": "pacquet@main",
"mean": 2.59504212234,
"stddev": 0.11361202368966063,
"median": 2.58109371714,
"user": 1.8843794399999996,
"system": 1.5106384599999998,
"min": 2.46230625364,
"max": 2.7880909236400004,
"times": [
2.46230625364,
2.53830823064,
2.4911018686400004,
2.7880909236400004,
2.46947486564,
2.75626595764,
2.59224265364,
2.65829539064,
2.56994478064,
2.6243902986400003
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6286757320400003,
"stddev": 0.1547800946227011,
"median": 1.6369345151399999,
"user": 1.42817304,
"system": 1.44222936,
"min": 1.38257796664,
"max": 1.87110556664,
"times": [
1.73971602864,
1.73738637164,
1.63772145864,
1.42267546064,
1.57234851664,
1.75742344764,
1.38257796664,
1.6361475716399998,
1.87110556664,
1.5296549316399999
]
},
{
"command": "pnpr@main",
"mean": 1.6663049944400001,
"stddev": 0.15898961512863768,
"median": 1.7137525306399999,
"user": 1.5683040400000001,
"system": 1.6206314599999998,
"min": 1.46715679964,
"max": 1.89599773864,
"times": [
1.48627729164,
1.7910844966400001,
1.89599773864,
1.46715679964,
1.83661662264,
1.72936000764,
1.47325090864,
1.72197109464,
1.5558010176400001,
1.70553396664
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.34019195502,
"stddev": 0.014288544676688305,
"median": 0.34366706522,
"user": 0.31723914,
"system": 0.6836594199999999,
"min": 0.30985944422,
"max": 0.35475540522,
"times": [
0.35165805522,
0.35241359422,
0.34388918522,
0.33563398722,
0.34195158022,
0.34344494522,
0.34647526822,
0.30985944422,
0.35475540522,
0.32183808522
]
},
{
"command": "pacquet@main",
"mean": 0.27277163352,
"stddev": 0.008983780884572938,
"median": 0.27409888021999995,
"user": 0.24066944,
"system": 0.5601803200000001,
"min": 0.26094873622,
"max": 0.28647137422,
"times": [
0.27798875522,
0.27286190522,
0.26720940122,
0.28647137422,
0.26094873622,
0.27533585522,
0.26488491322,
0.27616921222,
0.26151298322,
0.28433319922
]
},
{
"command": "pnpr@HEAD",
"mean": 0.28719643272,
"stddev": 0.010345290283815627,
"median": 0.28676459322000003,
"user": 0.24627243999999998,
"system": 0.55414332,
"min": 0.27353263422,
"max": 0.30666954822,
"times": [
0.29212402822,
0.27833101322,
0.28843804422,
0.28175283722,
0.28509114222,
0.27353263422,
0.30666954822,
0.28989353922,
0.27688421522,
0.29924732522
]
},
{
"command": "pnpr@main",
"mean": 0.30218034692,
"stddev": 0.03776750859285164,
"median": 0.28560968921999996,
"user": 0.2730707399999999,
"system": 0.5695054199999999,
"min": 0.27569139822,
"max": 0.38794601022,
"times": [
0.38794601022,
0.35515291822,
0.28434711522,
0.28365341222,
0.29695803422,
0.28687226322,
0.28384163822,
0.28751255422,
0.27569139822,
0.27982812522
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.7311275219,
"stddev": 0.016642992100067335,
"median": 2.7376014103,
"user": 1.6703283600000003,
"system": 1.3558878799999996,
"min": 2.7012078098,
"max": 2.7508781438,
"times": [
2.7251593948,
2.7012078098,
2.7413539148,
2.7408239018,
2.7154240868,
2.7484589678,
2.7392553038,
2.7359475168,
2.7508781438,
2.7127661788
]
},
{
"command": "pacquet@main",
"mean": 2.7269120117,
"stddev": 0.012963374069052371,
"median": 2.7309387498,
"user": 1.6128831600000002,
"system": 1.38087568,
"min": 2.7060604508,
"max": 2.7500119568,
"times": [
2.7130935478,
2.7320895577999997,
2.7354595038,
2.7500119568,
2.7223866387999998,
2.7299937518,
2.7336200128,
2.7145209488,
2.7318837478,
2.7060604508
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5630887770000002,
"stddev": 0.0789355982879154,
"median": 1.5472307063000001,
"user": 1.1448982600000002,
"system": 1.2295848800000002,
"min": 1.4638223208,
"max": 1.7144599288,
"times": [
1.7144599288,
1.5258238648000002,
1.5342426028000002,
1.6109784948,
1.6013903938000003,
1.4638223208,
1.5602188098,
1.4839531058000002,
1.6421957368,
1.4938025118
]
},
{
"command": "pnpr@main",
"mean": 1.6503916488,
"stddev": 0.16653477345689716,
"median": 1.6847600268000003,
"user": 1.13325846,
"system": 1.25107248,
"min": 1.4362372298000001,
"max": 1.8796826438,
"times": [
1.4362372298000001,
1.4454265248,
1.7845118438,
1.4727750678,
1.8796826438,
1.8266790928000003,
1.6411686338000002,
1.7501661928000003,
1.5389178388,
1.7283514198000003
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5591370905800002,
"stddev": 0.044046613266940225,
"median": 0.5592116094800001,
"user": 0.7726548,
"system": 0.8704348599999999,
"min": 0.46682623348,
"max": 0.6287257634800001,
"times": [
0.46682623348,
0.5377812784800001,
0.5861648594800001,
0.5590752364800001,
0.5297405954800001,
0.5469309104800001,
0.5787468144800001,
0.5593479824800001,
0.6287257634800001,
0.59803123148
]
},
{
"command": "pacquet@main",
"mean": 0.57636417568,
"stddev": 0.0557958273170089,
"median": 0.5980608384800001,
"user": 0.816241,
"system": 0.90463226,
"min": 0.46800338248,
"max": 0.63388119748,
"times": [
0.46800338248,
0.49362110848,
0.5669312754800001,
0.5585267444800001,
0.60825715948,
0.6124521154800001,
0.5964515734800001,
0.62584709648,
0.59967010348,
0.63388119748
]
},
{
"command": "pnpr@HEAD",
"mean": 0.40188006628000006,
"stddev": 0.0161142549971788,
"median": 0.40331483248,
"user": 0.31879099999999994,
"system": 0.7066491599999999,
"min": 0.37865618548,
"max": 0.43961949248,
"times": [
0.38997316648,
0.40487286548,
0.38842710148,
0.37865618548,
0.40359645048,
0.43961949248,
0.40477727448,
0.40658673848,
0.40303321448,
0.39925817348
]
},
{
"command": "pnpr@main",
"mean": 0.40803578838000004,
"stddev": 0.013609627299281557,
"median": 0.40806021098,
"user": 0.30111509999999997,
"system": 0.73084006,
"min": 0.38659699948,
"max": 0.42793240148,
"times": [
0.42793240148,
0.40492876148,
0.39755351748,
0.38659699948,
0.39103252048,
0.41950485748,
0.42355204448,
0.41313635948,
0.40655236348,
0.40956805848
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.9538588256799998,
"stddev": 0.03039744251594726,
"median": 1.9531587412800002,
"user": 0.8996566999999999,
"system": 0.8647549,
"min": 1.90786397828,
"max": 2.01070366128,
"times": [
1.98282438528,
1.9465460392800003,
2.01070366128,
1.9232364502800001,
1.95976588128,
1.9735303932800001,
1.9574634852800001,
1.92779998528,
1.94885399728,
1.90786397828
]
},
{
"command": "pacquet@main",
"mean": 1.9246296819800002,
"stddev": 0.01430895166291605,
"median": 1.92304328078,
"user": 0.8610998999999999,
"system": 0.8423923999999999,
"min": 1.90612840428,
"max": 1.9462149642800002,
"times": [
1.94068388028,
1.9128205552800002,
1.9191883622800001,
1.90711257628,
1.90612840428,
1.94085325028,
1.9462149642800002,
1.92664584128,
1.9194407202800001,
1.92720826528
]
},
{
"command": "pnpr@HEAD",
"mean": 0.33359507748,
"stddev": 0.011309302616958615,
"median": 0.33716744178,
"user": 0.2369608,
"system": 0.5859044999999999,
"min": 0.31164789128,
"max": 0.34764673828,
"times": [
0.34108189828,
0.32981561328,
0.32048126328,
0.31164789128,
0.32664687828,
0.34764673828,
0.33935031128,
0.34228320028,
0.33498457228,
0.34201240828
]
},
{
"command": "pnpr@main",
"mean": 0.33344197878,
"stddev": 0.0062833436483991385,
"median": 0.33155646178,
"user": 0.24437879999999995,
"system": 0.5710715,
"min": 0.32469076728,
"max": 0.34446322628,
"times": [
0.33173261928,
0.34446322628,
0.32785429228,
0.32469076728,
0.33138030428,
0.33195722428,
0.33015934328,
0.33942179628,
0.34152179028,
0.33123842428
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24510141091666668,
"stddev": 0.018010550963528323,
"median": 0.24160970850000002,
"user": 0.19044969666666667,
"system": 0.05918092666666666,
"min": 0.22267711,
"max": 0.279475548,
"times": [
0.242399052,
0.279475548,
0.26726335300000004,
0.23972821,
0.233328292,
0.246351169,
0.240820365,
0.24347635,
0.22267711,
0.26916299800000004,
0.22328988,
0.233244604
]
},
{
"command": "pacquet@main",
"mean": 0.2292822144166667,
"stddev": 0.01076727923669155,
"median": 0.22982933700000002,
"user": 0.17803778,
"system": 0.06775592666666666,
"min": 0.207407893,
"max": 0.244689977,
"times": [
0.228138422,
0.239423784,
0.222723338,
0.219242974,
0.207407893,
0.21951606,
0.23097441900000001,
0.239237582,
0.239674618,
0.228684255,
0.244689977,
0.231673251
]
},
{
"command": "pnpr@HEAD",
"mean": 0.09320344882758622,
"stddev": 0.003042218372419225,
"median": 0.09251686900000002,
"user": 0.024957590344827595,
"system": 0.011052191034482756,
"min": 0.090191691,
"max": 0.10449420000000001,
"times": [
0.09615577500000001,
0.10449420000000001,
0.09799334000000001,
0.095269847,
0.09101284500000001,
0.09251686900000002,
0.09031356100000001,
0.092128545,
0.090598862,
0.09296039900000001,
0.090191691,
0.09334864400000001,
0.091651332,
0.09062844700000001,
0.093787323,
0.09140379400000001,
0.096625182,
0.09547730000000001,
0.09019373500000001,
0.09353420500000001,
0.090454478,
0.09080254700000001,
0.09288226100000001,
0.09210040300000001,
0.09158311300000001,
0.095865055,
0.09281061600000001,
0.094008432,
0.092107215
]
},
{
"command": "pnpr@main",
"mean": 0.09130373125806454,
"stddev": 0.0032169234558714023,
"median": 0.09127162400000001,
"user": 0.022112731612903228,
"system": 0.011860694838709676,
"min": 0.086483135,
"max": 0.09779230000000001,
"times": [
0.092019369,
0.09411042600000001,
0.09580787600000001,
0.09527932600000001,
0.09350902600000001,
0.09502516600000001,
0.088423816,
0.087577255,
0.088044168,
0.091232269,
0.08963821400000001,
0.097312692,
0.09779230000000001,
0.095600394,
0.09127162400000001,
0.09162631500000001,
0.088988886,
0.09317903300000001,
0.09132947300000001,
0.09089361900000001,
0.08710483100000001,
0.08732149100000001,
0.09342855400000001,
0.09241292400000001,
0.09030636800000001,
0.091470401,
0.08941639400000001,
0.08971846500000001,
0.086920542,
0.086483135,
0.08717131700000001
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6003655093,
"stddev": 0.0979604117161351,
"median": 0.6010962943,
"user": 0.5613748533333334,
"system": 0.13022939777777776,
"min": 0.47404406330000004,
"max": 0.7987535833,
"times": [
0.6838827383,
0.7987535833,
0.5146036083000001,
0.6271640713000001,
0.5510891253000001,
0.47404406330000004,
0.5387626843000001,
0.6010962943,
0.6138934153000001
]
},
{
"command": "pacquet@main",
"mean": 0.5514683052999999,
"stddev": 0.06911478469415945,
"median": 0.5639095503,
"user": 0.5255885199999999,
"system": 0.11390250888888888,
"min": 0.44345349930000005,
"max": 0.6474697883,
"times": [
0.6117745563,
0.6474697883,
0.6091625953,
0.5016545703,
0.5826931983,
0.44345349930000005,
0.4717935963,
0.5313033933,
0.5639095503
]
},
{
"command": "pnpm@HEAD",
"mean": 3.093051965966667,
"stddev": 0.10579898359791727,
"median": 3.0477680903,
"user": 4.735694519999999,
"system": 0.2651098422222222,
"min": 2.9756952143,
"max": 3.2959806943,
"times": [
3.0045995983,
3.1083405973,
3.1254569492999997,
3.2959806943,
2.9756952143,
3.0383878443,
3.0233353362999997,
3.2179033693,
3.0477680903
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.554897431540001,
"stddev": 0.1679069263520799,
"median": 4.45915362024,
"user": 1.9063200999999999,
"system": 1.40716468,
"min": 4.43346922424,
"max": 4.89164868924,
"times": [
4.4515871452399995,
4.45529115224,
4.71102776124,
4.46301608824,
4.43401357624,
4.43784162924,
4.89164868924,
4.75974470824,
4.5113343412399995,
4.43346922424
]
},
{
"command": "pacquet@main",
"mean": 4.539361871240001,
"stddev": 0.13809913487344797,
"median": 4.46210336374,
"user": 1.8516327000000001,
"system": 1.48383148,
"min": 4.44291115824,
"max": 4.87683319324,
"times": [
4.44291115824,
4.61287067724,
4.60194517824,
4.44957540624,
4.45169530724,
4.44700024524,
4.87683319324,
4.44997232724,
4.47251142024,
4.58830379924
]
},
{
"command": "pnpr@HEAD",
"mean": 3.5478306135399995,
"stddev": 0.10433473463679863,
"median": 3.50246461624,
"user": 1.2848004,
"system": 1.28058768,
"min": 3.4615789482399997,
"max": 3.77142946924,
"times": [
3.5438073282399998,
3.46743047824,
3.4615789482399997,
3.4783307522399998,
3.48183890824,
3.48615525624,
3.68549904724,
3.5834619712399998,
3.51877397624,
3.77142946924
]
},
{
"command": "pnpr@main",
"mean": 3.50331334014,
"stddev": 0.054479096065994125,
"median": 3.48193944374,
"user": 1.2965801,
"system": 1.28505848,
"min": 3.45986474424,
"max": 3.63725702624,
"times": [
3.48245783924,
3.55743362724,
3.63725702624,
3.47015130724,
3.47406786624,
3.50945928324,
3.48206658924,
3.45986474424,
3.48181229824,
3.47856282024
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13850 |
| Testbed | pnpr |
⚠️ WARNING: No Threshold found!Without a Threshold, no Alerts will ever be generated.
Click here to create a new Threshold
For more information, see the Threshold documentation.
To only post results if a Threshold exists, set the--ci-only-thresholdsflag.
Click to view all benchmark results
| Benchmark | Latency | milliseconds (ms) |
|---|---|---|
| isolated-linker.fresh-install.cold-cache.cold-store | 📈 view plot | 1,463.82 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 311.65 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 378.66 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 90.19 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,382.58 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,461.58 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 273.53 ms |
Review finding on #13850, and a correction to what I claimed there: the early return guarded on both extenders being absent, but the built-in compatibility set is present on every install that does not set `ignoreCompatibilityDb`, so the guard almost never fired and every workspace manifest was cloned on every install. `apply_to_arc` already solved this on the resolve hot path — name bucket plus per-entry range, then clone only on a hit. Extract that pre-check as `PackageExtender::matches`, express `apply_to_arc` in terms of it, and ask it before extending the freshness manifests. A workspace project is rarely named by an extension, so the usual answer is "none" and the caller keeps the manifests it read from disk. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Code review by qodo was updated up to the latest commit 07fa7af |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
Closes #13836.
--frozen-lockfilerejected a lockfile the same pnpm had just written, wheneverpackageExtensionsadded a peer dependency to a workspace project.autoInstallPeersrecords that peer as a dependency of the importer, but the freshness gates compared the entry against thepackage.jsonon disk — which declares no such peer — and reported it as1 dependency was removed.pacquet-only, and the reporter's guess at the cause was right. I ran their repro against both stacks on
main(7bee7dac): the TypeScript CLI accepts the lockfile that pacquet rejects.getContextapplies the wholereadPackagehook —packageExtensionsincluded — to the project manifests, sosatisfiesPackageManifestalready compares against the extended shape.The fix follows a path the install already has.
run.rsre-reads the project manifests through the pnpmfile'sreadPackagebefore the gates, for exactly this reason — the gates have to see what the lockfile was written from.packageExtensionsruns ahead of that hook in the resolver (packageExtensions→readPackage→overrides), so this applies it in the same place and the same order: pnpm's built-in compatibility set, then the user's.Two details worth a reviewer's eye:
ignoreCompatibilityDbis set, so that guard almost never fired and every manifest was cloned on every install (caught in review).PackageExtender::matchesnow answers the name-bucket-plus-range question up front; it is the same pre-checkapply_to_arcalready used on the resolve hot path, extracted so both call sites share it. A workspace project is rarely named by an extension, so the usual answer is "none" and the caller keeps the manifests it read from disk.packageExtensionsselector that fails to parse now surfaces from the gates rather than the resolver. It is the same error either way (InvalidPackageExtensionSelector, transparent), just raised before the decision to resolve instead of after.Not included:
overrides. They are the third stage of the same chain, and TypeScript folds them into the manifests the gates see too. I left them out because I have no failing case for them, and unlike the extensions they can rewrite an importer's own specifiers — worth its own change with its own repro rather than riding along here.Squash Commit Body
Checklist
already linked to it solves it.
pnpm/port, or the description notes what still needs porting.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).
Summary by CodeRabbit
Bug Fixes
packageExtensionsadd peer dependencies.Tests