Repository navigation
fix(overrides): apply removal overrides to optional peers declared only in peerDependenciesMeta - #16682
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthroughRemoval overrides now apply to optional peers listed only in ChangesOptional peer removal
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Bug fix · Severity of issue fixed: Medium Assessment against linked issues
Possibly related PRs
Suggested labels: Merge Risk: ⚪ Minimal · up to The change applies removal overrides to metadata-only optional peers, with tests covering both package-manager paths. No concrete merge-blocking risk is established. ✨ Finishing Touches🧪 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 #16682 +/- ##
=======================================
Coverage 92.36% 92.36%
=======================================
Files 1593 1594 +1
Lines 210358 210394 +36
=======================================
+ Hits 194297 194331 +34
- Misses 16061 16063 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.46348585596,
"stddev": 0.10047469812164214,
"median": 2.4500081627599997,
"user": 1.46257986,
"system": 1.4557851,
"min": 2.31530060526,
"max": 2.6263796672599997
},
{
"command": "pacquet@main",
"mean": 2.42410839236,
"stddev": 0.09943003514578792,
"median": 2.39663159676,
"user": 1.4592661599999999,
"system": 1.4003352,
"min": 2.31783653926,
"max": 2.60619196526
},
{
"command": "pnpr@HEAD",
"mean": 1.42239399406,
"stddev": 0.1314048719062398,
"median": 1.3649520397600001,
"user": 1.4943962599999998,
"system": 1.4970491000000004,
"min": 1.3153057812600002,
"max": 1.71934150226
},
{
"command": "pnpr@main",
"mean": 1.42120260776,
"stddev": 0.10096074861155671,
"median": 1.37750954826,
"user": 1.4666358599999998,
"system": 1.3316893,
"min": 1.31844937126,
"max": 1.6420844232600003
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24354236600000007,
"stddev": 0.014727209134528076,
"median": 0.24403905470000004,
"user": 0.27013677999999997,
"system": 0.58932954,
"min": 0.22397944670000003,
"max": 0.2790964917
},
{
"command": "pacquet@main",
"mean": 0.23999223949999998,
"stddev": 0.013171494590230861,
"median": 0.23788869370000001,
"user": 0.26850508000000006,
"system": 0.58925104,
"min": 0.22415183770000002,
"max": 0.2686947607
},
{
"command": "pnpr@HEAD",
"mean": 0.2554384302,
"stddev": 0.008859453313859443,
"median": 0.2556847487,
"user": 0.27430057999999996,
"system": 0.5926526399999998,
"min": 0.24108276770000003,
"max": 0.2725104507
},
{
"command": "pnpr@main",
"mean": 0.3187583829999999,
"stddev": 0.08874120239176467,
"median": 0.2714768772,
"user": 0.33601298,
"system": 0.71431154,
"min": 0.24707199570000002,
"max": 0.4878309717
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.009985942603275266,
"stddev": 0.0016814097455283587,
"median": 0.00973137622,
"user": 0.005743574494773524,
"system": 0.00496564508710801,
"min": 0.00867402922,
"max": 0.03667643222
},
{
"command": "pacquet@main",
"mean": 0.009780310393431739,
"stddev": 0.0006593656437798456,
"median": 0.009653388220000001,
"user": 0.0057277935055350514,
"system": 0.004912854464944648,
"min": 0.00852943622,
"max": 0.013003254220000001
},
{
"command": "pnpr@HEAD",
"mean": 0.010080780143344951,
"stddev": 0.0005297870687744432,
"median": 0.010039895220000001,
"user": 0.005461679024390242,
"system": 0.005560307735191637,
"min": 0.008613013220000002,
"max": 0.012736563220000002
},
{
"command": "pnpr@main",
"mean": 0.009531557536725981,
"stddev": 0.0005060266496834741,
"median": 0.00950606122,
"user": 0.005624253380782919,
"system": 0.004753769110320287,
"min": 0.008334219220000001,
"max": 0.011616508220000002
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.008089121360149257,
"stddev": 0.0004768335303280469,
"median": 0.00804079214,
"user": 0.005037330597014925,
"system": 0.0037809600746268658,
"min": 0.007172059140000001,
"max": 0.01049400614
},
{
"command": "pacquet@main",
"mean": 0.008283072516306616,
"stddev": 0.0005504480705404689,
"median": 0.00823525214,
"user": 0.004776436933797909,
"system": 0.00428210292682927,
"min": 0.00732746014,
"max": 0.01089001814
},
{
"command": "pnpr@HEAD",
"mean": 0.008681246651538457,
"stddev": 0.0006447377022960247,
"median": 0.008630347640000001,
"user": 0.004990292307692304,
"system": 0.004541985384615383,
"min": 0.0073393031400000005,
"max": 0.01146215114
},
{
"command": "pnpr@main",
"mean": 0.012131005039628245,
"stddev": 0.003129091390845588,
"median": 0.01200986814,
"user": 0.006910266914498142,
"system": 0.006218230185873603,
"min": 0.007184191140000001,
"max": 0.02150832414
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.67606365882,
"stddev": 0.11955367672740427,
"median": 2.63322984142,
"user": 2.3450217799999997,
"system": 2.3018218599999996,
"min": 2.57861205192,
"max": 2.97231957792
},
{
"command": "pacquet@main",
"mean": 2.6551492422199994,
"stddev": 0.04680936359793667,
"median": 2.65269510092,
"user": 2.42768718,
"system": 2.06994766,
"min": 2.59939522992,
"max": 2.75311173392
},
{
"command": "pnpr@HEAD",
"mean": 1.6048188359199997,
"stddev": 0.10302986513235557,
"median": 1.5802555299199998,
"user": 1.4445913799999999,
"system": 1.68983526,
"min": 1.46878935292,
"max": 1.76777099292
},
{
"command": "pnpr@main",
"mean": 1.6010663405199999,
"stddev": 0.12673003995399784,
"median": 1.60222512242,
"user": 1.4937007799999997,
"system": 1.7372936599999995,
"min": 1.44786944792,
"max": 1.8172240899199998
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.8518928536400002,
"stddev": 0.2827486112347905,
"median": 0.7126615726400001,
"user": 1.23070876,
"system": 1.33480868,
"min": 0.6049475671400001,
"max": 1.37295116314
},
{
"command": "pacquet@main",
"mean": 0.55740252774,
"stddev": 0.031722442930887045,
"median": 0.5519717416400001,
"user": 0.81673846,
"system": 0.90148858,
"min": 0.51620692414,
"max": 0.61135115614
},
{
"command": "pnpr@HEAD",
"mean": 0.3373229749400001,
"stddev": 0.03640524988158926,
"median": 0.32193785764000005,
"user": 0.30475065999999995,
"system": 0.64047048,
"min": 0.30787492214000006,
"max": 0.42958913414000005
},
{
"command": "pnpr@main",
"mean": 0.39968742974000004,
"stddev": 0.11883874193141564,
"median": 0.34925545314000006,
"user": 0.37015796,
"system": 0.8017359799999999,
"min": 0.31356492314000006,
"max": 0.6870691391400001
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.68095247184,
"stddev": 0.11392700586317929,
"median": 1.62984147364,
"user": 0.9929621599999999,
"system": 0.93527596,
"min": 1.61325681564,
"max": 1.9573637576400003
},
{
"command": "pacquet@main",
"mean": 1.6317459621400001,
"stddev": 0.02279160591204063,
"median": 1.6303312621400001,
"user": 0.9166935599999999,
"system": 0.84023896,
"min": 1.5973822936400002,
"max": 1.6627391856400002
},
{
"command": "pnpr@HEAD",
"mean": 0.3723171544400001,
"stddev": 0.06205454957559686,
"median": 0.38888043664000005,
"user": 0.34702115999999994,
"system": 0.73640776,
"min": 0.29679431464,
"max": 0.44499612064000005
},
{
"command": "pnpr@main",
"mean": 0.29863642224,
"stddev": 0.01885471415099512,
"median": 0.29130397314,
"user": 0.24618536,
"system": 0.5942048600000001,
"min": 0.27282180264,
"max": 0.33452770164
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.34754219776,
"stddev": 0.033939229953086666,
"median": 0.33735989866000005,
"user": 0.35796407999999996,
"system": 0.13670869999999996,
"min": 0.31252827816,
"max": 0.41665677116
},
{
"command": "pacquet@main",
"mean": 0.29671765646,
"stddev": 0.05925676673545306,
"median": 0.28095149316,
"user": 0.28666238,
"system": 0.11357149999999998,
"min": 0.23028417116,
"max": 0.39066790516
},
{
"command": "pnpr@HEAD",
"mean": 0.09885320012666668,
"stddev": 0.005860499278577573,
"median": 0.09735685766,
"user": 0.03741124666666666,
"system": 0.017475033333333338,
"min": 0.09173585216,
"max": 0.11717199616000001
},
{
"command": "pnpr@main",
"mean": 0.09881849402206896,
"stddev": 0.0037324149871757937,
"median": 0.09802628616,
"user": 0.03991963862068966,
"system": 0.015759779310344828,
"min": 0.09287634116,
"max": 0.10772694716
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.2399754432266667,
"stddev": 0.02817264508213118,
"median": 0.23420021556,
"user": 0.2408490088888889,
"system": 0.05105139555555555,
"min": 0.20983440256000002,
"max": 0.30386470656000003
},
{
"command": "pacquet@main",
"mean": 0.3126904536711111,
"stddev": 0.09108716141936331,
"median": 0.24962843056,
"user": 0.3149591199999999,
"system": 0.06962228444444446,
"min": 0.22728526856,
"max": 0.43837394556000003
},
{
"command": "pnpm@HEAD",
"mean": 4.297360222782221,
"stddev": 0.46678430779318336,
"median": 4.087845650559999,
"user": 6.730671342222221,
"system": 0.45513084000000004,
"min": 3.6920759225600004,
"max": 4.97954822256
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24468345606000005,
"stddev": 0.01254111931834838,
"median": 0.24523011706000003,
"user": 0.19432568999999997,
"system": 0.09822502333333331,
"min": 0.23001021056,
"max": 0.27447847556000005
},
{
"command": "pacquet@main",
"mean": 0.2525719262266667,
"stddev": 0.01135401967352914,
"median": 0.24801187606000002,
"user": 0.20286035666666666,
"system": 0.10245460666666666,
"min": 0.24204492156000001,
"max": 0.27473703256000004
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.660843122099999,
"stddev": 0.18492028062065866,
"median": 4.610585145,
"user": 1.78513908,
"system": 1.69633188,
"min": 4.497511150999999,
"max": 5.085149770999999
},
{
"command": "pacquet@main",
"mean": 4.575860968700001,
"stddev": 0.1366354225258,
"median": 4.5427251669999995,
"user": 1.78860538,
"system": 1.6384701799999999,
"min": 4.3969624959999996,
"max": 4.821074348
},
{
"command": "pnpr@HEAD",
"mean": 3.6026074591000006,
"stddev": 0.09736089353688918,
"median": 3.612190957,
"user": 1.5988120799999999,
"system": 1.54999918,
"min": 3.471976405,
"max": 3.7307472820000003
},
{
"command": "pnpr@main",
"mean": 3.597991007,
"stddev": 0.12610562460993124,
"median": 3.5497309694999997,
"user": 1.6825696799999998,
"system": 1.49882928,
"min": 3.469953629,
"max": 3.868661151
}
]
}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.21195445054857145,
"stddev": 0.028512573079730506,
"median": 0.20520270662,
"user": 0.26105982285714285,
"system": 0.25493708000000004,
"min": 0.17615768162,
"max": 0.26129876262
},
{
"command": "pacquet@main",
"mean": 0.13799860757000001,
"stddev": 0.03518864282260359,
"median": 0.12796350662,
"user": 0.17483262999999996,
"system": 0.15334208,
"min": 0.10745780162000002,
"max": 0.22446384862000002
},
{
"command": "pnpr@HEAD",
"mean": 0.13146127619142858,
"stddev": 0.00657699354258876,
"median": 0.13182128962,
"user": 0.1480011085714286,
"system": 0.13217884190476184,
"min": 0.11786340062000002,
"max": 0.14124058162000003
},
{
"command": "pnpr@main",
"mean": 0.1357120121755556,
"stddev": 0.006638618432106012,
"median": 0.13643862862,
"user": 0.14991312444444443,
"system": 0.13938508,
"min": 0.11947812062000002,
"max": 0.14905893262000003
}
]
} |
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
83c0541 to
cd30373
Compare
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
The apply_to_arc fast path runs on every resolved manifest, and it only needs a yes/no answer, so it no longer allocates a String per peerDependenciesMeta key. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Code Review by Qodo
1. Overrides remove ignored peer metadata
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
|
Code review by qodo was updated up to the latest commit 76bc14a |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
Rebased onto Review status on 76bc14a: CodeRabbit approved with no actionable comments. Greptile did not review (trial ended) and Qodo reviews are paused for this author. All checks are green. The PR's ready-for-review status was left as is. Nothing remains within the scope of this fix. Written by an agent (Claude Code, claude-opus-5-5). |
Summary
A removal override such as
"debug>supports-color": "-"did nothing when the package declares the optional peer only inpeerDependenciesMeta, with nopeerDependenciesentry.[email protected]andfollow-redirectsdo this. The resolver treats such an entry as an optional*peer, but the overrider only walkedpeerDependencies, so the meta entry stayed and a sibling workspace project could still supply the peer.The overrider now also checks every
peerDependenciesMetaname thatpeerDependenciesdoes not declare, matching it against the overrides as*. When the chosen override is-, the meta entry is removed. Both pnpm v11 and v12 had the bug, so both are fixed. In v12,apply_to_arcskips manifests that no override applies to, so that check now counts these entries too.With this change the issue's script gives
[email protected]with no peer suffix, the same asws.Fixes #16681
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).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit