Repository navigation
fix(catalogs): re-resolve a project the catalog entry moved past - #13860
Conversation
A catalog entry resolves to one version for every project that references it, but only the projects in the install that moves the entry follow it. The rest kept the version they had — one the entry no longer allowed — and nothing corrected it afterwards: by then the entry's specifier matched what the lockfile recorded, so the up-to-date check read those projects as current and skipped resolution entirely. A frozen install accepted the result too, so a workspace could sit on two versions of one catalog entry indefinitely. The up-to-date check now also compares each `catalog:` dependency's recorded version against the version its entry resolved to, and the resolution the install forgets is chosen by the same predicate, so a project left behind re-resolves through the catalog on its next install. An alias (`npm:` in the entry) records `<name>@<version>` rather than a bare version, and a non-registry resolution records a protocol; neither compares to a version, so both are left alone. pacquet resolves the whole workspace on every install and already keeps every project on the entry's version, so this closes a divergence rather than opening one. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
PR Summary by QodoFix stale catalog resolutions for projects not included in a catalog update
AI Description
Diagram
High-Level Assessment
Files changed (9)
|
|
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 (5)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughCatalog freshness checks now compare lockfile resolutions with current catalog entries. Install paths invalidate stale catalog-backed resolutions, frozen installs reject stale lockfiles, and regression tests cover multi-project updates and peer-suffixed versions. ChangesCatalog resolution freshness
Estimated code review effort: 3 (Moderate) | ~20 minutes Mergeability Score: ⚪ Minimal · up to The change is localized to catalog resolution and frozen-install validation, with no reported failed checks or concrete current-head correctness risks; no actionable merge-blocking risk remains beyond normal checks and review. Sequence Diagram(s)sequenceDiagram
participant installCase
participant forgetResolutionsOfPrevWantedDeps
participant catalogResolutionIsStale
participant CatalogSnapshots
installCase->>forgetResolutionsOfPrevWantedDeps: pass importer and catalog context
forgetResolutionsOfPrevWantedDeps->>catalogResolutionIsStale: check catalog-backed dependency
catalogResolutionIsStale->>CatalogSnapshots: read current catalog version
CatalogSnapshots-->>catalogResolutionIsStale: return catalog version
CatalogSnapshots-->>catalogResolutionIsStale: provide catalog snapshot
catalogResolutionIsStale-->>forgetResolutionsOfPrevWantedDeps: report stale resolution
forgetResolutionsOfPrevWantedDeps-->>installCase: retain or remove resolution
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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 |
Confidence Score: 4/5The peer-suffixed catalog case must be fixed before merging because the new check can still accept and retain stale catalog resolutions. Catalog dependencies with peers have importer references containing Files Needing Attention: pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts, pnpm11/installing/deps-installer/src/install/index.ts Reviews (1): Last reviewed commit: "fix(catalogs): re-resolve a project the ..." | Re-trigger Greptile |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 @.changeset/catalog-stale-sibling.md:
- Line 3: Change the release type for `@pnpm/lockfile.verification` in the
changeset from patch to minor, reflecting its newly exported public APIs
catalogResolutionIsStale and catalogResolutionsAreUpToDate.
In `@pnpm11/lockfile/verification/src/allProjectsAreUpToDate.ts`:
- Line 70: Update the explicit frozen-install validation in tryFrozenInstall()
to call catalogResolutionsAreUpToDate() for each importer alongside
satisfiesPackageManifest(), and throw the existing outdated-lockfile error when
it fails. Preserve the automatic frozen-like path and add a regression test
covering a manifest catalog: entry whose recorded lockfile version is stale.
In `@pnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.ts`:
- Around line 39-42: In the catalog resolution check, normalize ref with
dp.removeSuffix before testing for alias or protocol markers, then compare the
normalized value with catalogVersion while preserving the null handling. Add a
regression case covering a peer-suffixed registry dependency such as
1.3.0([email protected]) so stale resolutions are not reused.
🪄 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: f893aec3-af96-4f36-ab50-e42d67b84c15
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!pnpm-lock.yaml
📒 Files selected for processing (8)
.changeset/catalog-stale-sibling.mdpnpm11/installing/deps-installer/src/install/index.tspnpm11/installing/deps-installer/test/catalogs.tspnpm11/lockfile/verification/package.jsonpnpm11/lockfile/verification/src/allProjectsAreUpToDate.tspnpm11/lockfile/verification/src/catalogResolutionsAreUpToDate.tspnpm11/lockfile/verification/src/index.tspnpm11/lockfile/verification/tsconfig.json
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
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.8221813981600006,
"stddev": 0.2908483535521582,
"median": 2.67174655136,
"user": 2.7471560399999997,
"system": 2.26415988,
"min": 2.56887640536,
"max": 3.2475251543600003,
"times": [
2.5819360163600003,
2.64413642436,
2.6988209423600003,
2.6446721603600003,
2.8054771903600004,
3.2405092523600003,
3.2475251543600003,
3.2065766193600003,
2.5832838163600003,
2.56887640536
]
},
{
"command": "pacquet@main",
"mean": 2.78713876666,
"stddev": 0.1606504895330483,
"median": 2.79496296336,
"user": 2.67694204,
"system": 2.21451678,
"min": 2.5998475773600003,
"max": 3.00561234636,
"times": [
2.95797743636,
2.6365843153600004,
3.00561234636,
2.87640943336,
2.6130541233600004,
2.96136685136,
2.84166462636,
2.7482613003600003,
2.5998475773600003,
2.6306096563600003
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6877792438600001,
"stddev": 0.1355550601347754,
"median": 1.70464736036,
"user": 1.5949041399999997,
"system": 1.65437828,
"min": 1.48313039336,
"max": 1.9113523183599999,
"times": [
1.48313039336,
1.54277330036,
1.68798404936,
1.9113523183599999,
1.62051505936,
1.7665578073600001,
1.76292734136,
1.72131067136,
1.8228430193599998,
1.55839847836
]
},
{
"command": "pnpr@main",
"mean": 1.66169110256,
"stddev": 0.145706672959344,
"median": 1.62838498536,
"user": 1.6683149399999997,
"system": 1.7330436799999998,
"min": 1.50430036436,
"max": 1.92206865436,
"times": [
1.50430036436,
1.63966342136,
1.8243714283599999,
1.92206865436,
1.51433338236,
1.6902302353599998,
1.80014390936,
1.59682845436,
1.50786462636,
1.61710654936
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.38781133672000007,
"stddev": 0.021153205904267038,
"median": 0.39263290342,
"user": 0.34267924,
"system": 0.7630198399999999,
"min": 0.35602696342,
"max": 0.41668042542,
"times": [
0.41668042542,
0.41391707642,
0.39307791942,
0.39637032042,
0.40388967942,
0.39218788742,
0.36492069142,
0.37135881942,
0.36968358442,
0.35602696342
]
},
{
"command": "pacquet@main",
"mean": 0.45711544761999995,
"stddev": 0.045115905661175494,
"median": 0.47320751542,
"user": 0.39942024,
"system": 0.8711039399999999,
"min": 0.36861538742,
"max": 0.50697165542,
"times": [
0.49046303842,
0.46795314442,
0.47846188642,
0.41494142942,
0.43804686242,
0.36861538742,
0.49457873742,
0.50697165542,
0.49274534442,
0.41837699042
]
},
{
"command": "pnpr@HEAD",
"mean": 0.3848104862200001,
"stddev": 0.04465874398716474,
"median": 0.37445042892,
"user": 0.34255983999999995,
"system": 0.71895024,
"min": 0.33392610542,
"max": 0.48433478342,
"times": [
0.48433478342,
0.37355748742,
0.36093930542,
0.42225669542,
0.36236279842,
0.41243644742,
0.33392610542,
0.38281327542,
0.37534337042,
0.34013459342
]
},
{
"command": "pnpr@main",
"mean": 0.36310284832000006,
"stddev": 0.012899295042540875,
"median": 0.36339820242,
"user": 0.30104804,
"system": 0.6879334399999999,
"min": 0.34199287242,
"max": 0.38115940142,
"times": [
0.37515396542,
0.34199287242,
0.35128473842,
0.36579038442,
0.37812378141999997,
0.35547221142,
0.36865177742,
0.35239333042,
0.36100602042,
0.38115940142
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.9169280552000005,
"stddev": 0.049674147832121256,
"median": 2.8994685279000003,
"user": 2.2311226999999993,
"system": 1.94399014,
"min": 2.8531213429,
"max": 3.0177162149,
"times": [
2.9023168309000003,
2.8941590349000004,
2.8531213429,
2.9409955349000003,
2.9712806779000003,
2.8956212799000003,
2.8966202249000004,
2.8656818459,
2.9317675649000003,
3.0177162149
]
},
{
"command": "pacquet@main",
"mean": 2.9854464549,
"stddev": 0.07469486338957576,
"median": 2.9788341004000003,
"user": 2.3151384,
"system": 2.0274433400000005,
"min": 2.8655140749,
"max": 3.1115741399,
"times": [
2.8655140749,
2.9380973749000003,
2.9455396379,
2.9361921279,
2.9261684769,
3.0595153249,
3.0310926399,
3.0286421889,
3.0121285629,
3.1115741399
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6694690585999996,
"stddev": 0.11031353251478564,
"median": 1.6584049189,
"user": 1.6875202999999999,
"system": 1.8253927399999998,
"min": 1.5271462419,
"max": 1.9282592078999998,
"times": [
1.6178891879,
1.6549782349,
1.6940723369,
1.7427717129,
1.9282592078999998,
1.6479166069,
1.5559324809,
1.5271462419,
1.6618316029,
1.6638929729
]
},
{
"command": "pnpr@main",
"mean": 1.8827184425000003,
"stddev": 0.1365071073495424,
"median": 1.8840768379,
"user": 1.7730361000000001,
"system": 2.04548294,
"min": 1.6702158458999998,
"max": 2.0587415169,
"times": [
1.9640341979,
1.9025507388999998,
1.8656029369,
2.0494674649,
2.0587415169,
1.7901915969,
1.7675768459,
2.0109723079,
1.6702158458999998,
1.7478309729
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6517304698,
"stddev": 0.06067376076736138,
"median": 0.6267278636,
"user": 0.89982436,
"system": 1.0896922199999999,
"min": 0.5720052991,
"max": 0.7854086481,
"times": [
0.5720052991,
0.6213644541,
0.7854086481,
0.6815796311,
0.6968915001,
0.6799333001,
0.6214440521,
0.6320116751,
0.6121114601000001,
0.6145546781
]
},
{
"command": "pacquet@main",
"mean": 0.6498623496,
"stddev": 0.04950053471405869,
"median": 0.6505825065999999,
"user": 0.89681726,
"system": 1.07650682,
"min": 0.5572816221,
"max": 0.7041289451,
"times": [
0.7041289451,
0.6529482781,
0.5572816221,
0.5943068421,
0.7034070591,
0.6992944281,
0.6390864911,
0.6482167351,
0.6816886511,
0.6182644441
]
},
{
"command": "pnpr@HEAD",
"mean": 0.42526802380000006,
"stddev": 0.019736009876084103,
"median": 0.41917445510000007,
"user": 0.29259256,
"system": 0.7483643200000001,
"min": 0.40494763810000006,
"max": 0.46080784210000003,
"times": [
0.4111259481,
0.41523429210000007,
0.42311461810000006,
0.42868752210000005,
0.41430224210000005,
0.45740603510000005,
0.4301160151,
0.40693808510000007,
0.40494763810000006,
0.46080784210000003
]
},
{
"command": "pnpr@main",
"mean": 0.4321317972,
"stddev": 0.023259610960335936,
"median": 0.4368344191000001,
"user": 0.30378236,
"system": 0.76682282,
"min": 0.3874466381000001,
"max": 0.46182730610000006,
"times": [
0.4382504071000001,
0.45006983010000007,
0.46182730610000006,
0.3874466381000001,
0.4094955961,
0.43541843110000006,
0.41446045910000007,
0.44798181910000007,
0.45353524710000004,
0.42283223810000004
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.14812402168,
"stddev": 0.08646596240951258,
"median": 2.1287814893799997,
"user": 1.18605786,
"system": 1.2237244800000002,
"min": 2.07766581438,
"max": 2.37776456438,
"times": [
2.11118974938,
2.07925661138,
2.1120014233799997,
2.37776456438,
2.1463263523799996,
2.1278617023799997,
2.1357203283799997,
2.1297012763799996,
2.18375239438,
2.07766581438
]
},
{
"command": "pacquet@main",
"mean": 2.14832060128,
"stddev": 0.06314969615796491,
"median": 2.13959241388,
"user": 1.18985546,
"system": 1.2087447800000002,
"min": 2.06469199538,
"max": 2.2637339483799996,
"times": [
2.23712663138,
2.1509848993799996,
2.1481287763799997,
2.11581746838,
2.13105605138,
2.2637339483799996,
2.1142132073799997,
2.06469199538,
2.1756180813799997,
2.08183495338
]
},
{
"command": "pnpr@HEAD",
"mean": 0.4485324253800001,
"stddev": 0.02478271928726693,
"median": 0.44924926688000005,
"user": 0.34449776,
"system": 0.7829196800000001,
"min": 0.40984593838000005,
"max": 0.49222894238000003,
"times": [
0.44128434738000005,
0.42432531438000004,
0.40984593838000005,
0.43025132138000005,
0.4514495833800001,
0.44934407038000007,
0.45598714338000007,
0.49222894238000003,
0.44915446338000004,
0.48145312938000007
]
},
{
"command": "pnpr@main",
"mean": 0.42914322008,
"stddev": 0.02572886105600308,
"median": 0.41680167838000004,
"user": 0.32008876,
"system": 0.76417528,
"min": 0.40025783538000004,
"max": 0.46882135138000003,
"times": [
0.45045138938000007,
0.41876475438000005,
0.40144881138000005,
0.46087601338000006,
0.45063280038000003,
0.4141213663800001,
0.46882135138000003,
0.41483860238000003,
0.40025783538000004,
0.41121927638000005
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2761874997163636,
"stddev": 0.0239711549013968,
"median": 0.26642445208000004,
"user": 0.2433041381818182,
"system": 0.09751057272727272,
"min": 0.25044484808,
"max": 0.32080460708,
"times": [
0.25728804808,
0.25111529708,
0.26642445208000004,
0.26407723408,
0.29424053008,
0.29845782908,
0.25297467808,
0.29652528008,
0.28570969308,
0.25044484808,
0.32080460708
]
},
{
"command": "pacquet@main",
"mean": 0.28162871658000005,
"stddev": 0.02327057889670784,
"median": 0.27681553758,
"user": 0.24185871999999997,
"system": 0.10328730000000001,
"min": 0.24540121808,
"max": 0.32880975808,
"times": [
0.32880975808,
0.27114642808,
0.27402114508000003,
0.28686620308,
0.30336896908,
0.27960993008,
0.26417207308,
0.26805736708,
0.29483407408,
0.24540121808
]
},
{
"command": "pnpr@HEAD",
"mean": 0.10125926004428575,
"stddev": 0.002013680767459328,
"median": 0.10065764008,
"user": 0.026936927142857142,
"system": 0.016685835714285713,
"min": 0.09822686108,
"max": 0.10721117008,
"times": [
0.10031780708,
0.10402514808,
0.10388934208,
0.10407527208,
0.10070901208000001,
0.09875794908,
0.10402804308000001,
0.10053227908000001,
0.09980642608,
0.10014035408000001,
0.10355084808000001,
0.09879209208,
0.10087031408000001,
0.10106585108,
0.10721117008,
0.09884021308,
0.10049234508,
0.10057505008,
0.10109472708,
0.09989462308000001,
0.10060626808,
0.10181779308,
0.09822686108,
0.10030149608,
0.10122220408,
0.10207835308,
0.10175726908,
0.10058017008
]
},
{
"command": "pnpr@main",
"mean": 0.10220347489481484,
"stddev": 0.003605686508069803,
"median": 0.10158333308,
"user": 0.026665208888888885,
"system": 0.01677933703703703,
"min": 0.09679160608000001,
"max": 0.11227185308,
"times": [
0.10531355708000001,
0.10050132108,
0.10533875408,
0.09810012308,
0.10158333308,
0.10395022808,
0.09922590708000001,
0.09776033508,
0.09955476508,
0.09679160608000001,
0.10471174708,
0.10419286308,
0.10134494608,
0.09887550908,
0.09821204408,
0.10330506708000001,
0.10707924408,
0.09846299408,
0.10419048908,
0.10266681808,
0.09836949908,
0.10476568808,
0.10384707408,
0.11227185308,
0.10124526808,
0.10098529008,
0.10684749808
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.6936432878533334,
"stddev": 0.10836201637620199,
"median": 0.6632571595200001,
"user": 0.6885727755555554,
"system": 0.16431418666666664,
"min": 0.54941421652,
"max": 0.9088372355200001,
"times": [
0.6449299685200001,
0.59661647352,
0.54941421652,
0.6842618085200001,
0.6515945415200001,
0.77120764052,
0.77267054652,
0.9088372355200001,
0.6632571595200001
]
},
{
"command": "pacquet@main",
"mean": 0.6305010208533335,
"stddev": 0.07225639747337273,
"median": 0.6297553865200001,
"user": 0.5971439977777777,
"system": 0.15597518666666665,
"min": 0.53150557052,
"max": 0.75150546652,
"times": [
0.63166596352,
0.71875778852,
0.6297553865200001,
0.5520289955200001,
0.53150557052,
0.66470734352,
0.5979444485200001,
0.59663822452,
0.75150546652
]
},
{
"command": "pnpm@HEAD",
"mean": 4.781919650742222,
"stddev": 0.5255761448829128,
"median": 4.785140801520001,
"user": 6.928581442222222,
"system": 0.48261185333333334,
"min": 4.05118788752,
"max": 5.70237131952,
"times": [
4.52933972452,
4.26213909352,
4.800400332520001,
4.05118788752,
4.785140801520001,
4.45967438952,
5.2388857705200005,
5.20813753752,
5.70237131952
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.99880827464,
"stddev": 0.2269446458883976,
"median": 4.986017262040001,
"user": 3.19887708,
"system": 2.43585534,
"min": 4.72015301104,
"max": 5.41669915704,
"times": [
5.41669915704,
5.03167438804,
5.16658545904,
4.85664290704,
4.73293911904,
4.72015301104,
5.11801584504,
5.19417346804,
4.940360136040001,
4.81083925604
]
},
{
"command": "pacquet@main",
"mean": 4.76334385224,
"stddev": 0.1069332228385087,
"median": 4.728518317540001,
"user": 2.7097235799999995,
"system": 2.1948166399999995,
"min": 4.65545501504,
"max": 4.96216654004,
"times": [
4.96216654004,
4.90042083504,
4.66454040204,
4.850867963040001,
4.68095281904,
4.76475168004,
4.65545501504,
4.697246633040001,
4.69733714104,
4.75969949404
]
},
{
"command": "pnpr@HEAD",
"mean": 3.7136642657400003,
"stddev": 0.1382782026367186,
"median": 3.66036316904,
"user": 1.77049828,
"system": 1.8332527399999996,
"min": 3.59001780204,
"max": 4.02658682804,
"times": [
3.64044766204,
3.7217121760400005,
3.65652861404,
3.6063692350400003,
4.02658682804,
3.5941384490400003,
3.8140354500400004,
3.59001780204,
3.66419772404,
3.8226087170400005
]
},
{
"command": "pnpr@main",
"mean": 3.7078361091399996,
"stddev": 0.1390084350572681,
"median": 3.6592599975400004,
"user": 1.7128148799999998,
"system": 1.75822704,
"min": 3.60320309004,
"max": 4.00312189004,
"times": [
3.63268483404,
3.60320309004,
3.6095833190400004,
3.67298745704,
3.9200455450400002,
3.68984878504,
4.00312189004,
3.69239070904,
3.6455325380400003,
3.60896292404
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13860 |
| 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,430.61 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 302.10 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 312.46 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 85.09 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,374.55 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,465.14 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 254.49 ms |
|
Code review by qodo was updated up to the latest commit 84b4080 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
A catalog entry resolves to one version for every project that references it. Only the projects
in the install that moves the entry follow it, though — and the ones left behind were never
corrected.
pnpm update @pnpm.e2e/fooinproject1bumps the entry to^1.3.0/1.3.0 and movesproject1.project2keeps 1.0.0 — a version^1.3.0does not allow — and stays there:what the lockfile recorded, so the up-to-date check reads
project2as current and skipsresolution altogether;
The workspace ends up on two versions of one catalog entry, indefinitely and silently.
The up-to-date check now also compares each
catalog:dependency's recorded version against theversion its entry resolved to, and the resolution the install forgets is chosen by the same
predicate, so a project left behind re-resolves through the catalog on its next install.\n\nExplicit frozen installs now reject the inconsistency.\n\nAn alias (
npm:in the entry) records<name>@<version>rather than a bare version, and anon-registry resolution records a protocol; neither compares to a version, so both are left
alone.
Found while working on #13841 and #13853; measured on
mainbefore and afterthose landed.
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.
pacquet needs no change. It resolves the whole workspace on every install, so both projects
already follow the entry together — measured: after
--dir packages/a update <pkg>,packages/aand
packages/bmove to 1.3.0. This closes a divergence rather than opening one.deps-installer'scatalogs.ts(54) andlockfile.verification(30) pass, along withtest/lockfile.ts,test/install/updatingPkgJson.ts,test/install/misc.tsandtest/install/frozenLockfile.ts. The one failure in that sweep,packages installed via tarball URL from the default registry are normalized, fails identicallyon a worktree without these changes — it reaches the network.
Written by agents (Claude Code, claude-opus-5; Codex, gpt-5.6-sol).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit