Repository navigation
feat(cli): warn about install settings left under package.json's pnpm field - #13359
Conversation
… field pnpm 10 moved the install settings out of `package.json`'s `pnpm` field into `pnpm-workspace.yaml`, and pnpm warns about every migrated key a manifest still declares so the setting is not silently dropped. pacquet ignored the field without a word, so a project that had not migrated its `pnpm.overrides` met only the downstream symptom — a resolution that quietly disregarded the override. `legacy_pnpm_field` already carried the port: the same 19-key migrated list as `config/reader/src/index.ts`, the same message text, and unit tests for declaration order, an unowned key (`app`), and the absent/malformed/non-object manifest cases. It was never declared as a module, so nothing compiled or called it. This wires it up. The emit sits in `derive_config_root_and_package_manager_to_sync`, which every install-family command already calls to resolve its root and which computes the same directory pnpm reads the root manifest from (`workspaceDir ?? dir`). One site therefore covers install, add, update, ci, remove, rebuild, install-test, and the three patch commands, and it runs before any install output, so the warning lands first as it does in pnpm. Verified against the fixture in #13315: pnpm 11 and pacquet now emit a byte-identical warning naming `"pnpm.overrides"`, and a manifest whose `pnpm` field holds only an unowned key stays quiet. Closes item 1 of #13315. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
|
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)
📝 WalkthroughWalkthroughThe Rust CLI warns when migrated pnpm settings remain in ChangesLegacy pnpm field warning
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant CLICommand
participant ConfigPipeline
participant WarningHelper
participant Reporter
CLICommand->>ConfigPipeline: pass reporter during config derivation
ConfigPipeline->>WarningHelper: inspect config_root for migrated pnpm fields
WarningHelper->>Reporter: emit ignored-field warning
CLICommand->>WarningHelper: check fields on up-to-date fast path
WarningHelper->>Reporter: emit warning before status output
Possibly related 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 QodoWarn when
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@pnpm/crates/cli/tests/install.rs`:
- Around line 1673-1685: Strengthen the assertion in the install test around the
warning string so it also verifies the warning appears before a stable
normal-install output marker. Preserve the exact warning-content check, and
compare the warning and install-marker positions (or reporter event order) to
enforce the CLI output sequence.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 0badb6e9-6929-4ea7-86ff-4ab0656f8ff7
📒 Files selected for processing (5)
.changeset/pacquet-legacy-pnpm-field-warning.mdpnpm/crates/cli/src/cli_args.rspnpm/crates/cli/src/cli_args/dispatch_install.rspnpm/crates/cli/src/cli_args/pipelines.rspnpm/crates/cli/tests/install.rs
Confidence Score: 5/5The PR appears safe to merge. The previously reported fast-path omission is fixed: a successful synchronous repeat install emits the warning before returning, while unsuccessful probes continue to the full path that emits it there, so no blocking failure remains. Reviews (3): Last reviewed commit: "test(cli): pin the legacy pnpm-field war..." | Re-trigger Greptile |
Micro-Benchmark ResultsLinux |
Code Review by Qodo
Context used✅ Compliance rules (platform):
24 rules 1.
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #13359 +/- ##
==========================================
+ Coverage 87.06% 87.22% +0.16%
==========================================
Files 535 537 +2
Lines 91916 92080 +164
==========================================
+ Hits 80023 80314 +291
+ Misses 11893 11766 -127 ☔ 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.4570711962400003,
"stddev": 0.11636905882636667,
"median": 2.4093668303400007,
"user": 1.57583282,
"system": 1.34596782,
"min": 2.36917395234,
"max": 2.7008057423400005,
"times": [
2.3902237143400002,
2.36917395234,
2.4492171803400002,
2.3695271103400004,
2.6405373073400003,
2.43801423434,
2.4147033833400005,
2.39447906034,
2.7008057423400005,
2.4040302773400004
]
},
{
"command": "pacquet@main",
"mean": 2.56361667694,
"stddev": 0.167195834329853,
"median": 2.5589832078400003,
"user": 1.5760626199999999,
"system": 1.31638992,
"min": 2.3599924743400003,
"max": 2.8204366883400005,
"times": [
2.7914224563400003,
2.8204366883400005,
2.6440889063400004,
2.6483343023400003,
2.4939273133400004,
2.3599924743400003,
2.3981627473400002,
2.3736055023400002,
2.6240391023400003,
2.48215727634
]
},
{
"command": "pnpr@HEAD",
"mean": 1.5142408568399999,
"stddev": 0.17218144901672822,
"median": 1.43920788734,
"user": 1.07566812,
"system": 1.12998002,
"min": 1.35440325334,
"max": 1.79032978734,
"times": [
1.37509818334,
1.79032978734,
1.42480171734,
1.40488239034,
1.4594382263399999,
1.77516791434,
1.39731851634,
1.35440325334,
1.45361405734,
1.70735452234
]
},
{
"command": "pnpr@main",
"mean": 1.51439165154,
"stddev": 0.1320505853976208,
"median": 1.5523170683399998,
"user": 1.06664192,
"system": 1.15799092,
"min": 1.36389563834,
"max": 1.67131567434,
"times": [
1.36757121034,
1.37164538434,
1.36389563834,
1.37183693634,
1.67131567434,
1.58247963334,
1.5427042203399999,
1.56192991634,
1.65819649934,
1.65234140234
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.26390069562,
"stddev": 0.011475597767126365,
"median": 0.26196727502000006,
"user": 0.21071578,
"system": 0.5300862000000001,
"min": 0.24619390652000003,
"max": 0.27787091852,
"times": [
0.24619390652000003,
0.25152353152,
0.25839274352,
0.25521762752000005,
0.26095826952,
0.27787091852,
0.27624022752000005,
0.26297628052000005,
0.27186009652000004,
0.27777335452
]
},
{
"command": "pacquet@main",
"mean": 0.26332044672,
"stddev": 0.00649697177701023,
"median": 0.26478538102000004,
"user": 0.22702477999999998,
"system": 0.5392634,
"min": 0.25283836552000005,
"max": 0.27461793452000005,
"times": [
0.26701009652,
0.27461793452000005,
0.26399305952,
0.26819022652,
0.26598920852,
0.25283836552000005,
0.26124472052000003,
0.25530539352000003,
0.26557770252,
0.25843775952000003
]
},
{
"command": "pnpr@HEAD",
"mean": 0.28121423402,
"stddev": 0.005766326206862344,
"median": 0.28049083002,
"user": 0.21425608000000002,
"system": 0.5758161,
"min": 0.27375775952000003,
"max": 0.29248857152,
"times": [
0.27382932552000006,
0.28527713352,
0.27375775952000003,
0.28674802152,
0.28047828152000004,
0.28103697652000004,
0.27758049852000005,
0.28044239352000006,
0.28050337852,
0.29248857152
]
},
{
"command": "pnpr@main",
"mean": 0.28264657642,
"stddev": 0.006303021309864753,
"median": 0.27962669852,
"user": 0.23685968000000002,
"system": 0.5449112,
"min": 0.27606496752000004,
"max": 0.29276538552000003,
"times": [
0.29276538552000003,
0.29055572252,
0.28363763852,
0.27827174352,
0.28002447452,
0.27884942652000005,
0.29041199052000005,
0.27922892252000003,
0.27665549252000005,
0.27606496752000004
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.8010446044599995,
"stddev": 0.02611248616917914,
"median": 2.79920733486,
"user": 1.74750916,
"system": 1.3390799999999996,
"min": 2.77083215536,
"max": 2.8540150503599997,
"times": [
2.77926014036,
2.78777894836,
2.8540150503599997,
2.77256492736,
2.80999325836,
2.8233565443599997,
2.78925875236,
2.77083215536,
2.81423035036,
2.80915591736
]
},
{
"command": "pacquet@main",
"mean": 2.79383363186,
"stddev": 0.012152885121549264,
"median": 2.7906591818599997,
"user": 1.7668701599999999,
"system": 1.355629,
"min": 2.78052758436,
"max": 2.81986268636,
"times": [
2.80385329336,
2.8010248723599998,
2.81986268636,
2.78052758436,
2.7909752643599997,
2.78419326636,
2.79034309936,
2.79817249536,
2.78810535436,
2.78127840236
]
},
{
"command": "pnpr@HEAD",
"mean": 1.59073027286,
"stddev": 0.16566333211284245,
"median": 1.54207431136,
"user": 1.0237589599999999,
"system": 1.1805554999999999,
"min": 1.4268975293600001,
"max": 1.85424686336,
"times": [
1.7561206163600003,
1.4361397793600001,
1.60970229336,
1.7814333083600002,
1.85424686336,
1.47444632936,
1.4354315323600002,
1.4268975293600001,
1.6757986553600002,
1.45708582136
]
},
{
"command": "pnpr@main",
"mean": 1.6413262341600003,
"stddev": 0.14133015876617203,
"median": 1.67927631386,
"user": 1.04606076,
"system": 1.1718085999999999,
"min": 1.44092069836,
"max": 1.8132598383600003,
"times": [
1.73635195336,
1.4964516813600002,
1.5423902793600002,
1.8132598383600003,
1.6702135603600001,
1.78594773136,
1.46912559936,
1.7702619323600002,
1.68833906736,
1.44092069836
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.60851352284,
"stddev": 0.019791766363286112,
"median": 0.60387552404,
"user": 0.7351363,
"system": 0.71533028,
"min": 0.57252881904,
"max": 0.64814995004,
"times": [
0.59998906504,
0.60944448304,
0.60525537004,
0.60104900304,
0.62820276104,
0.64814995004,
0.60210934104,
0.61591075804,
0.60249567804,
0.57252881904
]
},
{
"command": "pacquet@main",
"mean": 0.60325184274,
"stddev": 0.02046038853042637,
"median": 0.6028796670400001,
"user": 0.728246,
"system": 0.6988157799999999,
"min": 0.57873401304,
"max": 0.63874781204,
"times": [
0.61245036704,
0.58593338904,
0.57873401304,
0.60942282204,
0.62773565204,
0.63874781204,
0.61428328104,
0.59633651204,
0.58256768604,
0.5863068930399999
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31158480354000007,
"stddev": 0.0068246940483257315,
"median": 0.30983386854000006,
"user": 0.19681539999999997,
"system": 0.56445698,
"min": 0.30492695804000003,
"max": 0.32844374304,
"times": [
0.30863421304000005,
0.30963883604000003,
0.31002890104,
0.30492695804000003,
0.30859055104000005,
0.32844374304,
0.30518666704,
0.31143731604,
0.31660539404000004,
0.31235545604000003
]
},
{
"command": "pnpr@main",
"mean": 0.31157352634,
"stddev": 0.0064626637767735825,
"median": 0.31042062504,
"user": 0.1975604,
"system": 0.55714638,
"min": 0.30250794004000003,
"max": 0.32128096404000006,
"times": [
0.32128096404000006,
0.30259910004,
0.30777216904000004,
0.31064890004,
0.31019235004,
0.30250794004000003,
0.31609066404,
0.30969046404000006,
0.31546581804,
0.31948689404
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.9305348169600003,
"stddev": 0.01648124486447288,
"median": 1.92977737976,
"user": 0.9878315599999998,
"system": 0.77078704,
"min": 1.9096815257600002,
"max": 1.95816192276,
"times": [
1.9258377607600001,
1.95816192276,
1.9289281337600002,
1.9096815257600002,
1.91295576576,
1.93062662576,
1.9350965487600003,
1.93109453676,
1.9162216997600001,
1.9567436497600001
]
},
{
"command": "pacquet@main",
"mean": 1.9254337540600002,
"stddev": 0.009680024304254563,
"median": 1.92681326776,
"user": 0.97919126,
"system": 0.7750054399999999,
"min": 1.9112937637600003,
"max": 1.9382334487600001,
"times": [
1.9117343047600002,
1.9272520747600002,
1.9314936987600002,
1.9304430087600002,
1.93802667876,
1.9112937637600003,
1.92086614276,
1.9263744607600002,
1.9382334487600001,
1.9186199587600001
]
},
{
"command": "pnpr@HEAD",
"mean": 0.31214018086000006,
"stddev": 0.006669975862317742,
"median": 0.31100575176000006,
"user": 0.20651455999999996,
"system": 0.55153604,
"min": 0.30412482176000005,
"max": 0.32272485076,
"times": [
0.30438857776000006,
0.30893353176000005,
0.30922347876000006,
0.30412482176000005,
0.32174474476000003,
0.32272485076,
0.31474436176000004,
0.31278802476000006,
0.30664310576000003,
0.31608631076000004
]
},
{
"command": "pnpr@main",
"mean": 0.31600697966,
"stddev": 0.008250999977580617,
"median": 0.31663703926000003,
"user": 0.19814655999999997,
"system": 0.56947164,
"min": 0.30168896076,
"max": 0.32598699776000006,
"times": [
0.31215120576000005,
0.31744299776,
0.30667352276000004,
0.32598699776000006,
0.31029284476,
0.31583108076000005,
0.32416109676000004,
0.32507639176,
0.32076469776000005,
0.30168896076
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.3664929267,
"stddev": 0.018174659891440126,
"median": 0.36276086920000006,
"user": 0.3649534200000001,
"system": 0.05210412,
"min": 0.3511912522,
"max": 0.4139487672,
"times": [
0.36450881220000003,
0.3691446162,
0.36844085120000003,
0.3721238892,
0.36101292620000003,
0.3548353382,
0.35621819320000003,
0.3535046212,
0.4139487672,
0.3511912522
]
},
{
"command": "pacquet@main",
"mean": 0.3621244657,
"stddev": 0.011435207162448854,
"median": 0.3670784232,
"user": 0.34711192,
"system": 0.06523682,
"min": 0.3448173032,
"max": 0.3761993362,
"times": [
0.3673439832,
0.3501390692,
0.3669911292,
0.3448173032,
0.3464573432,
0.3681729642,
0.3750433292,
0.3589144822,
0.3671657172,
0.3761993362
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08742256857500001,
"stddev": 0.0017194740344256012,
"median": 0.08745568270000001,
"user": 0.019959557500000003,
"system": 0.0097818575,
"min": 0.0834516292,
"max": 0.09126258520000001,
"times": [
0.0872460382,
0.08697463720000001,
0.0859499172,
0.0910389642,
0.0834516292,
0.0884910342,
0.08578617820000001,
0.0886595412,
0.0885766652,
0.0868106772,
0.0873995972,
0.08686150420000001,
0.08560506720000001,
0.0871719682,
0.0876430352,
0.0875197732,
0.08792262320000001,
0.0861243552,
0.08822100520000001,
0.0882528742,
0.08585193120000001,
0.08728177520000001,
0.0883857262,
0.08774230420000001,
0.0859016652,
0.0906311052,
0.0848963702,
0.09126258520000001,
0.0884154412,
0.08892797820000001,
0.08500645920000001,
0.0875117682
]
},
{
"command": "pnpr@main",
"mean": 0.08708262142580644,
"stddev": 0.0019338673720038083,
"median": 0.0871897522,
"user": 0.02019786193548387,
"system": 0.009510116129032256,
"min": 0.0828278652,
"max": 0.0910746212,
"times": [
0.0910746212,
0.0879452242,
0.0883617302,
0.0873366292,
0.0854923242,
0.08697450620000001,
0.0892867422,
0.08719687520000001,
0.0864830412,
0.0871897522,
0.0881461032,
0.0862723432,
0.0865614792,
0.0828278652,
0.0837070302,
0.08811189920000001,
0.0868827342,
0.0856382592,
0.0903489532,
0.0876983502,
0.0853555662,
0.0897505662,
0.0847513382,
0.0864701252,
0.0877685822,
0.08807456920000001,
0.0851203832,
0.08781955920000001,
0.0904207692,
0.0846998612,
0.08579348120000001
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.623455356860001,
"stddev": 0.1710997861447682,
"median": 4.59679057416,
"user": 1.763916,
"system": 1.3882599800000002,
"min": 4.44515526766,
"max": 4.83078766066,
"times": [
4.48612133766,
4.83078766066,
4.73721326566,
4.44944474966,
4.80267266166,
4.70745981066,
4.46899177566,
4.82913043866,
4.47757660066,
4.44515526766
]
},
{
"command": "pacquet@main",
"mean": 4.565983381960001,
"stddev": 0.12391658373352922,
"median": 4.52574584066,
"user": 1.7445770999999997,
"system": 1.4111656799999999,
"min": 4.44398459266,
"max": 4.78107737666,
"times": [
4.78107737666,
4.45963127166,
4.76375455066,
4.45984868066,
4.63105393266,
4.51458396166,
4.53690771966,
4.44398459266,
4.48131896066,
4.5876727726599995
]
},
{
"command": "pnpr@HEAD",
"mean": 3.5280053179600004,
"stddev": 0.1297165871210838,
"median": 3.47670537116,
"user": 1.1708927999999998,
"system": 1.2805822799999997,
"min": 3.44742508166,
"max": 3.87477167266,
"times": [
3.53457364966,
3.87477167266,
3.46163958166,
3.44742508166,
3.4904837346599997,
3.5952089366599997,
3.4592725026599997,
3.48528223466,
3.46812850766,
3.46326727766
]
},
{
"command": "pnpr@main",
"mean": 3.52181561416,
"stddev": 0.07080729964397063,
"median": 3.49058915216,
"user": 1.2163094999999997,
"system": 1.23636258,
"min": 3.44291673766,
"max": 3.63530584966,
"times": [
3.47320502166,
3.50680254866,
3.57814130066,
3.45238943366,
3.5642921686599998,
3.47437575566,
3.44291673766,
3.61703380466,
3.63530584966,
3.47369352066
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13359 |
| 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,426.90 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 304.12 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 304.93 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 83.45 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,354.40 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,447.43 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 273.76 ms |
A plain `pnpm install` whose lockfile and `node_modules` are already current finishes in `finished_via_up_to_date_fast_path`, before the async install machinery — and therefore before `derive_config_root_and_package_manager_to_sync`, where the warning about migrated keys left under `package.json`'s `pnpm` field is emitted. A project that had not migrated its `pnpm.overrides` saw only "Already up to date" on every repeat install. pnpm warns from config-reading, so it warns on that run too: verified against pnpm 11, which prints the warning ahead of "Already up to date" on both the first and the second install of the same fixture. The emit sits in the deciding branch rather than next to the fast path's config load, because every earlier `return false` hands the command to the full install path, which already warns. The new test asserts the ordering the two comments in #13359 asked for — the warning precedes the command's own output — and fails without the emit above. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@pnpm/crates/cli/tests/install.rs`:
- Around line 1693-1696: Replace the `///` documentation comments above the
up-to-date fast-path test rationale with regular `//` comments, preserving the
existing explanatory text and behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 83bedf8d-4809-4765-8451-01e7a52201a8
📒 Files selected for processing (2)
pnpm/crates/cli/src/cli_args/install.rspnpm/crates/cli/tests/install.rs
|
Code review by qodo was updated up to the latest commit ff53713 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Both emit sites read the root manifest from `workspaceDir ?? dir`, the same directory pnpm resolves it from, so a run inside a workspace package must name the workspace root's migrated keys and never the package's own. Nothing covered that: every existing case runs from the root, where the two directories coincide. The new test discriminates by key — `overrides` at the root, `neverBuiltDependencies` in the package — so reading the wrong manifest fails the assertion instead of producing an indistinguishable warning. Pointing the emit at the cwd makes it fail with "pnpm.neverBuiltDependencies". pnpm 11 warns identically on the same fixture.
|
Code review by qodo was updated up to the latest commit a209abe |
… field (pnpm#13359) pnpm 10 moved the install settings out of package.json's `pnpm` field into pnpm-workspace.yaml, and pnpm warns about every migrated key a manifest still declares so the setting is not silently dropped. pacquet ignored the field without a word, so a project that had not migrated its `pnpm.overrides` met only the downstream symptom. `legacy_pnpm_field` already carried the port — the same 19-key migrated list as config/reader/src/index.ts, the same message, and unit tests — but was never declared as a module, so nothing compiled or called it. The emit sits in `derive_config_root_and_package_manager_to_sync`, which every install-family command already calls to resolve its root and which computes the same directory pnpm reads the root manifest from. One site covers all ten commands, and it runs before any install output so the warning lands first, as in pnpm. The repeat-install fast path finishes before that site is reached, so it warns from its deciding branch too. Closes item 1 of pnpm#13315.
The warning parsed `package.json` with a bare `serde_json::from_slice`, which chokes on the UTF-8 BOM an editor may leave at the head of the file — pnpm strips it and warns, pacquet stayed silent. It also read and parsed the manifest a second time, immediately before `package_manager_to_sync` read and parsed the very same file. Both follow from the helper doing its own IO. It now takes the parsed manifest, so `derive_config_root_and_package_manager_to_sync` reads the file once through `read_manifest_json` (the crate's BOM-stripping reader) and hands it to the warning and to the package-manager policy alike. `package_manager_to_sync` no longer reads anything, which leaves it infallible. The up-to-date fast path keeps its own read, one directory removed from the manifest it already holds, and goes through the same reader via `warn_ignored_pnpm_manifest_fields_in`: the two paths coincide only by an invariant that lives in another function. Follow-up to pnpm#13359, whose changeset is still pending, so the fix ships with the feature.
…3376) Close the four CLI-surface differences left over from pnpm#13315 after pnpm#13359 and pnpm#13375 landed the other two. Three land in the Rust engine. The `Scope:` line arrives via a new `pnpm:scope` channel and a port of `reportScope.ts`; pnpm gates it on the command being one that reports scope *and* the run being workspace-wide, and since the engine's recursive-by-default set is narrower than pnpm's, that conjunction is computed at dispatch and seeded into the reporter. The event is emitted where the counts already exist — the `--filter` resolution and the installer's workspace walk — so no install pays for a second directory walk. A `sharedWorkspaceLockfile: false` plan reports once for the whole selection rather than once per child install, which would otherwise overwrite the filtered count with the workspace total. The second is the `allowBuilds` placeholder an install writes for a build it blocked, which pnpm#13375 taught the engine to read but not yet to write. The third is the elapsed time on a cache-satisfied lockfile verdict. The fourth goes the other way. The store block a first install prints is unreachable in the TypeScript CLI: `reportContext` needs `pnpm:package-import-method`, which only `@pnpm/fs.indexed-pkg-importer` emits, and that runs inside a `@pnpm/worker` thread whose logger never reaches the reporter. The main process already receives the import method back from the worker, so it is reported from there instead. Reporter globals are now seeded before the pre-command checks. They are `OnceLock`s and the pre-command checks emit, so whatever fired first was locking in unset values. Closes pnpm#13315
Summary
Closes item 1 of #13315 — pnpm 12 gave no warning when
package.jsonstill declared install settings under thepnpmfield.pnpm 10 moved those settings into
pnpm-workspace.yaml, and pnpm 11 warns about every migrated key a manifest still carries so the setting is not silently dropped. pacquet ignored the field without a word, so a repository that had not migrated itspnpm.overridesmet only the downstream symptom: a resolution that quietly disregarded the override. The issue calls this "the difference that matters most in practice" of the three it lists.Using the fixture from the issue:
The port already existed — this wires it up
pnpm/crates/cli/src/cli_args/legacy_pnpm_field.rswas already in the tree with the same 19-key migrated list asconfig/reader/src/index.ts(I diffed the two sets: zero difference), the same message text, and unit tests for declaration order, an unowned key (app), and the absent / malformed / non-object manifest cases.It was never declared as a module, so nothing compiled it and nothing called it. In the interest of full disclosure: it reached
mainthrough my own #13299, where agit add pnpm/cratesswept in two files that had nothing to do with that PR. It should have been reviewed as this change, so it is being reviewed as this change now.Where the warning is emitted
In
derive_config_root_and_package_manager_to_sync, which:workspaceDir ?? dir, pnpm'srootProjectManifestDir),pnpm emits this from config-reading, so it fires for every command that loads config. The install family is where it is observable and where the issue reports it; extending it further can follow if it turns out to matter.
One install can finish without reaching that site:
finished_via_up_to_date_fast_pathcompletes a repeatpnpm installfrommain, before the async machinery exists, so an up-to-date project stayed silent (found in review). pnpm keeps warning on that run — it warns from config-reading, ahead of "Already up to date" — so the fast path now warns from its deciding branch, afterinstall_already_up_to_dateconfirms it will finish and before its own output. Warning at its config-load site instead would double-print, since every earlierreturn falsehands the command to the full install path.The warning takes the parsed manifest rather than a directory (found in review).
derive_config_root_and_package_manager_to_syncreads the rootpackage.jsononce, throughread_manifest_json, and hands the value to the warning and topackage_manager_to_syncalike — one read where there were two, and the read strips a UTF-8 BOM, which a bareserde_json::from_slicehad been choking on where pnpm warns. The fast path readsconfig_root's manifest through that same reader rather than reusing thedir/package.jsonit already holds: those are the same file only by an invariant that lives in another function.Verification
Against the issue's own fixture, pnpm 11 and pacquet now produce an identical line. Also checked that a
pnpmfield holding only an unowned key (app), and a manifest with nopnpmfield at all, both stay quiet — and thatpnpm addwarns too, since it shares the emit site.Four end-to-end tests cover the warning, the silent case, the up-to-date fast path, and a run from inside a workspace package; the position tests assert the warning's offset relative to the command's own output, not just its presence. The workspace test discriminates by key —
overridesat the root,neverBuiltDependenciesin the package — so reading the wrong manifest fails it instead of producing a lookalike warning. I confirmed each of them genuinely catches its regression by breaking the subject and watching it fail. A unit test covers the BOM, checked against pnpm 11 on the same manifest.just ready(7087 tests),just dylint, and the CI doc command are all clean.One thing noticed, not changed
pnpm 11 writes this warning to stderr; pacquet writes it to stdout. Filed as #13361 rather than fixed here, since it needs a config-warning channel that bypasses the reporter.
Narrower than it first looks, and I initially described it too broadly: reporter warnings already agree between the stacks —
pnpm install --forceprints its warning on stdout in pnpm 11 too. The difference is confined to warnings pnpm raises while reading config, which it prints withconsole.warn(stderr) outside the reporter entirely. pacquet has no such channel, so this one goes throughLogEvent::Globaland lands in the reporter's stdout frame.Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.(TypeScript already emits this warning; this is the pacquet side.)
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[1m]).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
pnpmsettings inpackage.jsonare no longer read, directing users to migrate topnpm-workspace.yaml.pnpmfield.