Repository navigation
fix(config): read node-version from pnpm config env - #13874
Conversation
|
Warning Review limit reached
Next review available in: 6 seconds Limit details: You’ve used all 10 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
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 (3)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe configuration reader now accepts ChangesNode version environment handling
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This restores PNPM_CONFIG_NODE_VERSION handling for compatibility checks without changing the pnpm runtime; the change is localized and covered by regression tests, so no actionable merge-blocking risk remains beyond normal checks and review. Suggested labels: Suggested reviewers: ✨ 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 |
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? |
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (4): Last reviewed commit: "test(config): cover PNPM_CONFIG_NODE_VER..." | Re-trigger Greptile |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
pnpm11/config/reader/src/index.ts (1)
546-551: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick winAdd a Rust regression test for
PNPM_CONFIG_NODE_VERSION.Pacquet already applies the environment value after workspace configuration and before the
devEngines.runtimefallback. Add matching coverage for the required precedence: CLI/config > environment >devEngines.runtime.🤖 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 `@pnpm11/config/reader/src/index.ts` around lines 546 - 551, Add a Rust regression test for PNPM_CONFIG_NODE_VERSION covering the reader’s precedence behavior: explicit CLI/configuration must override the environment value, while the environment value must override the devEngines.runtime fallback. Reuse the existing configuration-reader test helpers and assert the resolved node version for each precedence case.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 `@pnpm11/config/reader/src/index.ts`:
- Around line 546-551: Add a Rust regression test for PNPM_CONFIG_NODE_VERSION
covering the reader’s precedence behavior: explicit CLI/configuration must
override the environment value, while the environment value must override the
devEngines.runtime fallback. Reuse the existing configuration-reader test
helpers and assert the resolved node version for each precedence case.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 94ab15c7-367c-4a7b-bfca-fcb25d9c96e4
📒 Files selected for processing (3)
.changeset/config-node-version-env.mdpnpm11/config/reader/src/index.tspnpm11/config/reader/test/index.ts
There was a problem hiding this comment.
Pull request overview
Restores support for PNPM_CONFIG_NODE_VERSION in the TypeScript CLI config reader so users can set the Node.js version used by compatibility checks via pnpm config environment variables, aligning behavior with the Rust CLI.
Changes:
- Stop excluding
node-versionfrom env-var parsing by removing it from theenvPnpmTypesomit list. - Add regression tests covering env loading and precedence (CLI > env >
devEngines.runtime) fornodeVersion. - Add a changeset to release the fix for
@pnpm/config.readerandpnpm.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pnpm11/config/reader/src/index.ts | Removes the stale env schema exclusion so PNPM_CONFIG_NODE_VERSION is parsed into config.nodeVersion. |
| pnpm11/config/reader/test/index.ts | Adds regression coverage for reading nodeVersion from env vars and precedence vs CLI and devEngines.runtime. |
| .changeset/config-node-version-env.md | Publishes the fix as a patch for @pnpm/config.reader and pnpm. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
2cf3c8d to
3564c70
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (3)
pnpm11/config/reader/test/index.ts:127
- The test title says "pnpm_config_*" but the test uses
PNPM_CONFIG_NODE_VERSION(uppercase). Adjust the wording so it matches what’s being exercised.
test('nodeVersion from pnpm_config_* environment variables takes priority over devEngines.runtime', async () => {
pnpm11/config/reader/test/index.ts:152
- The test name refers to "pnpm_config_*" env vars, but the test sets
PNPM_CONFIG_NODE_VERSION(uppercase). Renaming improves clarity about which env-var form is covered here.
test('nodeVersion from config takes priority over pnpm_config_* environment variables', async () => {
pnpm11/config/reader/test/index.ts:112
- The test title says "pnpm_config_*" but the test actually sets an uppercase
PNPM_CONFIG_NODE_VERSIONenv var. Renaming the test to match the env var prefix avoids confusion when scanning failures.
This issue also appears in the following locations of the same file:
- line 127
- line 152
test('nodeVersion is read from pnpm_config_* environment variables', async () => {
|
@zkochan if you have a moment i'd love to land this |
|
@zkochan, would you be able to take a look at this if you get a moment? |
3564c70 to
b66ff8a
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Code Review by Qodo
1. Non-hermetic env config tests
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Address review feedback on the PR: name the exercised env-var form in the TypeScript test titles, and add the requested Rust regression coverage - a config-layer test that the env var overrides pnpm-workspace.yaml and an e2e proving it beats devEngines.runtime for engine compatibility checks. Co-Authored-By: Claude Fable 5 <[email protected]>
Dismissed because a newer commit was pushed; Greptile will re-review the current head.
|
Code review by qodo was updated up to the latest commit a87a1ce |
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 #13874 +/- ##
==========================================
- Coverage 88.19% 88.17% -0.03%
==========================================
Files 646 646
Lines 107162 107281 +119
==========================================
+ Hits 94509 94591 +82
- Misses 12653 12690 +37 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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. 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.42676181356,
"stddev": 0.11916211868172018,
"median": 2.38239730056,
"user": 1.5877093399999997,
"system": 1.6012957200000002,
"min": 2.29092522606,
"max": 2.64840027206
},
{
"command": "pacquet@main",
"mean": 2.63166174586,
"stddev": 0.21592060309906438,
"median": 2.67375731356,
"user": 2.0749571399999995,
"system": 2.1205620199999995,
"min": 2.31572003306,
"max": 2.98539127706
},
{
"command": "pnpr@HEAD",
"mean": 1.85585046976,
"stddev": 0.11406994721039519,
"median": 1.8357464990599999,
"user": 2.6431293399999998,
"system": 3.5680039199999998,
"min": 1.68382264706,
"max": 2.0451942230599998
},
{
"command": "pnpr@main",
"mean": 1.82576343306,
"stddev": 0.1285046881336053,
"median": 1.80571954306,
"user": 2.56552434,
"system": 3.2507854200000006,
"min": 1.6627583700600002,
"max": 2.05328969406
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.44433627374,
"stddev": 0.04472397131216444,
"median": 0.43791360974000004,
"user": 0.3793418599999999,
"system": 0.7011784400000001,
"min": 0.39144005274000004,
"max": 0.51448710974
},
{
"command": "pacquet@main",
"mean": 0.45885562844,
"stddev": 0.06573571304637181,
"median": 0.44135385024000007,
"user": 0.38826396,
"system": 0.7445068400000001,
"min": 0.37501641174000006,
"max": 0.5888440607400001
},
{
"command": "pnpr@HEAD",
"mean": 0.43913343563999996,
"stddev": 0.028728815014574666,
"median": 0.44059228174000004,
"user": 0.37388565999999995,
"system": 0.68928224,
"min": 0.39458916074000006,
"max": 0.49319575674000005
},
{
"command": "pnpr@main",
"mean": 0.3372212505400001,
"stddev": 0.026961441964489366,
"median": 0.32847070874000006,
"user": 0.27531706,
"system": 0.55547844,
"min": 0.30767983474000005,
"max": 0.38226362274000003
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.010381489582158277,
"stddev": 0.0015644517892579172,
"median": 0.010220324780000001,
"user": 0.005863645899280579,
"system": 0.004560204316546762,
"min": 0.00709661728,
"max": 0.014917163280000001
},
{
"command": "pacquet@main",
"mean": 0.01023409555722773,
"stddev": 0.0018723812504761856,
"median": 0.010052444280000001,
"user": 0.006542744422442245,
"system": 0.003734474587458748,
"min": 0.00723510728,
"max": 0.01863139328
},
{
"command": "pnpr@HEAD",
"mean": 0.011748206210041141,
"stddev": 0.0018642948879979142,
"median": 0.01142118228,
"user": 0.0072568141563786,
"system": 0.0045262469135802464,
"min": 0.00754008928,
"max": 0.02020760128
},
{
"command": "pnpr@main",
"mean": 0.012149335544069259,
"stddev": 0.0019004948383190474,
"median": 0.011740862280000002,
"user": 0.007624485367965364,
"system": 0.004554124675324673,
"min": 0.008938473280000001,
"max": 0.02021819128
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.010287599377131473,
"stddev": 0.0016213485118707544,
"median": 0.01019203466,
"user": 0.006437526932270916,
"system": 0.0038767205577689245,
"min": 0.00728044066,
"max": 0.01406351966
},
{
"command": "pacquet@main",
"mean": 0.010869330665347596,
"stddev": 0.0018128713435801335,
"median": 0.01085504866,
"user": 0.006636891016042782,
"system": 0.004250753689839572,
"min": 0.007433077660000001,
"max": 0.017212127660000003
},
{
"command": "pnpr@HEAD",
"mean": 0.00931993990615385,
"stddev": 0.0011374668632695446,
"median": 0.00903370566,
"user": 0.005739335923076924,
"system": 0.003614264692307694,
"min": 0.007600881659999999,
"max": 0.01469062566
},
{
"command": "pnpr@main",
"mean": 0.009999700881343878,
"stddev": 0.002094747803036713,
"median": 0.00947794466,
"user": 0.005877461581027672,
"system": 0.004142766877470357,
"min": 0.007340483659999999,
"max": 0.018056953660000003
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 3.0285883493600005,
"stddev": 0.08015227799978343,
"median": 3.0331079341600002,
"user": 2.39851964,
"system": 1.78026478,
"min": 2.91605285566,
"max": 3.2013598876600002
},
{
"command": "pacquet@main",
"mean": 3.08245299086,
"stddev": 0.15567425827868792,
"median": 3.14303050066,
"user": 2.41276204,
"system": 1.9108969799999997,
"min": 2.88439962666,
"max": 3.27667747366
},
{
"command": "pnpr@HEAD",
"mean": 1.7829116377600003,
"stddev": 0.11035696865010539,
"median": 1.78735365916,
"user": 1.7662940399999996,
"system": 2.08582908,
"min": 1.60823604566,
"max": 1.94695663766
},
{
"command": "pnpr@main",
"mean": 1.7474405546600003,
"stddev": 0.17314081014748625,
"median": 1.72686489266,
"user": 1.8522891400000003,
"system": 2.02650328,
"min": 1.54221733866,
"max": 1.97514946166
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.67995421664,
"stddev": 0.06437205726689192,
"median": 0.7032756624400001,
"user": 0.8598376199999999,
"system": 0.9096874400000001,
"min": 0.58219181194,
"max": 0.76241482194
},
{
"command": "pacquet@main",
"mean": 0.7144426876400001,
"stddev": 0.030524249542294695,
"median": 0.7137326479399999,
"user": 0.8815645199999999,
"system": 0.99006384,
"min": 0.65839312994,
"max": 0.75717644994
},
{
"command": "pnpr@HEAD",
"mean": 0.47959159094000003,
"stddev": 0.08102284186898115,
"median": 0.47732849194000004,
"user": 0.32935271999999993,
"system": 0.6936585399999998,
"min": 0.36385328594000005,
"max": 0.67196659594
},
{
"command": "pnpr@main",
"mean": 0.4505809834400001,
"stddev": 0.03252699140984622,
"median": 0.44898549544000005,
"user": 0.3191018199999999,
"system": 0.66754774,
"min": 0.40286334894000003,
"max": 0.50300968094
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.3006205156800004,
"stddev": 0.08190067972015568,
"median": 2.27446465658,
"user": 1.1863098600000002,
"system": 1.016486,
"min": 2.2353750115800004,
"max": 2.52373248158
},
{
"command": "pacquet@main",
"mean": 2.3206681054800002,
"stddev": 0.09947004064451373,
"median": 2.27849236658,
"user": 1.2049113599999999,
"system": 1.041497,
"min": 2.2013087705800003,
"max": 2.54473311858
},
{
"command": "pnpr@HEAD",
"mean": 0.4524223050800001,
"stddev": 0.02867198595977444,
"median": 0.45258095308000007,
"user": 0.31519226,
"system": 0.6721011,
"min": 0.4014346635800001,
"max": 0.49800888958000006
},
{
"command": "pnpr@main",
"mean": 0.45260144038000005,
"stddev": 0.024370018740193997,
"median": 0.45741896358000006,
"user": 0.33780925999999994,
"system": 0.6825876,
"min": 0.41049025958000007,
"max": 0.48655720558000004
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.44301059748,
"stddev": 0.05228816022200534,
"median": 0.43056198068000007,
"user": 0.42491518,
"system": 0.09870375999999999,
"min": 0.38209832568,
"max": 0.5604962946800001
},
{
"command": "pacquet@main",
"mean": 0.38551926488000005,
"stddev": 0.04631634822671733,
"median": 0.38588057968000006,
"user": 0.37433648,
"system": 0.08431805999999999,
"min": 0.30098136168000006,
"max": 0.44681430568
},
{
"command": "pnpr@HEAD",
"mean": 0.15899460387047623,
"stddev": 0.014700145327318817,
"median": 0.16043051168,
"user": 0.06807749904761903,
"system": 0.02165909333333333,
"min": 0.13208208168,
"max": 0.18885860068000002
},
{
"command": "pnpr@main",
"mean": 0.1522855891536842,
"stddev": 0.007906052147581947,
"median": 0.15459618068,
"user": 0.06479614315789473,
"system": 0.02031676,
"min": 0.12764081568,
"max": 0.16256917468
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.9049701238066667,
"stddev": 0.14581002334709708,
"median": 0.8774658551400001,
"user": 0.913307771111111,
"system": 0.18225198888888886,
"min": 0.6847714741400001,
"max": 1.13110446914
},
{
"command": "pacquet@main",
"mean": 0.8156877164733333,
"stddev": 0.14138162116890748,
"median": 0.7426883011400001,
"user": 0.8277023266666665,
"system": 0.1581628777777778,
"min": 0.68649861514,
"max": 1.0564975331400002
},
{
"command": "pnpm@HEAD",
"mean": 4.389194464028888,
"stddev": 0.5781576272402353,
"median": 4.326243762140001,
"user": 6.718709104444444,
"system": 0.41358465555555557,
"min": 3.71714800514,
"max": 5.65761270814
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.4775075845200005,
"stddev": 0.12883353818847162,
"median": 4.450042162220001,
"user": 1.6524891000000004,
"system": 1.6502799,
"min": 4.3129068552200005,
"max": 4.728177860220001
},
{
"command": "pacquet@main",
"mean": 4.537194124820001,
"stddev": 0.17655341231217236,
"median": 4.47308775322,
"user": 1.8238604000000003,
"system": 1.7925459000000004,
"min": 4.35880318522,
"max": 4.90022229022
},
{
"command": "pnpr@HEAD",
"mean": 3.7238704731199994,
"stddev": 0.13528970579768057,
"median": 3.7092150352199997,
"user": 2.0440518,
"system": 2.034427,
"min": 3.45191075922,
"max": 3.98108173422
},
{
"command": "pnpr@main",
"mean": 3.6084997783199997,
"stddev": 0.14299485248566887,
"median": 3.53861491522,
"user": 1.7334377999999997,
"system": 1.7181395999999995,
"min": 3.42860092722,
"max": 3.86410454222
}
]
}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. Comparable to that scenario head-to-head.
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.21195634803,
"stddev": 0.018107085074179494,
"median": 0.20966940928,
"user": 0.23542040333333333,
"system": 0.24696543999999998,
"min": 0.18476894828,
"max": 0.25122830928000006
},
{
"command": "pacquet@main",
"mean": 0.18824518949428576,
"stddev": 0.015063820051878717,
"median": 0.18380417228,
"user": 0.22034489142857142,
"system": 0.2104286542857143,
"min": 0.16495646028,
"max": 0.21533832528
},
{
"command": "pnpr@HEAD",
"mean": 0.20039804049428572,
"stddev": 0.018312910491034756,
"median": 0.19562900078,
"user": 0.2274638914285714,
"system": 0.21456572571428573,
"min": 0.18232378928,
"max": 0.24833046028
},
{
"command": "pnpr@main",
"mean": 0.21439237582545456,
"stddev": 0.015271499463774669,
"median": 0.21700941128,
"user": 0.2546364109090909,
"system": 0.20995734909090907,
"min": 0.19746572928,
"max": 0.23625694828000002
}
]
} |
Summary
Related to #11254.
Restore
PNPM_CONFIG_NODE_VERSIONsupport in the TypeScript CLI's environment config reader. The key was excluded when its schema used a private semver parser, but it is now declared as[null, String], which the current parser supports.This changes only the Node.js version used for compatibility checks; it does not change the runtime that executes pnpm. The Rust CLI already reads
PNPM_CONFIG_NODE_VERSION, so this restores parity without a pacquet production change.The regression tests cover environment loading and the existing precedence contract: CLI > environment >
devEngines.runtime.Squash Commit Body
Checklist
pnpm/port. The Rust port already supports this environment variable.pnpm changeset) for@pnpm/config.readerandpnpm.Written by an agent (Codex, GPT-5).
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
PNPM_CONFIG_NODE_VERSIONis correctly recognized.umaskenvironment settings for better compatibility.