Repository navigation
fix(setup): stop writing .ps1 wrappers for the pn, pnpx, and pnx aliases - #16219
Conversation
PowerShell prefers a .ps1 over a .cmd of the same name, so under the default Restricted execution policy on Windows client `pn` failed with "not digitally signed" while `pnpm` worked. The wrappers only called pnpm.cmd, since the bin linker already omits pnpm.ps1, so they added no behavior. They also dropped a bare `--` from the arguments, the reason pnpm itself has no .ps1 (#3168). Both setup implementations and the `@pnpm/exe` prepare script now write only the .cmd form and delete a .ps1 left by an earlier run. Closes #8444 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 (2)
🚧 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; 4 remain after this review. 📝 WalkthroughWalkthroughWindows setup and executable preparation now create ChangesWindows alias wrapper updates
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Assessment against linked issues
Out-of-scope changes
Suggested labels: Merge Risk: ⚪ Minimal · up to This change stops writing PowerShell alias scripts that can fail under default execution policy and removes stale ones. No risk to merging was identified from the supplied evidence. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The change removes PowerShell wrappers that can block the aliases and retains the existing command wrappers. No newly introduced security issue was established. Cleanup can remain incomplete if setup is interrupted, and security coverage is incomplete. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
✨ Finishing Touches 💡 1📝 Generate docstrings
🧪 Generate unit tests (beta)
🛠️ Fix failing CI checks 💡
Warning Some tools did not complete. Review the errors below. 🔧 ESLint
pnpm11/engine/pm/commands/src/setup/setup.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. 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❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #16219 +/- ##
==========================================
+ Coverage 92.03% 92.05% +0.01%
==========================================
Files 1485 1485
Lines 200060 200055 -5
==========================================
+ Hits 184129 184152 +23
+ Misses 15931 15903 -28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Micro-Benchmark ResultsLinux |
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.46105154258,
"stddev": 0.15670044983469808,
"median": 2.38666311278,
"user": 1.50183088,
"system": 1.45861638,
"min": 2.30337854778,
"max": 2.6912539357800003
},
{
"command": "pacquet@main",
"mean": 2.4741610508800003,
"stddev": 0.13514255017234314,
"median": 2.41998527428,
"user": 1.58686018,
"system": 1.5327923799999998,
"min": 2.3295154467800003,
"max": 2.6482352827800004
},
{
"command": "pnpr@HEAD",
"mean": 1.50291257968,
"stddev": 0.12370835886329393,
"median": 1.4662148527799999,
"user": 1.3024529800000002,
"system": 1.2832256799999997,
"min": 1.3394016337799999,
"max": 1.69664731278
},
{
"command": "pnpr@main",
"mean": 1.4977749264799998,
"stddev": 0.1375368572259019,
"median": 1.4858908952799998,
"user": 1.3481816800000002,
"system": 1.3176845799999999,
"min": 1.3365597487799998,
"max": 1.70769632178
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.22164826314000002,
"stddev": 0.010172042917961699,
"median": 0.21888901424,
"user": 0.23825085999999995,
"system": 0.5379263999999999,
"min": 0.20887769024000002,
"max": 0.24022725924000002
},
{
"command": "pacquet@main",
"mean": 0.21997953804000003,
"stddev": 0.009710563840102063,
"median": 0.21772213974000001,
"user": 0.24559505999999995,
"system": 0.5310741,
"min": 0.21215472024,
"max": 0.24558727824
},
{
"command": "pnpr@HEAD",
"mean": 0.27526562354000006,
"stddev": 0.013138437623531495,
"median": 0.27223363074000007,
"user": 0.29004815999999994,
"system": 0.6164862999999998,
"min": 0.25306197624000004,
"max": 0.30076640324000004
},
{
"command": "pnpr@main",
"mean": 0.31163326314,
"stddev": 0.040539191760613956,
"median": 0.30476133524000004,
"user": 0.34144845999999995,
"system": 0.7091280999999999,
"min": 0.26807714624,
"max": 0.39084943924000004
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.011440725520861242,
"stddev": 0.001628217561062049,
"median": 0.011143863540000002,
"user": 0.006260238660287083,
"system": 0.005882432631578948,
"min": 0.00872940854,
"max": 0.01640460254
},
{
"command": "pacquet@main",
"mean": 0.011057316100714287,
"stddev": 0.0015635577319513224,
"median": 0.01087902104,
"user": 0.0062939628571428595,
"system": 0.005446068285714285,
"min": 0.008662220540000001,
"max": 0.01729696154
},
{
"command": "pnpr@HEAD",
"mean": 0.011142143161276602,
"stddev": 0.001657740420351683,
"median": 0.010642439540000001,
"user": 0.005710497361702125,
"system": 0.006139502553191486,
"min": 0.008777550540000002,
"max": 0.01652069754
},
{
"command": "pnpr@main",
"mean": 0.01198299628509804,
"stddev": 0.0018806176421394343,
"median": 0.011557891540000002,
"user": 0.006147315098039209,
"system": 0.0065579796078431354,
"min": 0.008770389540000001,
"max": 0.01746767154
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.0076618628376470595,
"stddev": 0.0008249599623788266,
"median": 0.007502095220000001,
"user": 0.004225296470588236,
"system": 0.003877005294117646,
"min": 0.006884429720000001,
"max": 0.012707534720000002
},
{
"command": "pacquet@main",
"mean": 0.007481218548282824,
"stddev": 0.00032956984172380235,
"median": 0.007461524720000001,
"user": 0.004624946599326605,
"system": 0.003312672188552188,
"min": 0.006728637720000001,
"max": 0.00976376672
},
{
"command": "pnpr@HEAD",
"mean": 0.007647566150508475,
"stddev": 0.000463550364610578,
"median": 0.007614281720000001,
"user": 0.004527223389830514,
"system": 0.003592498305084746,
"min": 0.006676070720000001,
"max": 0.00978884372
},
{
"command": "pnpr@main",
"mean": 0.007167953128637872,
"stddev": 0.0004207324096744657,
"median": 0.007116887720000001,
"user": 0.0044108625249169395,
"system": 0.0031542986046511623,
"min": 0.006319009720000001,
"max": 0.009933204720000002
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.5174648395399997,
"stddev": 0.03380690488118472,
"median": 2.51391088734,
"user": 1.8488674999999997,
"system": 1.5195701199999998,
"min": 2.47489142884,
"max": 2.5755328348399997
},
{
"command": "pacquet@main",
"mean": 2.52379435634,
"stddev": 0.03201292757351821,
"median": 2.52495567534,
"user": 1.8761084999999997,
"system": 1.5378298200000002,
"min": 2.4825069318399997,
"max": 2.59190660784
},
{
"command": "pnpr@HEAD",
"mean": 1.5491840625399997,
"stddev": 0.13177673463443718,
"median": 1.50989413584,
"user": 1.1289008999999999,
"system": 1.21837302,
"min": 1.38984528684,
"max": 1.73670595384
},
{
"command": "pnpr@main",
"mean": 1.54151923704,
"stddev": 0.1053348569194007,
"median": 1.5217905583399998,
"user": 1.210575,
"system": 1.22261842,
"min": 1.4221918918399998,
"max": 1.68660312084
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.5086952820399999,
"stddev": 0.01911329891008167,
"median": 0.50893099324,
"user": 0.70266442,
"system": 0.75935232,
"min": 0.46599700424,
"max": 0.52955410324
},
{
"command": "pacquet@main",
"mean": 0.5687874809400001,
"stddev": 0.17213463865356188,
"median": 0.48852632824000003,
"user": 0.7648090199999998,
"system": 0.8569005199999999,
"min": 0.43722766024000004,
"max": 0.92327048324
},
{
"command": "pnpr@HEAD",
"mean": 0.29807208574,
"stddev": 0.009964049826105768,
"median": 0.29489883024,
"user": 0.27269412000000004,
"system": 0.56999512,
"min": 0.28339327524,
"max": 0.31393147824
},
{
"command": "pnpr@main",
"mean": 0.29631241814000003,
"stddev": 0.01142700244753527,
"median": 0.29632513724000004,
"user": 0.24704991999999998,
"system": 0.5734642199999999,
"min": 0.27831837424000005,
"max": 0.31507533624
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.64129670124,
"stddev": 0.03149783776985795,
"median": 1.63305364794,
"user": 0.89048298,
"system": 0.8424656999999998,
"min": 1.60563874894,
"max": 1.69119593394
},
{
"command": "pacquet@main",
"mean": 1.6483512791400003,
"stddev": 0.02197206381247702,
"median": 1.6456337969400001,
"user": 0.92349508,
"system": 0.8521993999999999,
"min": 1.61999903594,
"max": 1.68679859494
},
{
"command": "pnpr@HEAD",
"mean": 0.29756720404000003,
"stddev": 0.006543239063141249,
"median": 0.29813429344,
"user": 0.25143627999999996,
"system": 0.5748499999999999,
"min": 0.28755385894,
"max": 0.30589421394
},
{
"command": "pnpr@main",
"mean": 0.28267312554,
"stddev": 0.015405986176146027,
"median": 0.28251624594,
"user": 0.22779817999999996,
"system": 0.5500714999999999,
"min": 0.26553373394,
"max": 0.30940053794
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.20948567314000002,
"stddev": 0.012746883142093686,
"median": 0.20805094794,
"user": 0.21263836666666663,
"system": 0.08940035333333332,
"min": 0.19160067394000002,
"max": 0.23365626894000002
},
{
"command": "pacquet@main",
"mean": 0.20403426544,
"stddev": 0.012076993659039281,
"median": 0.20181432794,
"user": 0.20710974285714284,
"system": 0.08586254857142857,
"min": 0.19057672694000002,
"max": 0.22913083094
},
{
"command": "pnpr@HEAD",
"mean": 0.09594576097333335,
"stddev": 0.0037375705398802936,
"median": 0.09569146194,
"user": 0.03301256666666666,
"system": 0.01960425333333334,
"min": 0.09042193894,
"max": 0.10456111094000001
},
{
"command": "pnpr@main",
"mean": 0.0950025445851613,
"stddev": 0.0036919501736085627,
"median": 0.09450306894,
"user": 0.03404416451612903,
"system": 0.016710232903225805,
"min": 0.08918744894000001,
"max": 0.10525523294
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.7694988441400001,
"stddev": 0.09357065097777899,
"median": 0.7541293171400001,
"user": 0.7794117488888889,
"system": 0.1914557822222222,
"min": 0.62872004814,
"max": 0.9626020861400001
},
{
"command": "pacquet@main",
"mean": 0.7345890809177779,
"stddev": 0.12476840334944102,
"median": 0.7817608821400001,
"user": 0.7514865266666667,
"system": 0.17845933777777778,
"min": 0.52114607814,
"max": 0.88479789014
},
{
"command": "pnpm@HEAD",
"mean": 3.2264610694733338,
"stddev": 0.2379787021411211,
"median": 3.19198406414,
"user": 4.695109526666666,
"system": 0.2861075599999999,
"min": 2.8935340971400003,
"max": 3.5417503871400005
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.26933310374,
"stddev": 0.015982227324499967,
"median": 0.26674581974000006,
"user": 0.20118186000000002,
"system": 0.10989059999999999,
"min": 0.24604748874000001,
"max": 0.30504045674
},
{
"command": "pacquet@main",
"mean": 0.24506109592181824,
"stddev": 0.05092022636403958,
"median": 0.21374724074,
"user": 0.18196291454545452,
"system": 0.1024145909090909,
"min": 0.19781161974,
"max": 0.33160332374000007
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.45493454202,
"stddev": 0.1519667047305024,
"median": 4.39047551302,
"user": 1.4316702,
"system": 1.49008814,
"min": 4.30517448952,
"max": 4.69407817152
},
{
"command": "pacquet@main",
"mean": 4.42767930732,
"stddev": 0.13237325692585272,
"median": 4.378728431020001,
"user": 1.3842221999999997,
"system": 1.36856004,
"min": 4.29813593852,
"max": 4.64762640952
},
{
"command": "pnpr@HEAD",
"mean": 3.43627374122,
"stddev": 0.13841419107666808,
"median": 3.37130896802,
"user": 1.2690252000000002,
"system": 1.2984153399999996,
"min": 3.34903786652,
"max": 3.71322124752
},
{
"command": "pnpr@main",
"mean": 3.51356008092,
"stddev": 0.13911096141168933,
"median": 3.4652679175200003,
"user": 1.4563704999999998,
"system": 1.43701704,
"min": 3.38478187552,
"max": 3.77009345752
}
]
}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.11648942729818183,
"stddev": 0.003499018698859079,
"median": 0.11639223348000002,
"user": 0.14894529636363638,
"system": 0.12798417636363632,
"min": 0.11035827148000002,
"max": 0.12279561748000001
},
{
"command": "pacquet@main",
"mean": 0.11635811988909092,
"stddev": 0.006212562347024505,
"median": 0.11423777448000001,
"user": 0.14672861454545452,
"system": 0.11915494909090908,
"min": 0.10810094948000001,
"max": 0.13480231648000002
},
{
"command": "pnpr@HEAD",
"mean": 0.13263753163789474,
"stddev": 0.004798066077954794,
"median": 0.13227242448,
"user": 0.1643075547368421,
"system": 0.1324886452631579,
"min": 0.12679888248,
"max": 0.14629135548000002
},
{
"command": "pnpr@main",
"mean": 0.1321087772168421,
"stddev": 0.003364403747912235,
"median": 0.13185502248,
"user": 0.15825702842105263,
"system": 0.14257175052631574,
"min": 0.12644834448,
"max": 0.13843975548
}
]
} |
PR Summary by QodoStop generating PowerShell wrappers for Windows pnpm aliases
AI Description
Diagram
High-Level Assessment
Files changed (8)
|
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]>
|
Re the Qodo review above:
Written by an agent (Claude Code, claude-opus-5-5). |
|
Code review by qodo was updated up to the latest commit 0645db0 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
Summary
pnpm setupwrotepn.ps1,pnpx.ps1, andpnx.ps1next to the.cmdwrappers. PowerShell prefers a.ps1over a.cmd, so under the defaultRestrictedexecution policy on Windows client the aliases failed with "not digitally signed", whilepnpmitself worked because the bin linker already omitspnpm.ps1.The wrappers added nothing: each one only called
pnpm.cmd, which is also whatpn.cmdcalls. They also dropped a bare--from the arguments, which is the reasonpnpmhas no.ps1either (#3168).This PR stops writing them and removes ones left by an earlier run. The change is in every writer:
pnpm setup(pnpm/crates/cli/src/cli_args/setup.rs)pnpm setup(pnpm11/engine/pm/commands/src/setup/setup.ts)@pnpm/exeprepare script, which ships these wrappers for installs whose scripts did not runPowerShell shims for other packages' bins are unchanged. They run
nodedirectly, which avoids the batch-job Ctrl+C prompt. Apnpm.ps1that npm or corepack writes in the Node.js directory is outside pnpm's control.Closes #8444
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
Summary by CodeRabbit
pnpm setupno longer creates PowerShell.ps1alias wrappers and removes stale ones from previous setups. Use the.cmdwrappers instead; this avoids errors caused by PowerShell script execution policies..cmdwrappers.