Repository navigation
feat(cli): support recursive install family with dedicated lockfiles - #13208
Conversation
`pnpm install`, `pnpm add`, `pnpm update`, and `pnpm remove` accepted the global `-r` / `--filter` flags in a workspace, but the shared install-family selector rejected every recursive or filtered invocation when `sharedWorkspaceLockfile: false` with `ERR_PNPM_RECURSIVE_SHARED_LOCKFILE_UNSUPPORTED`. Resolve the selection into a three-way `InstallFamilyPlan` (single, shared, per-project). For the per-project (dedicated-lockfile) case, run one independent single-project install/add/update/remove for each selected project against its own `pnpm-lock.yaml`, `node_modules`, and virtual store, mirroring pnpm's per-project loop in its recursive dispatch. Both stacks now match for `sharedWorkspaceLockfile=true` and `false`. Refs #13201.
|
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 (6)
📝 WalkthroughWalkthroughRecursive and filtered ChangesDedicated lockfile install-family support
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: ✨ 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 Qodocli: support recursive install-family with per-project (dedicated) lockfiles
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Confidence Score: 4/5The empty per-project selection path needs a fix before merging.
pnpm/crates/cli/src/cli_args/pipelines.rs Reviews (1): Last reviewed commit: "feat(cli): support recursive install fam..." | Re-trigger Greptile |
Micro-Benchmark ResultsLinux |
Code Review by Qodo
1. PerProject loop is sequential
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13208 +/- ##
==========================================
+ Coverage 86.73% 86.89% +0.15%
==========================================
Files 526 526
Lines 89777 89826 +49
==========================================
+ Hits 77866 78050 +184
+ Misses 11911 11776 -135 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Integrated-Benchmark Report (Linux)Commit: Each scenario reports direct installs and pnpr installs. 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.6507933263200005,
"stddev": 0.2426554589359579,
"median": 2.5719830683200002,
"user": 2.0425539799999997,
"system": 1.68819984,
"min": 2.4160837758200002,
"max": 3.2540263398200002,
"times": [
2.4160837758200002,
2.7486624818200003,
2.48821156782,
2.61185663482,
2.56103345682,
2.50667854782,
2.5290119138200002,
2.80943586482,
2.5829326798200003,
3.2540263398200002
]
},
{
"command": "pacquet@main",
"mean": 2.5495344806200007,
"stddev": 0.11299883797940798,
"median": 2.52458051282,
"user": 1.7440149799999998,
"system": 1.43779364,
"min": 2.40702366082,
"max": 2.78549591882,
"times": [
2.6101089398200004,
2.67308470082,
2.52115002182,
2.52801100382,
2.5029339898200003,
2.78549591882,
2.40702366082,
2.5367314538200003,
2.4319603778200003,
2.4988447388200004
]
},
{
"command": "pnpr@HEAD",
"mean": 1.52806463302,
"stddev": 0.13671197554113673,
"median": 1.49258954482,
"user": 1.14457418,
"system": 1.21673324,
"min": 1.35703459782,
"max": 1.80630033682,
"times": [
1.3903723508199999,
1.80630033682,
1.48450519682,
1.5006738928199999,
1.56293353782,
1.48358766482,
1.35703459782,
1.70072121782,
1.44707950582,
1.54743802882
]
},
{
"command": "pnpr@main",
"mean": 1.52586871012,
"stddev": 0.16195691573639512,
"median": 1.4836220458199998,
"user": 1.12379208,
"system": 1.2134681399999998,
"min": 1.3640964118199999,
"max": 1.82937473082,
"times": [
1.82937473082,
1.53046304082,
1.3640964118199999,
1.37694927382,
1.60776540382,
1.72851946482,
1.42720706982,
1.59213091082,
1.3653997438199998,
1.4367810508199998
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.29535375056,
"stddev": 0.03129506603676292,
"median": 0.27805989276000004,
"user": 0.24607519999999994,
"system": 0.58670874,
"min": 0.26563345476,
"max": 0.34151557176,
"times": [
0.34151557176,
0.32352096276000003,
0.32296593976000004,
0.33522440276000004,
0.26677784676,
0.28088752376000004,
0.27456577676,
0.27523226176000004,
0.26721376476,
0.26563345476
]
},
{
"command": "pacquet@main",
"mean": 0.26480499796,
"stddev": 0.005147630616567881,
"median": 0.26341614776,
"user": 0.2088994,
"system": 0.53964334,
"min": 0.25855342876000004,
"max": 0.27546289876,
"times": [
0.26812909076,
0.26239035076,
0.26183681976,
0.26846092076,
0.25891456476,
0.26267493076000004,
0.26746960976,
0.27546289876,
0.26415736476,
0.25855342876000004
]
},
{
"command": "pnpr@HEAD",
"mean": 0.29050121596,
"stddev": 0.01896274242922766,
"median": 0.28065045976,
"user": 0.25086579999999997,
"system": 0.55212934,
"min": 0.27279537676000004,
"max": 0.32368781976,
"times": [
0.31586290876,
0.32368781976,
0.27464536776000004,
0.27525722976,
0.27932500876,
0.27635425176,
0.30080066476,
0.27279537676000004,
0.28197591076,
0.30430762076
]
},
{
"command": "pnpr@main",
"mean": 0.30131390956,
"stddev": 0.009021470210542075,
"median": 0.30088779526,
"user": 0.24096479999999998,
"system": 0.56471834,
"min": 0.28752791576000003,
"max": 0.31463123176,
"times": [
0.29735806076000004,
0.31337077976,
0.28752791576000003,
0.30153510876,
0.30024048176,
0.28837196776,
0.30483270676,
0.31463123176,
0.29951364176,
0.30575720076
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.9815650691799997,
"stddev": 0.09686880682810899,
"median": 2.97754374698,
"user": 2.2717109199999994,
"system": 1.6470412200000002,
"min": 2.83263231148,
"max": 3.0981908624799996,
"times": [
2.83263231148,
3.0981908624799996,
3.0145855784799998,
2.94050191548,
2.91444689848,
2.8797754794799997,
3.06263778048,
3.0954354834799997,
2.9132724094799998,
3.06417197248
]
},
{
"command": "pacquet@main",
"mean": 3.0099917206799995,
"stddev": 0.16490122712840266,
"median": 2.94658640148,
"user": 2.2732317199999996,
"system": 1.61117992,
"min": 2.8861357494799997,
"max": 3.35094964248,
"times": [
2.9574255414799997,
2.93574726148,
2.98913184348,
2.8861357494799997,
2.99659281148,
2.9059839474799998,
2.91579829348,
2.8881343134799997,
3.35094964248,
3.27401780248
]
},
{
"command": "pnpr@HEAD",
"mean": 1.7319326490800002,
"stddev": 0.1707780461709144,
"median": 1.6939387689800003,
"user": 1.45079092,
"system": 1.5341984199999998,
"min": 1.4791625624800002,
"max": 1.98744479748,
"times": [
1.62967935948,
1.98744479748,
1.8873894044800001,
1.4791625624800002,
1.73774577548,
1.9068508074800001,
1.6501317624800003,
1.86707625548,
1.5640803974800002,
1.60976536848
]
},
{
"command": "pnpr@main",
"mean": 1.6569232421800002,
"stddev": 0.17037968397992156,
"median": 1.64454878348,
"user": 1.4216993199999999,
"system": 1.5898299200000001,
"min": 1.4664458984800002,
"max": 1.9880284454800001,
"times": [
1.63120592648,
1.7411267404800002,
1.6578916404800002,
1.9880284454800001,
1.70922164248,
1.49394718148,
1.53228500748,
1.4982637624800001,
1.8508161764800002,
1.4664458984800002
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.64994164732,
"stddev": 0.030960255767711664,
"median": 0.64519337982,
"user": 0.80930868,
"system": 0.73437402,
"min": 0.6216277373200001,
"max": 0.7196178513200001,
"times": [
0.7196178513200001,
0.6753451413200001,
0.65505128832,
0.6353354713200001,
0.6218837143200001,
0.6216277373200001,
0.62179748032,
0.6314942833200001,
0.65590073932,
0.6613627663200001
]
},
{
"command": "pacquet@main",
"mean": 0.6125754588200001,
"stddev": 0.022206584023968835,
"median": 0.6164961843200001,
"user": 0.76546658,
"system": 0.68528472,
"min": 0.57166608232,
"max": 0.6407683133200001,
"times": [
0.58505744532,
0.61510638232,
0.57166608232,
0.6178859863200001,
0.60899597532,
0.6323975073200001,
0.6298041243200001,
0.62744408632,
0.5966286853200001,
0.6407683133200001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31620532232,
"stddev": 0.006687320528525182,
"median": 0.31680359632,
"user": 0.21062838000000003,
"system": 0.5424782199999999,
"min": 0.30203071432,
"max": 0.32534333732000004,
"times": [
0.32332430532,
0.31241551332,
0.31990533732000004,
0.31626185332,
0.31734533932000003,
0.31159994532,
0.32534333732000004,
0.31410171332000003,
0.30203071432,
0.31972516432000003
]
},
{
"command": "pnpr@main",
"mean": 0.32254087272,
"stddev": 0.013658112212761291,
"median": 0.32189506832000003,
"user": 0.21795888,
"system": 0.5498785199999999,
"min": 0.30150395532,
"max": 0.34305164432,
"times": [
0.31552030532,
0.31044929132,
0.31199500532,
0.31597071032,
0.32781942632,
0.34150082032,
0.32856436932,
0.30150395532,
0.32903319932,
0.34305164432
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.9495401717000003,
"stddev": 0.014260826992067668,
"median": 1.9453831002000002,
"user": 1.03848026,
"system": 0.7634903,
"min": 1.9313628487,
"max": 1.9722058197,
"times": [
1.9468739547000002,
1.9438922457,
1.9385171447000002,
1.9722058197,
1.9621948097,
1.9554521437,
1.9313628487,
1.9379159547,
1.9687283807000002,
1.9382584147000002
]
},
{
"command": "pacquet@main",
"mean": 1.9400847074,
"stddev": 0.02126220941943351,
"median": 1.9386463572000001,
"user": 1.00398806,
"system": 0.7784509,
"min": 1.9021691447,
"max": 1.9852707957000002,
"times": [
1.9852707957000002,
1.9442453147,
1.9368210727000001,
1.9216251997,
1.9366779507,
1.9021691447,
1.9447396807000001,
1.9357600737000002,
1.9530661997,
1.9404716417
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31621297579999996,
"stddev": 0.006621939471483052,
"median": 0.31731851619999996,
"user": 0.21723686,
"system": 0.5534120999999999,
"min": 0.3025210137,
"max": 0.3239564447,
"times": [
0.31100544269999997,
0.3221428827,
0.3223520387,
0.3025210137,
0.3122028787,
0.3189223367,
0.3157146957,
0.3200609317,
0.3239564447,
0.3132510927
]
},
{
"command": "pnpr@main",
"mean": 0.3134410995,
"stddev": 0.01346087662873804,
"median": 0.3114832717,
"user": 0.21903356000000002,
"system": 0.5227970999999999,
"min": 0.2972938507,
"max": 0.33436869269999997,
"times": [
0.3047910907,
0.3220977467,
0.2994087427,
0.2998234387,
0.2972938507,
0.3244378967,
0.3148214747,
0.33436869269999997,
0.3292229927,
0.30814506869999997
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.37857713726,
"stddev": 0.014270939896907652,
"median": 0.38044848515999996,
"user": 0.38130585999999994,
"system": 0.04504763999999999,
"min": 0.35957578816,
"max": 0.40510749816,
"times": [
0.36604061416,
0.38336551616,
0.38192261516,
0.39286428616,
0.40510749816,
0.37897435516,
0.38591778716,
0.35957578816,
0.36706915216,
0.36493376016
]
},
{
"command": "pacquet@main",
"mean": 0.36802117445999993,
"stddev": 0.0043201116024117634,
"median": 0.36634280816,
"user": 0.36064546000000003,
"system": 0.055436639999999995,
"min": 0.36363794716,
"max": 0.37653498116,
"times": [
0.36618277316,
0.36632670516,
0.36393633216,
0.37105056716,
0.36366681216,
0.36363794716,
0.37039920416,
0.37653498116,
0.36635891116,
0.37211751116
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08749104984750002,
"stddev": 0.0014067639618405264,
"median": 0.08730398516000001,
"user": 0.020506597499999998,
"system": 0.009750563750000003,
"min": 0.08401913916,
"max": 0.09195081616,
"times": [
0.08801387216,
0.08737103716000001,
0.08806374716000001,
0.08868400916000001,
0.08799680016000001,
0.08770760416000001,
0.08621500016000001,
0.08683419216,
0.08700790116000001,
0.08794975216,
0.08666888916000001,
0.08740285716000001,
0.08616171916000001,
0.08800768116,
0.08765971316000001,
0.08619533416000001,
0.08723693316000002,
0.08668271516,
0.08694360016000001,
0.08751743416,
0.08695079216000001,
0.08852436716,
0.09195081616,
0.08706089016000002,
0.09127411716000002,
0.08834967716000001,
0.08401913916,
0.08688668116,
0.08706349516,
0.08807252316000001,
0.08637558416,
0.08686472016
]
},
{
"command": "pnpr@main",
"mean": 0.08690630643272727,
"stddev": 0.001099440868321491,
"median": 0.08698572916000001,
"user": 0.020201781212121208,
"system": 0.00958205696969697,
"min": 0.08350053816000001,
"max": 0.08908366516,
"times": [
0.08563322016000001,
0.08694983016,
0.08610723816000002,
0.08681650916000001,
0.08715562016000002,
0.08751250416,
0.08673831016000001,
0.08826714216,
0.08587691216000001,
0.08908366516,
0.08594901716000002,
0.08709383216000001,
0.08350053816000001,
0.08695427916000001,
0.08723376716000002,
0.08668567116,
0.08752688216000001,
0.08698572916000001,
0.08830490216,
0.08813811716000002,
0.08711145716000002,
0.08592004316000001,
0.08737211916000001,
0.08758857816000001,
0.08580308116000002,
0.08741356816000001,
0.08638820816000001,
0.08873889316000001,
0.08508176816000002,
0.08712786716000001,
0.08667491116,
0.08793311016000001,
0.08624082016000001
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.530708323380001,
"stddev": 0.14027783512433412,
"median": 4.46342218868,
"user": 1.8176850999999996,
"system": 1.41760706,
"min": 4.43329526618,
"max": 4.89077551918,
"times": [
4.43329526618,
4.46773992818,
4.60203444318,
4.44873266618,
4.58538378918,
4.45910444918,
4.44957973418,
4.89077551918,
4.5261682611800005,
4.44426917718
]
},
{
"command": "pacquet@main",
"mean": 4.57628009028,
"stddev": 0.18404720596895371,
"median": 4.49177636468,
"user": 1.8559358999999997,
"system": 1.4261875599999998,
"min": 4.44148604018,
"max": 4.95929302118,
"times": [
4.44148604018,
4.44174999218,
4.52270400718,
4.47536460818,
4.95929302118,
4.50590344118,
4.63543514618,
4.47764928818,
4.85074409818,
4.45247126018
]
},
{
"command": "pnpr@HEAD",
"mean": 3.57108267888,
"stddev": 0.1251738274183992,
"median": 3.52302218818,
"user": 1.3661472,
"system": 1.3150792599999999,
"min": 3.45731524218,
"max": 3.88112341818,
"times": [
3.51294950218,
3.53309487418,
3.49142301318,
3.66342584518,
3.49424239418,
3.50840726718,
3.45731524218,
3.55229718018,
3.88112341818,
3.61654805218
]
},
{
"command": "pnpr@main",
"mean": 3.60510004068,
"stddev": 0.07996379235117361,
"median": 3.60564532468,
"user": 1.6116074999999999,
"system": 1.5680252599999995,
"min": 3.47391844418,
"max": 3.73310350218,
"times": [
3.47391844418,
3.63151320218,
3.66216018718,
3.69791967418,
3.73310350218,
3.62949779218,
3.58179285718,
3.55175713418,
3.55165331618,
3.53768429718
]
}
]
} |
|
| Branch | pr/13208 |
| 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,479.16 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 302.52 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 302.03 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 84.02 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,357.03 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,457.32 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 272.80 ms |
Summary
Finishes the
install/add/update/removerow of the recursive-command-parity tracker (Related to #13201).These commands already accepted the global
-r/--filterflags in a workspace, but pacquet's common install-family selector rejected every recursive or filtered invocation whensharedWorkspaceLockfile: false, failing withERR_PNPM_RECURSIVE_SHARED_LOCKFILE_UNSUPPORTED. The TypeScript CLI already supports both shared and per-project lockfiles here, so this brings pacquet up to that behavior.The selection now resolves into a three-way
InstallFamilyPlan:Single— not recursive: the existing active-project path (and the existing dedicated-lockfile whole-workspaceinstallloop).Shared— recursive/filtered over one sharedpnpm-lock.yaml(unchanged).PerProject— recursive/filtered withsharedWorkspaceLockfile: false: run one independent single-project install/add/update/remove for each selected project against its ownpnpm-lock.yaml,node_modules, and virtual store, mirroring pnpm's per-project loop in its recursive dispatch (installing/commands/src/recursive.ts).The per-project loop reuses the same config re-anchoring (
anchor_dedicated_project_config) that the non-recursive dedicated-lockfile install already uses, factored into a sharedinit_dedicated_project_statehelper.Notes for reviewers:
pLimit(workspaceConcurrency)); each dedicated lockfile is independent, so the final state is identical and this matches pacquet's existing non-recursive dedicated-lockfile install. The dirs are sorted, matching pnpm'sObject.keys(selectedProjectsGraph).sort().update's changeset generation stays a pipeline-level concern (captured before, generated after the loop), unchanged for the per-project case.Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting. — pacquet-only;matches existing TypeScript CLI behavior (noted above).
pnpm changeset) if this PR changes any publishedpackage.
install/add/update/removededicated-lockfilecases in
crates/cli/tests/install_filters.rs; replaced the test that assertedthe old rejection.
Written by an agent (Claude Code, claude-opus-4-8).
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
New Features
-r) and filtered (--filter) support for install, add, update, and remove commands in workspaces using dedicated lockfiles.Bug Fixes