Repository navigation
Conversation
|
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 (1)
📝 WalkthroughWalkthroughPacquet now derives ChangesShamefully hoisted root links
Estimated code review effort: 2 (Simple) | ~10 minutes Assessment against linked issues
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 QodoFix Rust config: derive public hoisting from shamefullyHoist
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (2): Last reviewed commit: "test(config): cover unset shameful hoist..." | Re-trigger Greptile |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pnpm/crates/config/src/tests.rs (1)
2635-2661: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winCover the unset-preservation branch.
These tests cover
trueandfalse, but not the compatibility case whereshamefullyHoistis unset and an explicitpublicHoistPatternmust be preserved. Add that regression case so theNone => {}branch cannot regress.As per path instructions,
REVIEW_GUIDE.mdrequires regression tests to prove the merged-configuration derivation contract, including unset preservation.🤖 Prompt for 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. In `@pnpm/crates/config/src/tests.rs` around lines 2635 - 2661, Add a regression test alongside shamefully_hoist_derives_the_public_hoist_pattern and shamefully_hoist_false_disables_public_hoisting that omits shamefullyHoist while setting an explicit publicHoistPattern, then assert Config preserves that pattern. This must exercise the unset/None branch of the shamefullyHoist-derived configuration logic.Source: Path instructions
🤖 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.
Nitpick comments:
In `@pnpm/crates/config/src/tests.rs`:
- Around line 2635-2661: Add a regression test alongside
shamefully_hoist_derives_the_public_hoist_pattern and
shamefully_hoist_false_disables_public_hoisting that omits shamefullyHoist while
setting an explicit publicHoistPattern, then assert Config preserves that
pattern. This must exercise the unset/None branch of the shamefullyHoist-derived
configuration logic.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 67dda0df-da07-47dd-ae41-d313a45732e3
📒 Files selected for processing (5)
.changeset/shamefully-hoist-root-links.mdpnpm/crates/cli/tests/dedupe_direct_deps.rspnpm/crates/cli/tests/hoist.rspnpm/crates/config/src/lib.rspnpm/crates/config/src/tests.rs
Code Review by Qodo
Context used✅ Compliance rules (platform):
24 rules 1. pnpm missing changeset entry
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Addressed CodeRabbit’s test-coverage suggestion in e9ef481 by adding a regression case that preserves an explicit Written by an agent (Codex, GPT-5). |
|
Code review by qodo was updated up to the latest commit e9ef481 |
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 #13447 +/- ##
=======================================
Coverage 87.64% 87.65%
=======================================
Files 545 545
Lines 93978 94018 +40
=======================================
+ Hits 82367 82410 +43
+ Misses 11611 11608 -3 ☔ 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.92540889492,
"stddev": 0.25026266452110385,
"median": 2.89871727442,
"user": 2.8016135199999996,
"system": 2.0944201799999993,
"min": 2.51856010092,
"max": 3.24843204592,
"times": [
2.86843436692,
2.51856010092,
3.15290535692,
2.74053731592,
3.21583526092,
3.24843204592,
3.12248376392,
2.9290001819200002,
2.7750134109199998,
2.68288714492
]
},
{
"command": "pacquet@main",
"mean": 3.6192979091199993,
"stddev": 0.5240446563322899,
"median": 3.5674644399199997,
"user": 3.73261032,
"system": 2.89396948,
"min": 3.00906198292,
"max": 4.57490814092,
"times": [
4.57490814092,
4.20540363592,
3.90353298492,
3.6710199169199997,
3.3050756679199997,
3.00906198292,
3.87793833292,
3.4639089629199997,
3.16591445292,
3.01621501292
]
},
{
"command": "pnpr@HEAD",
"mean": 1.85232117252,
"stddev": 0.19173527658012285,
"median": 1.90829686542,
"user": 2.0073076199999997,
"system": 2.1390801799999997,
"min": 1.5631369129200001,
"max": 2.14684593292,
"times": [
1.98263915892,
1.5814036379199998,
1.95818186992,
1.92544397092,
1.74726729292,
2.14684593292,
1.89114975992,
2.00632966992,
1.72081351892,
1.5631369129200001
]
},
{
"command": "pnpr@main",
"mean": 1.90941468862,
"stddev": 0.14777736830528185,
"median": 1.91137667342,
"user": 2.2222839199999997,
"system": 2.5256089799999994,
"min": 1.65905912692,
"max": 2.11368079592,
"times": [
1.65905912692,
1.9331622559200001,
1.91793532692,
2.11368079592,
1.83621985592,
1.72424126092,
2.06191694192,
1.8694384309199998,
2.07367487092,
1.90481801992
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.34714516384,
"stddev": 0.07909373168939383,
"median": 0.30401329224,
"user": 0.28919232,
"system": 0.6475334800000001,
"min": 0.29228675574,
"max": 0.53602508274,
"times": [
0.53602508274,
0.34668704574000003,
0.39996939374,
0.40210272374,
0.29297533974,
0.29442696874,
0.30898591374,
0.29228675574,
0.29904067074,
0.29895174374
]
},
{
"command": "pacquet@main",
"mean": 0.29511965584,
"stddev": 0.03450920214920444,
"median": 0.29044712274,
"user": 0.25128012,
"system": 0.56807138,
"min": 0.27272373574000003,
"max": 0.38989872674000003,
"times": [
0.27272373574000003,
0.38989872674000003,
0.29222819574000003,
0.29346977074,
0.28866604974,
0.29259745074,
0.27303009174000004,
0.29459766974,
0.28078775274,
0.27319711474
]
},
{
"command": "pnpr@HEAD",
"mean": 0.33384247094,
"stddev": 0.03980240165013183,
"median": 0.33344651974000006,
"user": 0.28152072,
"system": 0.61063878,
"min": 0.28333115274000004,
"max": 0.40497893074,
"times": [
0.29328897074,
0.28333115274000004,
0.28883305474,
0.33622026374,
0.31829035274,
0.33067277574000004,
0.34239498874,
0.40497893074,
0.37063651174,
0.36977770774
]
},
{
"command": "pnpr@main",
"mean": 0.37175351864000006,
"stddev": 0.04170833042551015,
"median": 0.39242342674,
"user": 0.31369452,
"system": 0.6826041800000001,
"min": 0.31431840674,
"max": 0.41663923674000003,
"times": [
0.40713171774,
0.39413965774000004,
0.39732189774000004,
0.41233077874,
0.41663923674000003,
0.34165522774,
0.39070719574,
0.31431840674,
0.32286252574,
0.32042854174
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.96013145348,
"stddev": 0.062338294456109104,
"median": 2.9525265466799997,
"user": 2.23222132,
"system": 1.5955659800000002,
"min": 2.90171491768,
"max": 3.0969702676799997,
"times": [
2.9024320866799997,
2.95076436068,
2.97927778468,
2.96740547968,
2.90297436568,
3.0969702676799997,
3.0246160716799997,
2.95428873268,
2.90171491768,
2.92087046768
]
},
{
"command": "pacquet@main",
"mean": 2.9952644141800002,
"stddev": 0.14857762292906435,
"median": 2.9719134376799996,
"user": 2.2520673199999997,
"system": 1.6790724799999999,
"min": 2.82573484868,
"max": 3.23831342468,
"times": [
3.20685732168,
3.07122299668,
2.86902457768,
2.82573484868,
3.03470325268,
3.05464085068,
3.23831342468,
2.9091236226799997,
2.84644961568,
2.89657363068
]
},
{
"command": "pnpr@HEAD",
"mean": 1.7606948895799999,
"stddev": 0.11516574027158147,
"median": 1.79282930418,
"user": 1.39002232,
"system": 1.49279258,
"min": 1.59947555168,
"max": 1.9494198456800003,
"times": [
1.9494198456800003,
1.78594792468,
1.6508958016800002,
1.80743324868,
1.8100609346800003,
1.88536806068,
1.6217384976800002,
1.59947555168,
1.69689834668,
1.79971068368
]
},
{
"command": "pnpr@main",
"mean": 1.64633689658,
"stddev": 0.14236857503797773,
"median": 1.65007830218,
"user": 1.17967882,
"system": 1.25809248,
"min": 1.4315954006800002,
"max": 1.8739696416800002,
"times": [
1.5655679656800001,
1.5486469226800001,
1.8088892736800002,
1.60382485168,
1.4315954006800002,
1.6963317526800001,
1.7359552656800001,
1.71161982668,
1.8739696416800002,
1.48696806468
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.8059845028,
"stddev": 0.08670952888853635,
"median": 0.7811671846999999,
"user": 1.0107192799999998,
"system": 0.82433698,
"min": 0.6693198422,
"max": 0.9305597162,
"times": [
0.7679588912,
0.8061090362,
0.8964739762,
0.9292652252,
0.9305597162,
0.7653908072,
0.7679615362,
0.6693198422,
0.7324331642,
0.7943728332
]
},
{
"command": "pacquet@main",
"mean": 0.6941763288999999,
"stddev": 0.08006506957821338,
"median": 0.6730257942,
"user": 0.85798358,
"system": 0.72278908,
"min": 0.6356098572,
"max": 0.9114237692,
"times": [
0.7056899651999999,
0.9114237692,
0.6356098572,
0.6651703072,
0.6896739882,
0.6426660222,
0.7007635402,
0.6688316451999999,
0.6772199432,
0.6447142512
]
},
{
"command": "pnpr@HEAD",
"mean": 0.3415289821000001,
"stddev": 0.022723637085787615,
"median": 0.3467128532,
"user": 0.23718128,
"system": 0.59291048,
"min": 0.3106487002,
"max": 0.36801132820000004,
"times": [
0.3395634582,
0.33117925820000005,
0.31549716920000004,
0.36801132820000004,
0.3538622482,
0.31254256820000004,
0.3106487002,
0.36615242620000005,
0.35939371820000005,
0.3584389462
]
},
{
"command": "pnpr@main",
"mean": 0.3599206119,
"stddev": 0.026718505801026297,
"median": 0.36272078920000006,
"user": 0.24887527999999998,
"system": 0.61208278,
"min": 0.31233406620000004,
"max": 0.3952431632,
"times": [
0.36203097320000005,
0.3952431632,
0.3634106052,
0.37959786320000005,
0.31233406620000004,
0.33525907120000004,
0.3326192122,
0.3905087092,
0.3737129992,
0.3544894562
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.1541097091399997,
"stddev": 0.06106741486838064,
"median": 2.14177391514,
"user": 1.4074512999999997,
"system": 0.9369856599999998,
"min": 2.08159737714,
"max": 2.30824540014,
"times": [
2.11939782614,
2.18889079014,
2.13889535314,
2.08159737714,
2.14465247714,
2.12385996914,
2.14564472114,
2.16308662714,
2.12682655014,
2.30824540014
]
},
{
"command": "pacquet@main",
"mean": 2.18340634664,
"stddev": 0.0676563063548063,
"median": 2.18226932214,
"user": 1.4510797000000002,
"system": 0.9912318600000001,
"min": 2.09022572614,
"max": 2.27409603014,
"times": [
2.14378950614,
2.09022572614,
2.20250436414,
2.24131880714,
2.16203428014,
2.23301687214,
2.27409603014,
2.26136732914,
2.10784216914,
2.11786838214
]
},
{
"command": "pnpr@HEAD",
"mean": 0.35816605844000005,
"stddev": 0.027394663387374577,
"median": 0.34940434714,
"user": 0.26091429999999993,
"system": 0.59226826,
"min": 0.33733948914000006,
"max": 0.43087723114000004,
"times": [
0.43087723114000004,
0.36941035414000006,
0.35062284214000006,
0.34651872214,
0.33733948914000006,
0.34205912414000006,
0.35319999214000003,
0.34059155714000006,
0.34818585214000003,
0.36285542014000005
]
},
{
"command": "pnpr@main",
"mean": 0.35706698084,
"stddev": 0.03662979800954142,
"median": 0.34553949214,
"user": 0.23687459999999994,
"system": 0.5995136600000002,
"min": 0.31487016914000004,
"max": 0.42686970314000006,
"times": [
0.31487016914000004,
0.33220021414000006,
0.37152007714,
0.42686970314000006,
0.40889467714000005,
0.34792213814000006,
0.34315684614,
0.32862903514,
0.33000190414,
0.36660504414000006
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.48548944544,
"stddev": 0.0350341118246385,
"median": 0.4796563836400001,
"user": 0.47591084000000006,
"system": 0.08226799999999998,
"min": 0.43859586114000004,
"max": 0.55144029214,
"times": [
0.51379409314,
0.46290985514000005,
0.55144029214,
0.51562485114,
0.45390822514000007,
0.43859586114000004,
0.45846170914000006,
0.46854163514,
0.5008468001399999,
0.49077113214000007
]
},
{
"command": "pacquet@main",
"mean": 0.44932850044000006,
"stddev": 0.02666934857997893,
"median": 0.45448914864000006,
"user": 0.43187523999999994,
"system": 0.0788894,
"min": 0.39749639214000004,
"max": 0.47728869414,
"times": [
0.43210434314000007,
0.46911659714000004,
0.41965006414000006,
0.45833058214000005,
0.47710261414000005,
0.47037929814000007,
0.47728869414,
0.45064771514000007,
0.39749639214000004,
0.44116870414000003
]
},
{
"command": "pnpr@HEAD",
"mean": 0.09226562463999999,
"stddev": 0.0028196020853773923,
"median": 0.09178532064,
"user": 0.02248240666666667,
"system": 0.011930026666666668,
"min": 0.08667014514,
"max": 0.10111547214000001,
"times": [
0.09302166114,
0.09179117114,
0.09048441814000001,
0.09241065514,
0.09129191514000001,
0.09209708514,
0.09244031014000001,
0.09135813914,
0.09177947014000001,
0.09042913414,
0.09117031614000001,
0.09142590514000001,
0.08667014514,
0.08751217614000001,
0.09093144714000001,
0.09197112014,
0.09132158914,
0.09039802614,
0.09164457614,
0.09282562414000001,
0.09095821714,
0.09146487814000001,
0.09395408314,
0.09216712814000001,
0.09785729314000001,
0.09437198814,
0.09182667914,
0.09279453614000001,
0.10111547214000001,
0.09848357914000001
]
},
{
"command": "pnpr@main",
"mean": 0.09634540347333333,
"stddev": 0.006651296043454936,
"median": 0.09598815364,
"user": 0.025672239999999995,
"system": 0.012666033333333332,
"min": 0.08970703714,
"max": 0.12770856013999998,
"times": [
0.09420087614000001,
0.09730434514000001,
0.09640759114000001,
0.09560408214,
0.09684861814000001,
0.08970703714,
0.09303818414000001,
0.09102296914,
0.09277009914,
0.09052134714000001,
0.09130991714,
0.09171072114,
0.09108717914,
0.09329462414,
0.09418231114,
0.09685730514,
0.10081642014,
0.09751689414,
0.09723425314,
0.09669684414,
0.09341030114000001,
0.10079143314000001,
0.09726378814,
0.09779639814,
0.10066039714000001,
0.09547574114000001,
0.09637222514,
0.09559324114000001,
0.09715840014,
0.12770856013999998
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.6868065448800005,
"stddev": 0.10078683433556014,
"median": 4.68119263018,
"user": 2.2617468799999996,
"system": 1.76546414,
"min": 4.53797692168,
"max": 4.88825200968,
"times": [
4.69555574868,
4.57954717668,
4.66742408068,
4.6913762086799995,
4.88825200968,
4.78565995368,
4.61887667368,
4.53797692168,
4.67100905168,
4.73238762368
]
},
{
"command": "pacquet@main",
"mean": 4.6855468480799995,
"stddev": 0.13925747777666647,
"median": 4.6877868841799994,
"user": 2.39118398,
"system": 1.7764159400000001,
"min": 4.5033819266799995,
"max": 4.92737405768,
"times": [
4.56462049668,
4.80743513468,
4.5033819266799995,
4.92737405768,
4.65710079368,
4.51985376868,
4.81463218068,
4.71847297468,
4.61225258668,
4.73034456068
]
},
{
"command": "pnpr@HEAD",
"mean": 3.6562252593799998,
"stddev": 0.08732429654911533,
"median": 3.66782274168,
"user": 1.70195908,
"system": 1.6995870399999997,
"min": 3.52662253468,
"max": 3.77251312168,
"times": [
3.72823073268,
3.60563856168,
3.67771093268,
3.53621524068,
3.60426812668,
3.77251312168,
3.76596735168,
3.65793455068,
3.52662253468,
3.68715144068
]
},
{
"command": "pnpr@main",
"mean": 3.64882038798,
"stddev": 0.11282750987793712,
"median": 3.62898936518,
"user": 1.6617881799999998,
"system": 1.6161014400000002,
"min": 3.51433942368,
"max": 3.89690454368,
"times": [
3.57486862368,
3.64035551868,
3.66951022168,
3.58937275668,
3.89690454368,
3.51433942368,
3.70300540168,
3.74457421268,
3.53764996568,
3.61762321168
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13447 |
| 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,599.48 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 337.34 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 310.65 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 86.67 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,563.14 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,526.62 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 283.33 ms |
Summary
Fixes #13444.
The Rust CLI parsed
shamefullyHoistbut did not derive the correspondingpublic hoist pattern, so
shamefullyHoist: truecould leave dependenciesmissing from the root
node_modules.Apply the derivation after all configuration sources are merged:
truesetspublicHoistPatternto["*"]falsedisables public hoistingThe TypeScript CLI already applies this derivation, so no TypeScript change is
needed. The Rust config and CLI regression tests now cover the behavior, and a
patch changeset is included for
pacquet.Validation:
just readyverified the previously missing root links are created
Squash Commit Body
Checklist
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 (Codex, GPT-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
Bug Fixes
shamefullyHoist: trueso public dependency links are created at the project root as expected.shamefullyHoist: falsereliably disables public hoisting, even whenpublicHoistPatternis set.shamefullyHoistis merged with other hoisting-related settings.Tests
shamefullyHoistaffects the derivedpublicHoistPatternwhen set totrue,false, or left unset.