Repository navigation
Conversation
…update names `pnpm add <pkg>@<version>` and `pnpm update <pkg>@<version>` under `catalogMode: strict` or `prefer` accept a version the catalog entry's range covers (#13715). pnpm v11 then writes that version back to the entry, keeping its operator (`^7.22.17` becomes `^7.29.6`), the way a plain `pnpm update` moves the entry to the version it resolves. The v12 port only moved the entry's lockfile resolution and left `pnpm-workspace.yaml` on the old range, so the next plain install was free to resolve elsewhere. `decide_catalog_entry` now returns the moved entry, computed with `calc_version_range`, the rule `update` uses when it bumps a range. A range no single operator describes, such as `>=7.22.17 <8`, keeps its text, as it does on a plain v12 update. On v11, the resolver warned "Skip adding <pkg> to the default catalog ... Please use `pnpm update`" for every dependency resolved through its `catalog:` reference during a strict or prefer update, even though the same update moves that entry through `updatedCatalogs`. The warning now only applies to a dependency that is not already cataloged. Closes #13715 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Warning Review limit reachedNext included review available in 34 seconds. View limit detailsLimit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: pnpm/pnpm/.coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (8)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughWhen a requested version falls within an existing catalog range, catalog decisions can move the entry to that version. Resolver and CLI tests cover catalog lookup handling, warning behavior, and updates across workspace projects. ChangesCatalog version updates
Estimated code review effort: 3 (Moderate) | ~20 minutes Assessment against linked issues
Suggested labels: Merge Risk: ⚪ Minimal · up to Covered catalog ranges update as intended, while exact and compound range behavior remains preserved. No actionable merge-blocking risk remains. ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
📝 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15372 +/- ##
==========================================
+ Coverage 91.58% 91.60% +0.01%
==========================================
Files 1400 1400
Lines 188542 188549 +7
==========================================
+ Hits 172670 172714 +44
+ Misses 15872 15835 -37 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Micro-Benchmark ResultsLinux |
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.
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; the linked-workspace scenario compares 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.46763875324,
"stddev": 0.14159348598425373,
"median": 2.4312640969399997,
"user": 1.58507432,
"system": 1.7188879,
"min": 2.29742743694,
"max": 2.74820607894
},
{
"command": "pacquet@main",
"mean": 2.50483119144,
"stddev": 0.18215803142341008,
"median": 2.52879589244,
"user": 1.6193492199999997,
"system": 1.6902531999999997,
"min": 2.30339254594,
"max": 2.74332531194
},
{
"command": "pnpr@HEAD",
"mean": 1.47650725524,
"stddev": 0.11659203393074952,
"median": 1.47916108994,
"user": 1.29887932,
"system": 1.4555330000000002,
"min": 1.3128433539400002,
"max": 1.68370811794
},
{
"command": "pnpr@main",
"mean": 1.5226144165400002,
"stddev": 0.12058999858038649,
"median": 1.51850755544,
"user": 1.45342842,
"system": 1.5509125999999998,
"min": 1.3321812639400001,
"max": 1.6990627019400002
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
Confirmation (reversed target order)
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.37060683514,
"stddev": 0.06809923831249672,
"median": 0.34293162584000003,
"user": 0.40310084,
"system": 0.7496966599999999,
"min": 0.30917690984,
"max": 0.52695594484
},
{
"command": "pacquet@main",
"mean": 0.23667535093999997,
"stddev": 0.013990814509610473,
"median": 0.23088985384,
"user": 0.24328224,
"system": 0.54721166,
"min": 0.22118453084,
"max": 0.26708669883999997
},
{
"command": "pnpr@HEAD",
"mean": 0.23846998644000003,
"stddev": 0.006679646221957252,
"median": 0.23893949334000003,
"user": 0.24595544,
"system": 0.5247546599999999,
"min": 0.22677162184000002,
"max": 0.24908325384000002
},
{
"command": "pnpr@main",
"mean": 0.24338209084,
"stddev": 0.006744337372692254,
"median": 0.24335439734000003,
"user": 0.23972054000000004,
"system": 0.54704436,
"min": 0.23281076084000002,
"max": 0.25686881384
}
],
"confirmation": {
"results": [
{
"command": "pnpr@main",
"mean": 0.26033722404000004,
"stddev": 0.029983518381048162,
"median": 0.25540244454000005,
"user": 0.27705108,
"system": 0.5681762799999999,
"min": 0.21792773004000002,
"max": 0.31088971004
},
{
"command": "pnpr@HEAD",
"mean": 0.26857148954000004,
"stddev": 0.044925214115405634,
"median": 0.25110498104,
"user": 0.25574287999999995,
"system": 0.6148684799999999,
"min": 0.23647924204,
"max": 0.36334619604
},
{
"command": "pacquet@main",
"mean": 0.25027764164,
"stddev": 0.022734417029909006,
"median": 0.24418765704,
"user": 0.26808348,
"system": 0.5480828799999999,
"min": 0.21961842404,
"max": 0.28676883004000003
},
{
"command": "pacquet@HEAD",
"mean": 0.22688270613999997,
"stddev": 0.022378720116304925,
"median": 0.21908250854,
"user": 0.23744337999999998,
"system": 0.5119603799999999,
"min": 0.21027974904000002,
"max": 0.28343159304
}
]
}
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.008645275461433446,
"stddev": 0.0011216847294761492,
"median": 0.008363247400000001,
"user": 0.005204145733788396,
"system": 0.003951497133105801,
"min": 0.0070074404,
"max": 0.0136396164
},
{
"command": "pacquet@main",
"mean": 0.008497096066666664,
"stddev": 0.0008871550965570044,
"median": 0.0084782634,
"user": 0.005479528771929827,
"system": 0.0035216580350877183,
"min": 0.0062412254,
"max": 0.0117914664
},
{
"command": "pnpr@HEAD",
"mean": 0.009229444216254408,
"stddev": 0.0009140000606880817,
"median": 0.0090676864,
"user": 0.005349370318021203,
"system": 0.004441417809187277,
"min": 0.007413541399999999,
"max": 0.0130017124
},
{
"command": "pnpr@main",
"mean": 0.010405573792405066,
"stddev": 0.0013528399448554205,
"median": 0.0100916654,
"user": 0.006035883122362866,
"system": 0.004978957974683545,
"min": 0.0081131694,
"max": 0.0167242704
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.009105431666278025,
"stddev": 0.0008788765995646834,
"median": 0.008959742460000001,
"user": 0.005530943587443944,
"system": 0.004091832107623318,
"min": 0.007293938460000001,
"max": 0.01129948746
},
{
"command": "pacquet@main",
"mean": 0.008644633038014184,
"stddev": 0.0010193951525882504,
"median": 0.00853536096,
"user": 0.005515238581560284,
"system": 0.003635638014184397,
"min": 0.006376019460000001,
"max": 0.01198239446
},
{
"command": "pnpr@HEAD",
"mean": 0.00942575964275862,
"stddev": 0.0015359554912699799,
"median": 0.009085495960000002,
"user": 0.005822836551724136,
"system": 0.004121247862068966,
"min": 0.007185452460000001,
"max": 0.01639263146
},
{
"command": "pnpr@main",
"mean": 0.0099478406435206,
"stddev": 0.0015863401499820555,
"median": 0.009447357460000002,
"user": 0.005838712284644193,
"system": 0.004677092883895129,
"min": 0.007608248460000001,
"max": 0.01410950646
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.5713448775400005,
"stddev": 0.030271262364441207,
"median": 2.56648961374,
"user": 2.3452309399999995,
"system": 2.00265004,
"min": 2.52865127524,
"max": 2.62805331924
},
{
"command": "pacquet@main",
"mean": 2.71629215034,
"stddev": 0.09259535986934116,
"median": 2.70129329574,
"user": 2.80523284,
"system": 2.31413324,
"min": 2.62451986824,
"max": 2.92879692324
},
{
"command": "pnpr@HEAD",
"mean": 1.5906364076400004,
"stddev": 0.13112856876089923,
"median": 1.54100045274,
"user": 1.83026074,
"system": 1.7854692399999998,
"min": 1.4832682292400001,
"max": 1.84294228424
},
{
"command": "pnpr@main",
"mean": 1.67787278064,
"stddev": 0.14458700361427973,
"median": 1.66745218724,
"user": 2.00306384,
"system": 1.9002424399999995,
"min": 1.4824394442400002,
"max": 1.8638903292400002
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.45045632324000007,
"stddev": 0.057596601256176175,
"median": 0.42892820554000005,
"user": 0.6543073799999999,
"system": 0.8488832399999999,
"min": 0.40201643304,
"max": 0.58005054804
},
{
"command": "pacquet@main",
"mean": 0.4134003901400001,
"stddev": 0.019504992029125284,
"median": 0.40746100754000003,
"user": 0.59902538,
"system": 0.7463038399999999,
"min": 0.37797494604000004,
"max": 0.45193938904000003
},
{
"command": "pnpr@HEAD",
"mean": 0.29629135264000006,
"stddev": 0.016612182417705134,
"median": 0.29356859504,
"user": 0.25078078,
"system": 0.52167644,
"min": 0.27075271504000004,
"max": 0.32149765304
},
{
"command": "pnpr@main",
"mean": 0.30162402754000006,
"stddev": 0.011165033921467492,
"median": 0.30093423404,
"user": 0.24232107999999997,
"system": 0.53046874,
"min": 0.28611254004000003,
"max": 0.32368066204
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.7060647536600002,
"stddev": 0.09285742580496707,
"median": 1.68661132926,
"user": 1.0338349,
"system": 1.05770718,
"min": 1.6122384652600001,
"max": 1.9400969192600002
},
{
"command": "pacquet@main",
"mean": 1.6941967335600001,
"stddev": 0.061242252396631995,
"median": 1.67705479976,
"user": 1.0451631,
"system": 1.03672988,
"min": 1.6276145742600001,
"max": 1.8505755882600001
},
{
"command": "pnpr@HEAD",
"mean": 0.32807544576000003,
"stddev": 0.013895550744440778,
"median": 0.32719099826,
"user": 0.29058629999999996,
"system": 0.57831878,
"min": 0.30450980826,
"max": 0.35769654126
},
{
"command": "pnpr@main",
"mean": 0.35484506546000005,
"stddev": 0.034791712740404414,
"median": 0.35436051576000005,
"user": 0.30663809999999997,
"system": 0.65890268,
"min": 0.30467558126,
"max": 0.39830858326
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.36665135798000004,
"stddev": 0.05361783600881838,
"median": 0.36016333698,
"user": 0.38699764,
"system": 0.13269844,
"min": 0.27078621748000004,
"max": 0.47299283948000004
},
{
"command": "pacquet@main",
"mean": 0.32344870208000004,
"stddev": 0.06857928777872965,
"median": 0.28932522248000003,
"user": 0.35696164,
"system": 0.10143183999999998,
"min": 0.25907775948,
"max": 0.44823059448
},
{
"command": "pnpr@HEAD",
"mean": 0.10589318173925927,
"stddev": 0.004992645429086412,
"median": 0.10589635748000001,
"user": 0.04327168444444444,
"system": 0.01768628296296296,
"min": 0.09895664448000001,
"max": 0.12013269448000001
},
{
"command": "pnpr@main",
"mean": 0.10900775348000001,
"stddev": 0.008177774552272183,
"median": 0.10729572698,
"user": 0.046023132857142844,
"system": 0.019901961428571424,
"min": 0.09727645548000001,
"max": 0.13329053748000003
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.7399930196022223,
"stddev": 0.10078269212509951,
"median": 0.7122097193800001,
"user": 0.7665757955555557,
"system": 0.16199258888888887,
"min": 0.61398727338,
"max": 0.90008923238
},
{
"command": "pacquet@main",
"mean": 0.8055512573800001,
"stddev": 0.10615777228549088,
"median": 0.77782386138,
"user": 0.8313194622222223,
"system": 0.1824239222222222,
"min": 0.6255977263800001,
"max": 0.9773824883800001
},
{
"command": "pnpm@HEAD",
"mean": 3.1504961788244445,
"stddev": 0.24680046459050684,
"median": 3.06061123938,
"user": 4.890503128888889,
"system": 0.24125147777777778,
"min": 2.8995097523799997,
"max": 3.58100579238
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.1619891302111111,
"stddev": 0.007259946677484207,
"median": 0.15835376810000001,
"user": 0.11985787333333334,
"system": 0.07748629111111112,
"min": 0.15506927210000002,
"max": 0.17494042810000002
},
{
"command": "pacquet@main",
"mean": 0.1566163202111111,
"stddev": 0.003945533411054815,
"median": 0.1559815751,
"user": 0.1145901511111111,
"system": 0.07428145777777778,
"min": 0.1521852341,
"max": 0.1653204251
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.55844477968,
"stddev": 0.1608332007681493,
"median": 4.51491123878,
"user": 1.7925745,
"system": 1.88184824,
"min": 4.36394831028,
"max": 4.94024272228
},
{
"command": "pacquet@main",
"mean": 4.63304415288,
"stddev": 0.18812113246190504,
"median": 4.63932827828,
"user": 1.9063106,
"system": 1.9811389400000003,
"min": 4.38526306628,
"max": 4.96389750628
},
{
"command": "pnpr@HEAD",
"mean": 3.52648030988,
"stddev": 0.08115836636804999,
"median": 3.51463658028,
"user": 1.5446377,
"system": 1.5827894399999998,
"min": 3.43440460328,
"max": 3.69926623528
},
{
"command": "pnpr@main",
"mean": 3.5749514962799998,
"stddev": 0.1577750687039765,
"median": 3.53413505278,
"user": 1.5543746999999999,
"system": 1.66059904,
"min": 3.40347804728,
"max": 3.89480413128
}
]
}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.1900269551914286,
"stddev": 0.013142284225302364,
"median": 0.18545232262,
"user": 0.23098891142857142,
"system": 0.21286122857142856,
"min": 0.17562616612,
"max": 0.22613898312000003
},
{
"command": "pacquet@main",
"mean": 0.18607513762000003,
"stddev": 0.011233319239573235,
"median": 0.18520240262,
"user": 0.2215205542857142,
"system": 0.21758529999999995,
"min": 0.17310941212,
"max": 0.20938354012000002
},
{
"command": "pnpr@HEAD",
"mean": 0.20653255775636367,
"stddev": 0.014336565653298107,
"median": 0.20464842312,
"user": 0.24750970363636363,
"system": 0.21248870909090908,
"min": 0.18248902612,
"max": 0.22668722012
},
{
"command": "pnpr@main",
"mean": 0.20915281637000005,
"stddev": 0.011465966118304721,
"median": 0.21030098812000003,
"user": 0.2373494233333334,
"system": 0.22190155,
"min": 0.19427930212000002,
"max": 0.22938571312000003
}
]
} |
PR Summary by QodoMove covered catalog entries to explicitly requested versions
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
|
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Code review by qodo was updated up to the latest commit e5d1b28 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
…update names (pnpm#15372) `pnpm add <pkg>@<version>` and `pnpm update <pkg>@<version>` under `catalogMode: strict` or `prefer` accept a version the catalog entry's range covers (pnpm#13715). pnpm v11 then writes that version back to the entry, keeping its operator (`^7.22.17` becomes `^7.29.6`), the way a plain `pnpm update` moves the entry to the version it resolves. The v12 port only moved the entry's lockfile resolution and left `pnpm-workspace.yaml` on the old range, so the next plain install was free to resolve elsewhere. `decide_catalog_entry` now returns the moved entry, computed with `calc_version_range`, the rule `update` uses when it bumps a range. A range no single operator describes, such as `>=7.22.17 <8`, keeps its text, as it does on a plain v12 update. On v11, the resolver warned "Skip adding <pkg> to the default catalog ... Please use `pnpm update`" for every dependency resolved through its `catalog:` reference during a strict or prefer update, even though the same update moves that entry through `updatedCatalogs`. The warning now only applies to a dependency that is not already cataloged. Closes pnpm#13715
Summary
Closes #13715.
The error from the issue is already gone: #13716 taught both stacks to accept a version the catalog range covers, and 11.27.1 and 12.6.0 both run the reproduction without
ERR_PNPM_CATALOG_VERSION_MISMATCH. What that fix left behind is a difference between the two stacks, and a misleading warning on v11.With
catalog: { '@babel/core': ^7.22.17 }andcatalogMode: strict,pnpm update '@babel/[email protected]' -r --lockfile-onlygives:pnpm-workspace.yamlentry^7.29.6^7.29.6/7.29.6WARN Skip adding @babel/core to the default catalog ... Please use pnpm update^7.22.17^7.22.17/7.29.6^7.29.6^7.29.6/7.29.6pnpm add <pkg>@<version>diverged the same way.decide_catalog_entrynow returns a moved entry when the entry's range covers the wanted version. The new range comes fromcalc_version_range, the rulepnpm updatealready uses when it bumps an entry to a resolved version, so^and~keep their operator. v11's own tests (updating to a version within the catalog range works with catalogMode: strict,adding a version the catalog range covers moves a catalog locked on another version) expect^1.1.0. The v12 ports of those tests pinned^1.0.0, and they are updated here.catalog:reference. The update moves that entry throughupdatedCatalogs, so the warning contradicted what happened. It fired on a plainpnpm update <pkg>under strict mode too.One known difference remains. A compound entry such as
>=7.22.17 <8keeps its text on v12, as it already does on a plain v12pnpm update, while v11 rewrites it to^7.29.6. This PR leaves that alone.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).
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
pnpm updateno longer displays the “Skip adding … to the default catalog” warning for dependencies already managed by a catalog.