Repository navigation
Conversation
preferred-pm recognized pnpm only by a pnpm-lock.yaml, so a git-hosted dependency that is a pnpm workspace without a committed lockfile fell back to npm. npm then honoured the dependency's own .npmrc settings, such as ignore-scripts, and could skip the build. preferred-pm 5.0.1 also looks for pnpm-workspace.yaml once no lockfile in the package directory names a package manager. That matches the order the v12 git fetcher uses since #15660, where a lockfile still wins over the workspace file. The test asserts which lockfile the prepare step leaves behind. It only fails without the fix when no ancestor of the test directory holds a pnpm-lock.yaml, because preferred-pm searches parent directories for one. Closes #14011 Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. 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 (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review. 📝 WalkthroughWalkthroughThe preferred-pm catalog version changes from ChangesWorkspace package manager selection
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Assessment against linked issues
Suggested labels: Merge Risk: ⚪ Minimal · up to The change is mergeable after normal checks. The added test targets the reported workspace preparation behavior, and no actionable issue remains. Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 2 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
✨ 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 |
PR Summary by QodoPrepare lockfile-less pnpm workspaces with pnpm in v11
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
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.3888323523599997,
"stddev": 0.16136487123354443,
"median": 2.32086506316,
"user": 1.5034650600000001,
"system": 1.5380710199999998,
"min": 2.2749504316599998,
"max": 2.74110381766
},
{
"command": "pacquet@main",
"mean": 2.41013395256,
"stddev": 0.12875999852607037,
"median": 2.39915635366,
"user": 1.44000216,
"system": 1.4210045199999999,
"min": 2.2605380026599997,
"max": 2.5811306096599997
},
{
"command": "pnpr@HEAD",
"mean": 1.4519922513599999,
"stddev": 0.12278990808443561,
"median": 1.42650785866,
"user": 1.3924083600000001,
"system": 1.38226512,
"min": 1.2975095216599999,
"max": 1.66725035866
},
{
"command": "pnpr@main",
"mean": 1.42106685336,
"stddev": 0.08243045543202458,
"median": 1.40574570466,
"user": 1.37311136,
"system": 1.4157351200000001,
"min": 1.3046304546599998,
"max": 1.5871707876599999
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.27365718992,
"stddev": 0.046148561786443006,
"median": 0.26077392212000006,
"user": 0.29549566,
"system": 0.634702,
"min": 0.23553727712,
"max": 0.39336483712000003
},
{
"command": "pacquet@main",
"mean": 0.25943226752000004,
"stddev": 0.0136800863944649,
"median": 0.26199354362000005,
"user": 0.28981236000000005,
"system": 0.5917378,
"min": 0.23647268012,
"max": 0.28165160312000004
},
{
"command": "pnpr@HEAD",
"mean": 0.26137693062000006,
"stddev": 0.021595612357155222,
"median": 0.25882990062,
"user": 0.26792485999999993,
"system": 0.5760691999999998,
"min": 0.23931190512,
"max": 0.31113778212000004
},
{
"command": "pnpr@main",
"mean": 0.29128700422000003,
"stddev": 0.019550661133043244,
"median": 0.29594512962,
"user": 0.31245016000000003,
"system": 0.6254181000000001,
"min": 0.26022295312000004,
"max": 0.32138395912
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.010543715723649634,
"stddev": 0.000796424602110384,
"median": 0.01047186622,
"user": 0.00606887591240876,
"system": 0.005140745693430657,
"min": 0.00890033522,
"max": 0.01434080022
},
{
"command": "pacquet@main",
"mean": 0.010320031882790699,
"stddev": 0.0007220810899068019,
"median": 0.01029246172,
"user": 0.005803732558139539,
"system": 0.005207476124031006,
"min": 0.00829637722,
"max": 0.01266679522
},
{
"command": "pnpr@HEAD",
"mean": 0.010438123672380955,
"stddev": 0.001027204212906888,
"median": 0.01027237622,
"user": 0.005952341269841274,
"system": 0.00514612238095238,
"min": 0.00828555722,
"max": 0.01352854222
},
{
"command": "pnpr@main",
"mean": 0.010507101209436613,
"stddev": 0.0008863273032765655,
"median": 0.010476486220000001,
"user": 0.005639489436619718,
"system": 0.005557175633802816,
"min": 0.00830689722,
"max": 0.013711328220000001
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.009320884073264252,
"stddev": 0.0006502786741780098,
"median": 0.00925562398,
"user": 0.005204776476683938,
"system": 0.004562004663212436,
"min": 0.00800370498,
"max": 0.01238853298
},
{
"command": "pacquet@main",
"mean": 0.008509757864169881,
"stddev": 0.0008310747043198278,
"median": 0.00889932498,
"user": 0.004845606872586873,
"system": 0.004097254054054056,
"min": 0.00680277098,
"max": 0.010614192980000001
},
{
"command": "pnpr@HEAD",
"mean": 0.00774463865741936,
"stddev": 0.0008512141023351237,
"median": 0.00760195998,
"user": 0.00424980136200717,
"system": 0.0038906928315412164,
"min": 0.0068997929800000005,
"max": 0.01529361398
},
{
"command": "pnpr@main",
"mean": 0.008692333281324504,
"stddev": 0.0011952133903893592,
"median": 0.00901778198,
"user": 0.004915920662251658,
"system": 0.004202332450331127,
"min": 0.00700909798,
"max": 0.01282335998
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.59701482858,
"stddev": 0.07856670317588471,
"median": 2.59391444518,
"user": 2.0815095799999996,
"system": 1.68588938,
"min": 2.49218134518,
"max": 2.76681249018
},
{
"command": "pacquet@main",
"mean": 2.54646056168,
"stddev": 0.04482207163375799,
"median": 2.5333605526799996,
"user": 1.98340608,
"system": 1.59030298,
"min": 2.50248203618,
"max": 2.65514993018
},
{
"command": "pnpr@HEAD",
"mean": 1.5481657084800002,
"stddev": 0.1322840268101539,
"median": 1.55305835768,
"user": 1.21834098,
"system": 1.20493138,
"min": 1.3865803211799999,
"max": 1.77359891218
},
{
"command": "pnpr@main",
"mean": 1.5809364587800003,
"stddev": 0.115926840854694,
"median": 1.59082874218,
"user": 1.2760149799999998,
"system": 1.36389758,
"min": 1.43541555118,
"max": 1.7279070701800001
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.47273917157999995,
"stddev": 0.048579645029290554,
"median": 0.47246093078000007,
"user": 0.6455944,
"system": 0.7877371,
"min": 0.41586285978000004,
"max": 0.58496930678
},
{
"command": "pacquet@main",
"mean": 0.4703741173800001,
"stddev": 0.02307422397446442,
"median": 0.47109634028,
"user": 0.6453235,
"system": 0.7538658,
"min": 0.43060515578,
"max": 0.5112314587800001
},
{
"command": "pnpr@HEAD",
"mean": 0.29291382308,
"stddev": 0.012007983863072199,
"median": 0.29173061678,
"user": 0.25536250000000005,
"system": 0.554059,
"min": 0.26811305578,
"max": 0.30989356778
},
{
"command": "pnpr@main",
"mean": 0.30632276108,
"stddev": 0.04153262407766556,
"median": 0.29892787377999996,
"user": 0.259742,
"system": 0.5941588,
"min": 0.27918502278,
"max": 0.42112618578
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.6083598890600002,
"stddev": 0.025757115573151187,
"median": 1.60851182756,
"user": 0.83262754,
"system": 0.79730014,
"min": 1.57884625106,
"max": 1.6483957580600002
},
{
"command": "pacquet@main",
"mean": 1.6397979152600002,
"stddev": 0.02144230917733124,
"median": 1.6399610250600003,
"user": 0.88043294,
"system": 0.8467412400000001,
"min": 1.6014090440600002,
"max": 1.6702910380600002
},
{
"command": "pnpr@HEAD",
"mean": 0.28024217875999996,
"stddev": 0.007352043302090597,
"median": 0.28156038555999996,
"user": 0.23580404000000002,
"system": 0.54190044,
"min": 0.26317293206,
"max": 0.28988361006
},
{
"command": "pnpr@main",
"mean": 0.28184166586000003,
"stddev": 0.009384128682094782,
"median": 0.27821799806,
"user": 0.22970323999999995,
"system": 0.56167974,
"min": 0.27130121506,
"max": 0.29895979206
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.23771143443384618,
"stddev": 0.014560955859583648,
"median": 0.23734913128000001,
"user": 0.2147645953846154,
"system": 0.11088424615384615,
"min": 0.21960517928000003,
"max": 0.26781695828
},
{
"command": "pacquet@main",
"mean": 0.30186129678000007,
"stddev": 0.052097829015316656,
"median": 0.32105672128000007,
"user": 0.2794573133333333,
"system": 0.14572715,
"min": 0.22663709028000004,
"max": 0.36732318028000005
},
{
"command": "pnpr@HEAD",
"mean": 0.11565503353000002,
"stddev": 0.005585087451431961,
"median": 0.11489066828,
"user": 0.05128181333333332,
"system": 0.02622656666666666,
"min": 0.10601657228,
"max": 0.12875059328000002
},
{
"command": "pnpr@main",
"mean": 0.10687062284521741,
"stddev": 0.007887391397949212,
"median": 0.10378326428,
"user": 0.04584515391304347,
"system": 0.021953921739130428,
"min": 0.09927620928,
"max": 0.12692395228000003
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.2200318058244444,
"stddev": 0.08495982664972629,
"median": 1.20461928638,
"user": 1.2729262777777777,
"system": 0.4592010266666667,
"min": 1.09067188038,
"max": 1.35530743838
},
{
"command": "pacquet@main",
"mean": 1.2216999980466667,
"stddev": 0.16234031542039035,
"median": 1.25217464238,
"user": 1.2775739444444443,
"system": 0.4689975822222222,
"min": 0.82932643338,
"max": 1.3490307473799998
},
{
"command": "pnpm@HEAD",
"mean": 3.1105743506022225,
"stddev": 0.10266766395666684,
"median": 3.1188959353800003,
"user": 4.4713365,
"system": 0.30957547111111117,
"min": 2.9594272693800003,
"max": 3.29242119938
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.20020369001428576,
"stddev": 0.003933311260982402,
"median": 0.19987932630000002,
"user": 0.15521372857142857,
"system": 0.08182716,
"min": 0.19429034330000003,
"max": 0.20700368230000002
},
{
"command": "pacquet@main",
"mean": 0.19821421730000002,
"stddev": 0.010941207956605936,
"median": 0.1963508338,
"user": 0.15794544285714282,
"system": 0.0735629457142857,
"min": 0.18518259730000003,
"max": 0.21913025030000002
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.544101080820001,
"stddev": 0.10470168247677655,
"median": 4.54914157162,
"user": 2.2904493599999998,
"system": 2.1575342399999995,
"min": 4.41338591762,
"max": 4.76084319162
},
{
"command": "pacquet@main",
"mean": 4.56233601302,
"stddev": 0.15336471369950283,
"median": 4.51559553812,
"user": 2.10534856,
"system": 2.0055014399999997,
"min": 4.41333303762,
"max": 4.82142948562
},
{
"command": "pnpr@HEAD",
"mean": 3.5595590183199994,
"stddev": 0.09729297473680279,
"median": 3.5328907316200002,
"user": 1.87395116,
"system": 1.73234164,
"min": 3.4623134516199996,
"max": 3.7322713516199997
},
{
"command": "pnpr@main",
"mean": 3.5430265399199996,
"stddev": 0.09225052170252551,
"median": 3.54115062312,
"user": 1.8829549599999997,
"system": 1.79498604,
"min": 3.44095171762,
"max": 3.70326435962
}
]
}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.12353330929904761,
"stddev": 0.008363176622548209,
"median": 0.12140236768,
"user": 0.14568431904761903,
"system": 0.13579239619047614,
"min": 0.11083930668,
"max": 0.14158954968
},
{
"command": "pacquet@main",
"mean": 0.12424438536421052,
"stddev": 0.007192265209387241,
"median": 0.12228156768000001,
"user": 0.1608034894736842,
"system": 0.12813565684210526,
"min": 0.11413893868000001,
"max": 0.14002792868
},
{
"command": "pnpr@HEAD",
"mean": 0.1418987062589474,
"stddev": 0.01693722613899213,
"median": 0.13621166768,
"user": 0.16550033157894736,
"system": 0.13840007789473682,
"min": 0.12759028068,
"max": 0.18300541568
},
{
"command": "pnpr@main",
"mean": 0.16029301744470587,
"stddev": 0.017537807775331593,
"median": 0.15336842268,
"user": 0.18907111176470587,
"system": 0.14452921411764702,
"min": 0.13983260268,
"max": 0.19745697468
}
]
} |
Code Review by Qodo
1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Replies to the other two findings from the Qodo review:
Written by an agent (Claude Code, claude-opus-5-5). |
|
Code review by qodo was updated up to the latest commit 6126ef7 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
Bumps
preferred-pmto 5.0.1 (zkochan/packages#238), which detects pnpm bypnpm-workspace.yamlwhen the package directory has no lockfile.@pnpm/exec.prepare-packageuses it to pick the package manager that prepares a git-hosted dependency, so a pnpm workspace without a committed lockfile was prepared with npm. npm then honoured the dependency's.npmrc(for exampleignore-scripts) and could skip the build.This is the v11 half of the issue. The v12 half landed in #15660, and both now use the same order: a lockfile in the package directory wins, and
pnpm-workspace.yamlbreaks the no-lockfile tie. The CLI override flag the issue also floats is a new feature and is not part of this PR.The regression test asserts which lockfile the prepare step leaves behind.
preferred-pmsearches parent directories forpnpm-lock.yaml, so the test only fails without the fix when no ancestor of the test directory holds one, which is the case in CI. I confirmed the unfixed behaviour (npm,package-lock.json) and the fixed one (pnpm,pnpm-lock.yaml) in a directory under/var/tmp.Closes #14011
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-lock.yamlinstead of an npmpackage-lock.json. This ensures the dependency’s build is not skipped during preparation and avoids adding an npm lockfile to the workspace. The workspace’s preferred package manager version has also been updated.