Repository navigation
fix(setup): declare the module type in the manifest written for a standalone executable - #13732
Conversation
|
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)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughStandalone executable setup now uses reusable manifest helpers in Rust and pnpm11. The generated adjacent ChangesStandalone executable manifests
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested labels: ✨ 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 |
Micro-Benchmark ResultsLinux |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13732 +/- ##
=======================================
Coverage 88.09% 88.09%
=======================================
Files 621 621
Lines 101071 101074 +3
=======================================
+ Hits 89039 89045 +6
+ Misses 12032 12029 -3 ☔ 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.49882026104,
"stddev": 0.12451684425598013,
"median": 2.45728403654,
"user": 1.5549797200000002,
"system": 1.28756548,
"min": 2.35675291154,
"max": 2.69312349754,
"times": [
2.69312349754,
2.40920664854,
2.62236081854,
2.66815733254,
2.49443427654,
2.35675291154,
2.42013379654,
2.41348364954,
2.3766947305399997,
2.53385494854
]
},
{
"command": "pacquet@main",
"mean": 2.43664436954,
"stddev": 0.13026329256100996,
"median": 2.4002727665399997,
"user": 1.5078681200000001,
"system": 1.2936608800000002,
"min": 2.33429819454,
"max": 2.74202257254,
"times": [
2.4091468255399997,
2.34114233754,
2.45402887954,
2.33429819454,
2.39139870754,
2.58086697254,
2.74202257254,
2.3384268855399997,
2.41488617954,
2.36022614054
]
},
{
"command": "pnpr@HEAD",
"mean": 1.47210273484,
"stddev": 0.14478253888367343,
"median": 1.38433457954,
"user": 1.0219997200000002,
"system": 1.12681348,
"min": 1.35451536854,
"max": 1.74647130454,
"times": [
1.5659436545399998,
1.5327414365399998,
1.3774423465399999,
1.35451536854,
1.37962561554,
1.74647130454,
1.35723649154,
1.6618774585399998,
1.38904354354,
1.3561301285399998
]
},
{
"command": "pnpr@main",
"mean": 1.5417636427399999,
"stddev": 0.17787001788061954,
"median": 1.54656363004,
"user": 1.0511700200000003,
"system": 1.11800568,
"min": 1.34537051554,
"max": 1.7968672795399998,
"times": [
1.74917581654,
1.36858083554,
1.75452062654,
1.3752407015399999,
1.7968672795399998,
1.54722176354,
1.5768533215399998,
1.34537051554,
1.54590549654,
1.35790007054
]
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.25806325592000007,
"stddev": 0.006351818090005206,
"median": 0.25876877092,
"user": 0.20249469999999997,
"system": 0.5297317999999999,
"min": 0.24891611542,
"max": 0.26597114842,
"times": [
0.26038483242,
0.26114927242,
0.26488443242,
0.25715270942,
0.26520023642,
0.26597114842,
0.25073349542,
0.25386323642,
0.24891611542,
0.25237708042
]
},
{
"command": "pacquet@main",
"mean": 0.25881110842,
"stddev": 0.004117310245158791,
"median": 0.25763477542,
"user": 0.2139728,
"system": 0.5348609,
"min": 0.25244634042,
"max": 0.26608736842,
"times": [
0.25683017242,
0.25244634042,
0.26071602642,
0.25828941842,
0.26295102342,
0.26608736842,
0.25478430042,
0.25690559442,
0.25698013242,
0.26212070742
]
},
{
"command": "pnpr@HEAD",
"mean": 0.26310094182000004,
"stddev": 0.00865909339666489,
"median": 0.26164104842,
"user": 0.21059409999999995,
"system": 0.5036805999999998,
"min": 0.25165103242000003,
"max": 0.27603073042,
"times": [
0.25165103242000003,
0.25742537542,
0.25520821042,
0.26596469542,
0.27603073042,
0.27175124142,
0.25616513242,
0.25735406142,
0.26585672142,
0.27360221742
]
},
{
"command": "pnpr@main",
"mean": 0.27463616412,
"stddev": 0.007004238383662995,
"median": 0.27503030642000004,
"user": 0.2124746,
"system": 0.5320614,
"min": 0.26657841042,
"max": 0.29010665542,
"times": [
0.29010665542,
0.27072635142,
0.27588277142,
0.27744607542,
0.27715545842,
0.27417784142,
0.26657841042,
0.26920272242,
0.26672503742000003,
0.27836031742
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.58965980836,
"stddev": 0.013249407722988734,
"median": 2.58422951056,
"user": 1.51595798,
"system": 1.3130678400000002,
"min": 2.57470146456,
"max": 2.61658627856,
"times": [
2.58493431656,
2.58063055556,
2.59077976056,
2.58048822756,
2.58050402756,
2.57470146456,
2.60375735956,
2.61658627856,
2.58352470456,
2.60069138856
]
},
{
"command": "pacquet@main",
"mean": 2.59827056436,
"stddev": 0.02197209508092441,
"median": 2.59766393906,
"user": 1.46452178,
"system": 1.33799374,
"min": 2.5681009705599998,
"max": 2.63758258256,
"times": [
2.57472680256,
2.62662661856,
2.63758258256,
2.60653681156,
2.60274479356,
2.5681009705599998,
2.60018219956,
2.59514567856,
2.57830085056,
2.59275833556
]
},
{
"command": "pnpr@HEAD",
"mean": 1.6696839224599997,
"stddev": 0.1487364566392309,
"median": 1.7239304515599998,
"user": 1.02047268,
"system": 1.13691394,
"min": 1.4399266765599998,
"max": 1.82485535256,
"times": [
1.82485535256,
1.5503216015599999,
1.79278614456,
1.46014148756,
1.4399266765599998,
1.58082057256,
1.74252188756,
1.7849668855599998,
1.70533901556,
1.81515960056
]
},
{
"command": "pnpr@main",
"mean": 1.6775055821599998,
"stddev": 0.1308097221161275,
"median": 1.7122265895599997,
"user": 1.03574338,
"system": 1.11509854,
"min": 1.43389018956,
"max": 1.8210324355599998,
"times": [
1.8210324355599998,
1.8044980015599998,
1.79952176356,
1.63785516556,
1.61566329956,
1.7376226845599998,
1.5005191025599998,
1.70015989556,
1.43389018956,
1.7242932835599998
]
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.41744126108,
"stddev": 0.015347146103789993,
"median": 0.41390531888000004,
"user": 0.5216339000000001,
"system": 0.7040580000000001,
"min": 0.40403950288,
"max": 0.44651460788,
"times": [
0.41085447088000004,
0.44188999188,
0.42048278588000004,
0.40482907888,
0.40403950288,
0.41695616688000003,
0.44651460788,
0.40538601788,
0.41784153288000003,
0.40561845488000003
]
},
{
"command": "pacquet@main",
"mean": 0.4168531592800001,
"stddev": 0.012513904126481477,
"median": 0.41503309738000005,
"user": 0.5289211,
"system": 0.6740027000000002,
"min": 0.39860541488,
"max": 0.43354495388000003,
"times": [
0.43196511988,
0.41804712088,
0.39860541488,
0.40905037488,
0.41432245988000005,
0.41116904288,
0.43354495388000003,
0.41574373488000005,
0.43327871288,
0.40280465788
]
},
{
"command": "pnpr@HEAD",
"mean": 0.30609638418,
"stddev": 0.008611956958172257,
"median": 0.30778118138,
"user": 0.20091740000000002,
"system": 0.526927,
"min": 0.29092041788,
"max": 0.32000874388,
"times": [
0.30594080188,
0.29620424488,
0.29981305688000004,
0.31150006688000004,
0.29092041788,
0.30384816388,
0.30962156088000004,
0.32000874388,
0.31167720988000003,
0.31142957488
]
},
{
"command": "pnpr@main",
"mean": 0.30629712088,
"stddev": 0.006782367239850866,
"median": 0.30435379488000003,
"user": 0.1931386,
"system": 0.5292504,
"min": 0.29691206688,
"max": 0.31539177288000003,
"times": [
0.31539177288000003,
0.31161123588,
0.30488399288,
0.30166329088000005,
0.30379271788,
0.31530457788,
0.29691206688,
0.30382359688,
0.29795804488,
0.31162991188
]
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.7362836442200003,
"stddev": 0.01256834177151546,
"median": 1.7338903216200001,
"user": 0.76108098,
"system": 0.7842764599999998,
"min": 1.7204865336200001,
"max": 1.75591829962,
"times": [
1.74510826362,
1.73549083262,
1.75591829962,
1.72353836862,
1.7386081446200001,
1.7263409436200001,
1.7204865336200001,
1.73228981062,
1.7293467616200002,
1.75570848362
]
},
{
"command": "pacquet@main",
"mean": 1.7224553201200004,
"stddev": 0.010375328595672936,
"median": 1.7230073591200001,
"user": 0.7377047800000001,
"system": 0.7417729599999999,
"min": 1.7096979146200002,
"max": 1.74191113162,
"times": [
1.74191113162,
1.72904765762,
1.72396861862,
1.7220460996200002,
1.7295376806200002,
1.7096979146200002,
1.71292446862,
1.71046473862,
1.71551833062,
1.7294365606200002
]
},
{
"command": "pnpr@HEAD",
"mean": 0.30097615152,
"stddev": 0.006635196128097438,
"median": 0.30236734862000003,
"user": 0.19103078,
"system": 0.51328506,
"min": 0.29036701862,
"max": 0.30890308062,
"times": [
0.30618603662,
0.30821550661999997,
0.29384698062,
0.29036701862,
0.29990089562,
0.30184006662,
0.29266183862,
0.30890308062,
0.30289463062,
0.30494546062
]
},
{
"command": "pnpr@main",
"mean": 0.30503495102,
"stddev": 0.00681859648357653,
"median": 0.30235175962,
"user": 0.19026778,
"system": 0.53126316,
"min": 0.29527402562,
"max": 0.31489298662,
"times": [
0.30019777461999997,
0.29527402562,
0.31489298662,
0.30731749662,
0.30319196162,
0.30088286461999997,
0.31441477562,
0.30029264362,
0.31237342362,
0.30151155762
]
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.24071282991666673,
"stddev": 0.012268260600644697,
"median": 0.23926352500000003,
"user": 0.17072819333333333,
"system": 0.06808799666666666,
"min": 0.21436628750000003,
"max": 0.2556040075,
"times": [
0.23610989350000003,
0.23095839850000002,
0.2556040075,
0.25518747350000004,
0.24562217850000004,
0.23662233950000003,
0.25379580350000003,
0.25059066150000003,
0.21436628750000003,
0.23116986550000002,
0.24138896150000003,
0.23713808850000004
]
},
{
"command": "pacquet@main",
"mean": 0.22051643856666664,
"stddev": 0.02010570951814567,
"median": 0.21770492050000004,
"user": 0.16901992666666665,
"system": 0.07253667999999999,
"min": 0.1880870115,
"max": 0.25584222650000005,
"times": [
0.19590622950000003,
0.22604081250000002,
0.21770492050000004,
0.21817270250000004,
0.25584222650000005,
0.21474016950000002,
0.22691074950000004,
0.23494977950000004,
0.25580161050000005,
0.1880870115,
0.21309507450000004,
0.24189470250000003,
0.21138780150000003,
0.20084589750000004,
0.20636689050000004
]
},
{
"command": "pnpr@HEAD",
"mean": 0.08744568573529411,
"stddev": 0.0015473633192662705,
"median": 0.08736643250000001,
"user": 0.02073297764705882,
"system": 0.009232928235294119,
"min": 0.08429708150000001,
"max": 0.0905452415,
"times": [
0.08429708150000001,
0.0873913035,
0.0874613675,
0.0895584135,
0.0854650485,
0.0873415615,
0.08709850250000001,
0.0867583225,
0.08828018850000001,
0.0863613765,
0.0892886065,
0.0869284045,
0.08655293650000001,
0.0868149505,
0.0876473965,
0.08985775750000001,
0.0873940705,
0.0847113005,
0.0898514765,
0.08620944950000001,
0.08805523450000001,
0.0876054485,
0.0864154875,
0.0855632145,
0.0905452415,
0.0858484405,
0.08727412450000001,
0.0879500755,
0.0895236995,
0.0899082325,
0.08730865850000001,
0.0884865675,
0.0878569515,
0.0855424235
]
},
{
"command": "pnpr@main",
"mean": 0.08729739115625,
"stddev": 0.0014319304165686354,
"median": 0.08720172300000001,
"user": 0.02204311,
"system": 0.007490796250000001,
"min": 0.08474284950000001,
"max": 0.0913853825,
"times": [
0.0875224405,
0.0874123545,
0.08549619850000001,
0.08582400450000001,
0.0913853825,
0.0854388495,
0.08677280150000001,
0.0872016085,
0.0863749815,
0.0879063545,
0.0872018375,
0.08809333550000001,
0.0871802675,
0.0872807565,
0.08783853650000001,
0.0872797255,
0.08582070850000001,
0.0896604165,
0.0866340585,
0.0858822545,
0.0871508025,
0.08807809750000001,
0.0881850795,
0.0860404725,
0.08712697650000001,
0.0902598945,
0.0871766405,
0.08787410350000001,
0.08474284950000001,
0.0890110135,
0.0855653185,
0.08809839550000001
]
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.8068817763666668,
"stddev": 0.15406673209847394,
"median": 0.7571577837000001,
"user": 0.7444740266666667,
"system": 0.13460369333333333,
"min": 0.6470234607,
"max": 1.1556029387,
"times": [
0.8307941877000001,
1.1556029387,
0.7395045457000001,
0.8459088287000001,
0.6470234607,
0.8832622477000001,
0.7538413017000001,
0.6488406927000001,
0.7571577837000001
]
},
{
"command": "pacquet@main",
"mean": 0.7161827948111112,
"stddev": 0.10623790778459302,
"median": 0.6958618787,
"user": 0.6651402488888889,
"system": 0.11970269333333333,
"min": 0.6131005787,
"max": 0.9109070327000001,
"times": [
0.6958618787,
0.7630978247000001,
0.6560515847,
0.6131005787,
0.6979461607,
0.6278765607000001,
0.8548899037000001,
0.9109070327000001,
0.6259136287000001
]
},
{
"command": "pnpm@HEAD",
"mean": 2.870788353255556,
"stddev": 0.06652258625376671,
"median": 2.8550789166999997,
"user": 4.40506136,
"system": 0.28062369333333337,
"min": 2.8075630876999997,
"max": 3.0384957807,
"times": [
2.8877349647,
2.8550789166999997,
2.8523005077,
2.8583688587,
2.8075630876999997,
2.8308886447,
2.8581995207,
3.0384957807,
2.8484648977
]
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.5141338847400005,
"stddev": 0.13970115987423656,
"median": 4.482691985240001,
"user": 1.6630096199999997,
"system": 1.36856062,
"min": 4.38979380874,
"max": 4.86696751074,
"times": [
4.53298532974,
4.47525155874,
4.86696751074,
4.43192959474,
4.56674274074,
4.40060797174,
4.49013241174,
4.42280789174,
4.38979380874,
4.564120028740001
]
},
{
"command": "pacquet@main",
"mean": 4.57351097154,
"stddev": 0.21237324742146046,
"median": 4.46225299124,
"user": 1.73380892,
"system": 1.44121512,
"min": 4.41869967774,
"max": 4.96316824074,
"times": [
4.45352934174,
4.75671170774,
4.96316824074,
4.47097664074,
4.41869967774,
4.42105617574,
4.48727851274,
4.89363198574,
4.42665566074,
4.4434017717400005
]
},
{
"command": "pnpr@HEAD",
"mean": 3.5180134670400003,
"stddev": 0.11044678419209958,
"median": 3.47534023474,
"user": 1.1582634200000002,
"system": 1.2047804199999996,
"min": 3.44319324174,
"max": 3.80256555974,
"times": [
3.46708235574,
3.55145334774,
3.80256555974,
3.47986409474,
3.48006275974,
3.47081637474,
3.45155639074,
3.4461889877400003,
3.44319324174,
3.58735155774
]
},
{
"command": "pnpr@main",
"mean": 3.5514968760400003,
"stddev": 0.1363212329300106,
"median": 3.48487596124,
"user": 1.1700598199999999,
"system": 1.2293174199999999,
"min": 3.43753843174,
"max": 3.8237550857400002,
"times": [
3.8237550857400002,
3.45237345574,
3.43753843174,
3.54709964074,
3.46397663674,
3.48428887174,
3.48546305074,
3.44074688074,
3.72987684674,
3.64984985974
]
}
]
} |
|
| Project | pnpm's project |
| Branch | pr/13732 |
| 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,439.93 ms |
| isolated-linker.fresh-install.cold-cache.hot-store | 📈 view plot | 290.37 ms |
| isolated-linker.fresh-install.hot-cache.hot-store | 📈 view plot | 290.92 ms |
| isolated-linker.fresh-resolve.hot-cache.offline | 📈 view plot | 84.30 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store | 📈 view plot | 1,354.52 ms |
| isolated-linker.fresh-restore.cold-cache.cold-store.cold-pnpr | 📈 view plot | 3,443.19 ms |
| isolated-linker.fresh-restore.hot-cache.hot-store | 📈 view plot | 251.65 ms |
PR Summary by QodoAdd get-pnpm: install pnpm via
AI Description
Diagram
High-Level Assessment
Files changed (28)
|
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains. Reviews (2): Last reviewed commit: "chore: keep the spellings the setup fix ..." | Re-trigger Greptile |
Code Review by Qodo
1. Scoped package URL unescaped
|
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (3)
installer/src/resolveVersion.ts (1)
24-24: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winReplace the custom regular expression.
Line 24 uses
/^\d+$/for a simple digit check. Use plain string operations for this case.As per coding guidelines, “Prefer plain string operations over custom regular expressions.”
🤖 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 `@installer/src/resolveVersion.ts` at line 24, Replace the regular-expression check in resolveVersion with plain string operations that determine whether version contains only digits, preserving the existing behavior for empty and non-numeric values.Source: Coding guidelines
.changeset/install-pnpm-with-npx.md (1)
5-13: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winKeep the changeset focused on user-visible behavior.
Move the signature verification mechanics, pinned-key details, and registry implementation details to the README or PR description. Keep this entry to the new
npx get-pnpminstallation capability and its observable result.Based on learnings, Changesets should describe concise user-visible behavior rather than implementation rationale.
🤖 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 @.changeset/install-pnpm-with-npx.md around lines 5 - 13, Rewrite the changeset to describe only the user-visible addition of installing pnpm via `npx get-pnpm`, including support for selecting versions and the resulting pnpm setup on the user’s PATH. Remove signature verification, pinned-key, registry, download-source, and implementation-detail explanations; place those details in the README or PR description instead.Sources: Path instructions, Learnings
installer/test/installPnpm.test.ts (1)
86-99: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTest the pre-v12 manifest path.
This suite resolves version
99.0.0, sowriteManifest()returns before it writes the v11 manifest. Add a v11 wrapper fixture withpackage.jsondependencies. Assert that setup receives a manifest with"type": "module", both bin aliases, and copied dependencies. Then run only this test file through the installer test script.As per path instructions, provide meaningful regression tests for setup manifests.
🤖 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 `@installer/test/installPnpm.test.ts` around lines 86 - 99, Add a v11 wrapper fixture with a package.json containing dependencies, and add a regression test around installPnpm that exercises the pre-v12 writeManifest path. Assert setup receives a manifest with module type, both bin aliases, and copied dependencies, then run only installer/test/installPnpm.test.ts through the installer test script.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.
Inline comments:
In `@installer/src/extractTarball.ts`:
- Around line 12-22: Update extractTarball to inspect the tarball’s archive
members before running the existing tar extraction, rejecting symlink, hardlink,
absolute-path, and normalized paths that escape dest; abort with an error before
any extraction occurs. Preserve the current mkdirSync and tar error handling for
archives that pass validation.
In `@installer/src/registry.ts`:
- Line 41: Update the tarball fetch around request(new URL(meta.dist.tarball))
to treat registry metadata as untrusted: require an HTTPS URL, enforce its
origin against the configured explicit mirror policy, and reject redirects or
validate each redirect target with the same checks. Ensure disallowed origins
and redirect targets are rejected before fetching.
- Around line 40-89: Replace expected plain Error throws with PnpmError in
downloadTarball() and its checksum/request helpers in installer/src/registry.ts
(lines 40-89), resolveVersion() in installer/src/resolveVersion.ts (lines
17-29), and verifyRegistrySignature() in installer/src/verifySignature.ts (lines
27-60); assign a distinct error code to each failure type, preserve existing
messages and causes, and add `@pnpm/error` as a runtime dependency in
installer/package.json.
In `@installer/src/verifySignature.ts`:
- Around line 51-53: Define and implement a historical-package policy that
permits exact-version releases signed by retained, expired npm keys while still
rejecting keys outside the supported retention policy. Align verifySignature’s
expiry validation, npmSigningKeys generation/retention in
update-npm-signing-keys.mjs, and regression fixtures so key expiry is evaluated
against the requested package version’s signing context rather than only
opts.now.
---
Nitpick comments:
In @.changeset/install-pnpm-with-npx.md:
- Around line 5-13: Rewrite the changeset to describe only the user-visible
addition of installing pnpm via `npx get-pnpm`, including support for selecting
versions and the resulting pnpm setup on the user’s PATH. Remove signature
verification, pinned-key, registry, download-source, and implementation-detail
explanations; place those details in the README or PR description instead.
In `@installer/src/resolveVersion.ts`:
- Line 24: Replace the regular-expression check in resolveVersion with plain
string operations that determine whether version contains only digits,
preserving the existing behavior for empty and non-numeric values.
In `@installer/test/installPnpm.test.ts`:
- Around line 86-99: Add a v11 wrapper fixture with a package.json containing
dependencies, and add a regression test around installPnpm that exercises the
pre-v12 writeManifest path. Assert setup receives a manifest with module type,
both bin aliases, and copied dependencies, then run only
installer/test/installPnpm.test.ts through the installer test script.
🪄 Autofix
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: 7780b4b1-cd6b-43dd-b8bb-1f97eb39f248
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml,!pnpm-lock.yaml
📒 Files selected for processing (27)
.changeset/install-pnpm-with-npx.md.changeset/setup-writes-module-type.md.meta-updater/src/index.tscspell.jsoninstaller/README.mdinstaller/bin/get-pnpm.jsinstaller/package.jsoninstaller/src/extractTarball.tsinstaller/src/index.tsinstaller/src/npmSigningKeys.tsinstaller/src/platformPackageName.tsinstaller/src/registry.tsinstaller/src/resolveVersion.tsinstaller/src/verifySignature.tsinstaller/test/installPnpm.test.tsinstaller/test/platformPackageName.test.tsinstaller/test/resolveVersion.test.tsinstaller/test/tsconfig.jsoninstaller/test/verifySignature.test.tsinstaller/tsconfig.jsoninstaller/tsconfig.lint.jsonpnpm-workspace.yamlpnpm/crates/cli/src/cli_args/setup.rspnpm/crates/cli/src/cli_args/setup/tests.rspnpm11/deps/security/signatures/scripts/update-npm-signing-keys.mjspnpm11/engine/pm/commands/src/setup/setup.tspnpm11/engine/pm/commands/test/setup/setup.test.ts
…ndalone executable When `pnpm setup` runs from a standalone executable whose directory has no `package.json` — the tarball that https://get.pnpm.io/install.sh downloads — it writes one so the global install has a package to install. That manifest omitted `"type": "module"`, so Node.js reparsed the ESM files shipped next to the executable (`dist/worker.js`) as CommonJS first and printed a `MODULE_TYPELESS_PACKAGE_JSON` warning on every spawn. The published `@pnpm/exe` manifest already declares the module type, so this only affected installs made through the standalone script. Fixed in both stacks. The manifest construction moves into `standaloneManifest` / `standalone_manifest`, so it can be asserted without running the global install the surrounding function performs.
They arrived with the installer package, which now lives in pnpm/get.pnpm.io; the two words are still used by the comment and the changeset here.
|
Code review by qodo was updated up to the latest commit 3ace631 |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
|
The open conversations on this PR are all on The findings did not go with them, so for the record, checked against the code as shipped: Fixed in get.pnpm.io before it merged
Checked and not defects
Deliberate, and written down rather than silently chosen
Resolving them here; anything still worth pursuing belongs in Written by an agent (Claude Code, claude-opus-5). |
Summary
pnpm setupwrites apackage.jsonnext to a standalone executable that ships without one — the tarball get.pnpm.io/install.sh downloads — so the global install has a package to install. That manifest omitted"type": "module", so Node.js reparsed the ESM files shipped beside the executable (dist/worker.js) as CommonJS first and printed aMODULE_TYPELESS_PACKAGE_JSONwarning on every pnpm invocation:The published
@pnpm/exemanifest already declares the module type, so this only affected installs made through the standalone script — which is the install path pnpm.io recommends first.Found while building an npx-runnable installer on this branch. That installer has since moved to pnpm/get.pnpm.io#51, where it sits beside
install.shandinstall.ps1and shares their pinned npm signing key; it is published asget-pnpmand now used by pnpm/setup. This PR is only the CLI fix that came out of it.Squash Commit Body
Checklist
pnpm/port, or the description notes what still needs porting.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).