Repository navigation
Conversation
Add the `--bare` CLI flag to `pnpm init` in pacquet, scaffolding a minimal `package.json` with only the required fields (`devEngines`, `packageManager`, and `type: "module"`).
|
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: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthrough
ChangesBare package initialization
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Sequence Diagram(s)sequenceDiagram
participant User
participant InitCLI
participant InitDispatcher
participant PackageManifest
User->>InitCLI: run pnpm init --bare
InitCLI->>InitDispatcher: pass bare option
InitDispatcher->>PackageManifest: initialize with bare option
PackageManifest-->>User: produce package.json
Assessment against linked issues
Suggested labels: Suggested reviewers: Merge Risk: ⚪ Minimal · up to The bare initialization path and its documented output have test coverage; no actionable issue remains before normal merge checks. ✨ 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 QodoSupport bare package manifests in pnpm init
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
Code Review by Qodo
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 #15541 +/- ##
=======================================
Coverage 91.79% 91.80%
=======================================
Files 1424 1424
Lines 192482 192489 +7
=======================================
+ Hits 176691 176710 +19
+ Misses 15791 15779 -12 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
…geset (#15538) Keep package-manager pinning logic inline within `create_init_package_json` and update changeset to active voice.
Micro-Benchmark ResultsLinux |
|
Code review by qodo was updated up to the latest commit bdca55b |
PR Code Suggestions ✨Warning
No code suggestions found for the PR. |
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.91693001186,
"stddev": 0.3078893406562751,
"median": 2.88296645356,
"user": 2.34718736,
"system": 1.99334146,
"min": 2.43977347506,
"max": 3.4029516900599996
},
{
"command": "pacquet@main",
"mean": 3.04842836586,
"stddev": 0.42673770627785146,
"median": 2.8831338670599997,
"user": 2.6474056599999995,
"system": 2.2656830599999997,
"min": 2.5574175920599997,
"max": 3.9115949410599997
},
{
"command": "pnpr@HEAD",
"mean": 1.4494935947600003,
"stddev": 0.12047453717469256,
"median": 1.40553198906,
"user": 1.40167306,
"system": 1.4208361599999997,
"min": 1.3072318920600001,
"max": 1.63545359806
},
{
"command": "pnpr@main",
"mean": 1.4764914549600001,
"stddev": 0.09841038002448978,
"median": 1.4670451125600001,
"user": 1.58924756,
"system": 1.65860366,
"min": 1.36357819906,
"max": 1.69789635506
}
]
}Scenario: Isolated linker: fresh restore, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.26205762048000003,
"stddev": 0.009420443692694574,
"median": 0.26163752568000004,
"user": 0.28108503999999995,
"system": 0.6240485199999999,
"min": 0.24410594418,
"max": 0.27732083618000003
},
{
"command": "pacquet@main",
"mean": 0.25209040218,
"stddev": 0.013725220131022006,
"median": 0.25555850268,
"user": 0.28021113999999997,
"system": 0.60990122,
"min": 0.23032071318,
"max": 0.26701355418000006
},
{
"command": "pnpr@HEAD",
"mean": 0.29200852378,
"stddev": 0.01753895220545655,
"median": 0.29096630668,
"user": 0.31714694,
"system": 0.6537393199999999,
"min": 0.26578699518000004,
"max": 0.31776013818000004
},
{
"command": "pnpr@main",
"mean": 0.2879111425800001,
"stddev": 0.011259330738697067,
"median": 0.28877921568000003,
"user": 0.30554064,
"system": 0.65653162,
"min": 0.26175073518,
"max": 0.30503605918000004
}
]
}Scenario: Isolated linker: repeat install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.006914366743084581,
"stddev": 0.0004831628008347111,
"median": 0.00685579786,
"user": 0.004250445472636821,
"system": 0.0030969898507462717,
"min": 0.00569745886,
"max": 0.01020735686
},
{
"command": "pacquet@main",
"mean": 0.007144398598028168,
"stddev": 0.000792664450547942,
"median": 0.007033932860000001,
"user": 0.004384803380281689,
"system": 0.0032032783098591565,
"min": 0.00587193586,
"max": 0.01104275186
},
{
"command": "pnpr@HEAD",
"mean": 0.006498377634358973,
"stddev": 0.0004317947495432477,
"median": 0.00643560636,
"user": 0.004201086153846156,
"system": 0.00267679641025641,
"min": 0.00570581486,
"max": 0.00901800986
},
{
"command": "pnpr@main",
"mean": 0.006450165995922334,
"stddev": 0.00039418841261667175,
"median": 0.006426769860000001,
"user": 0.004266593398058252,
"system": 0.002563478834951456,
"min": 0.00570890986,
"max": 0.00848065286
}
]
}Scenario: Isolated linker: repeat install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.011930785960000004,
"stddev": 0.0020567770141344628,
"median": 0.012075525960000002,
"user": 0.006903919797979802,
"system": 0.005642108686868687,
"min": 0.007932646460000001,
"max": 0.01814806646
},
{
"command": "pacquet@main",
"mean": 0.010381741326666668,
"stddev": 0.0017430827258503722,
"median": 0.010464908460000002,
"user": 0.006126704102564104,
"system": 0.004788977435897434,
"min": 0.00716576846,
"max": 0.015653234460000002
},
{
"command": "pnpr@HEAD",
"mean": 0.008969377733722623,
"stddev": 0.0007833388168845004,
"median": 0.008804628460000002,
"user": 0.005196308832116786,
"system": 0.004303099999999997,
"min": 0.0073884664600000005,
"max": 0.013147352460000001
},
{
"command": "pnpr@main",
"mean": 0.008635185141992338,
"stddev": 0.0007919126029901586,
"median": 0.00855189846,
"user": 0.005092308045977011,
"system": 0.004044274942528737,
"min": 0.00696102346,
"max": 0.01154148846
}
]
}Scenario: Isolated linker: fresh install, cold cache + cold store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 2.56018992894,
"stddev": 0.053476024147487054,
"median": 2.54923102274,
"user": 2.02387638,
"system": 1.61490874,
"min": 2.4817705882400003,
"max": 2.67337881624
},
{
"command": "pacquet@main",
"mean": 2.58639939804,
"stddev": 0.0804277152637953,
"median": 2.56734546374,
"user": 2.0407945799999996,
"system": 1.66755934,
"min": 2.48512886924,
"max": 2.71433175224
},
{
"command": "pnpr@HEAD",
"mean": 1.55699292604,
"stddev": 0.14474842598465115,
"median": 1.5312833217400001,
"user": 1.19060278,
"system": 1.29234734,
"min": 1.3973911312399998,
"max": 1.77731945024
},
{
"command": "pnpr@main",
"mean": 1.55096356464,
"stddev": 0.09928742401862228,
"median": 1.55464157424,
"user": 1.16658588,
"system": 1.2564432399999999,
"min": 1.43527784024,
"max": 1.72022259724
}
]
}Scenario: Isolated linker: fresh install, hot cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.4440359751,
"stddev": 0.03744383302685276,
"median": 0.44878957620000004,
"user": 0.6188353999999998,
"system": 0.72448,
"min": 0.3933931002,
"max": 0.5004003182
},
{
"command": "pacquet@main",
"mean": 0.4915393387,
"stddev": 0.03279347522698061,
"median": 0.5064515002000001,
"user": 0.6753327,
"system": 0.7813202999999999,
"min": 0.43646000520000006,
"max": 0.5360515492
},
{
"command": "pnpr@HEAD",
"mean": 0.3404473652,
"stddev": 0.021654369224396886,
"median": 0.3378595407,
"user": 0.2885124,
"system": 0.6050886999999999,
"min": 0.31250080620000004,
"max": 0.37595027420000005
},
{
"command": "pnpr@main",
"mean": 0.3561918841,
"stddev": 0.02956437367471151,
"median": 0.3491242822,
"user": 0.3070572,
"system": 0.6082392000000001,
"min": 0.3202420322,
"max": 0.41230329720000003
}
]
}Scenario: Isolated linker: fresh install, cold cache + hot store
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 1.7210364297200003,
"stddev": 0.055405639958449826,
"median": 1.7157328030199999,
"user": 1.02125138,
"system": 0.9595621599999997,
"min": 1.6501255695200001,
"max": 1.83545181952
},
{
"command": "pacquet@main",
"mean": 1.76422322242,
"stddev": 0.05334227564627143,
"median": 1.76998184302,
"user": 1.09782828,
"system": 0.98809526,
"min": 1.6963975595199998,
"max": 1.84609349752
},
{
"command": "pnpr@HEAD",
"mean": 0.35177797582,
"stddev": 0.014273125000283047,
"median": 0.35002496852000003,
"user": 0.31395078,
"system": 0.6472929599999999,
"min": 0.32640926152,
"max": 0.37868506152000003
},
{
"command": "pnpr@main",
"mean": 0.34258014322,
"stddev": 0.015644811048636253,
"median": 0.33881705951999996,
"user": 0.29767847999999997,
"system": 0.64275646,
"min": 0.32350516252,
"max": 0.37105363852
}
]
}Scenario: Isolated linker: fresh resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.20051984277428575,
"stddev": 0.010438674340170448,
"median": 0.20200579356,
"user": 0.20338021428571432,
"system": 0.06939435714285713,
"min": 0.18406766356,
"max": 0.21601115756
},
{
"command": "pacquet@main",
"mean": 0.20219175397666667,
"stddev": 0.014623285097427342,
"median": 0.19730164556000002,
"user": 0.20127058333333334,
"system": 0.06778974999999998,
"min": 0.18383857256,
"max": 0.23071194856000002
},
{
"command": "pnpr@HEAD",
"mean": 0.08846139015375,
"stddev": 0.0022809232130639396,
"median": 0.08784916656,
"user": 0.030147656249999998,
"system": 0.011749078125000003,
"min": 0.08365563856,
"max": 0.09521526156
},
{
"command": "pnpr@main",
"mean": 0.09040911510545455,
"stddev": 0.002724513773267227,
"median": 0.09033195356,
"user": 0.03360781818181817,
"system": 0.01240975757575758,
"min": 0.08579917356,
"max": 0.09556180356
}
]
}Scenario: Isolated linker: peer-heavy resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.7413188729244444,
"stddev": 0.06254363375534466,
"median": 0.75920174648,
"user": 0.76840546,
"system": 0.1710827422222222,
"min": 0.6017241884800001,
"max": 0.81448753448
},
{
"command": "pacquet@main",
"mean": 0.7827960495911112,
"stddev": 0.12413399576376968,
"median": 0.7740713304800001,
"user": 0.7964771266666665,
"system": 0.19383407555555554,
"min": 0.6275184634800001,
"max": 1.00637613048
},
{
"command": "pnpm@HEAD",
"mean": 3.2181526653688888,
"stddev": 0.07830615821634337,
"median": 3.21306911948,
"user": 4.957700348888888,
"system": 0.22791151999999995,
"min": 3.11756908948,
"max": 3.34245101948
}
]
}Scenario: Isolated linker: linked-workspace resolve, hot cache, offline
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 0.18571237964,
"stddev": 0.010076465483413104,
"median": 0.18287827614000002,
"user": 0.1376968942857143,
"system": 0.0914545457142857,
"min": 0.17065395614,
"max": 0.20099763114
},
{
"command": "pacquet@main",
"mean": 0.19357606007333333,
"stddev": 0.019457774174797462,
"median": 0.18891261014000002,
"user": 0.15320751333333332,
"system": 0.08656839333333334,
"min": 0.17180458014,
"max": 0.25072490714000006
}
]
}Scenario: Isolated linker: fresh restore, cold cache + cold store + cold pnpr
BENCHMARK_REPORT.json{
"results": [
{
"command": "pacquet@HEAD",
"mean": 4.7361423166200005,
"stddev": 0.16716819406175545,
"median": 4.79476407842,
"user": 2.14630908,
"system": 1.7534390399999995,
"min": 4.46953981842,
"max": 4.91538996642
},
{
"command": "pacquet@main",
"mean": 4.63500994332,
"stddev": 0.1838358940266876,
"median": 4.57356241992,
"user": 2.10955398,
"system": 1.78210144,
"min": 4.47860617442,
"max": 4.99848664842
},
{
"command": "pnpr@HEAD",
"mean": 3.5035616043200006,
"stddev": 0.1457386886728073,
"median": 3.47401211342,
"user": 1.59613878,
"system": 1.55444104,
"min": 3.37685082542,
"max": 3.88975913742
},
{
"command": "pnpr@main",
"mean": 3.4660629182200005,
"stddev": 0.06622833333683104,
"median": 3.4816175534200005,
"user": 1.3897169799999998,
"system": 1.4072378399999999,
"min": 3.3687557684200002,
"max": 3.54515188242
}
]
}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.12240508293,
"stddev": 0.004680124122366636,
"median": 0.12166774198000001,
"user": 0.15512361000000002,
"system": 0.13007138000000001,
"min": 0.11578958648000001,
"max": 0.13071641548000001
},
{
"command": "pacquet@main",
"mean": 0.12886910718,
"stddev": 0.0076924010566428854,
"median": 0.12791592248,
"user": 0.16532966,
"system": 0.13284808,
"min": 0.11884313348,
"max": 0.15509285048000002
},
{
"command": "pnpr@HEAD",
"mean": 0.13422478814666663,
"stddev": 0.005859076385954108,
"median": 0.13410666298,
"user": 0.15803500444444446,
"system": 0.13695424666666667,
"min": 0.12625978648,
"max": 0.14743818648
},
{
"command": "pnpr@main",
"mean": 0.12398259763789475,
"stddev": 0.0034817081812505515,
"median": 0.12336975248000001,
"user": 0.14294748105263158,
"system": 0.13036884315789474,
"min": 0.11840724948,
"max": 0.13257881248
}
]
} |
* fix(cli): support --bare in pnpm init (pnpm#15538) Add the `--bare` CLI flag to `pnpm init` in pacquet, scaffolding a minimal `package.json` with only the required fields (`devEngines`, `packageManager`, and `type: "module"`). * refactor(package-manifest): keep pinning logic inline and update changeset (pnpm#15538) Keep package-manager pinning logic inline within `create_init_package_json` and update changeset to active voice.
Summary
Closes #15538
Adds the
--bareCLI flag topnpm initin pacquet, scaffolding a minimalpackage.jsonwith only the required fields (devEngines,packageManager, andtype: "module") rather than the full scaffold.Squash Commit Body
Add the
--bareCLI flag topnpm initin pacquet, scaffolding a minimalpackage.jsonwith only the required fields (devEngines,packageManager,and
type: "module").Closes #15538
Checklist
pnpm changeset) if this PR changes any published package. Keep it short and written for pnpm users — it becomes a release note.Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
pnpm init --bareoption to create a minimalpackage.jsoninstead of the standard scaffold.--bareto thepnpm inithelp output.