Skip to content

Adds packageManager during init#286

Merged
arcanis merged 2 commits intomainfrom
mael/init-version
Apr 21, 2026
Merged

Adds packageManager during init#286
arcanis merged 2 commits intomainfrom
mael/init-version

Conversation

@arcanis
Copy link
Copy Markdown
Member

@arcanis arcanis commented Apr 21, 2026

Note

Medium Risk
Touches project initialization and package.json generation, which can affect all newly created projects; risk is moderate because changes are localized but impact default manifest fields.

Overview
yarn init now always writes a packageManager field to package.json using the running CLI version (passed through InitParams), instead of relying on INFRA_VERSION/omitting it.

When initializing a new manifest, it also seeds type: "module", and the default empty package.json template now includes a trailing newline. Separately bumps zpm-switch from 6.0.0-rc.17 to 6.0.0-rc.18 (lockfile + manifest).

Reviewed by Cursor Bugbot for commit 167e9ae. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 9fdd3d2. Configure here.

Comment thread packages/zpm/src/commands/init.rs
@github-actions
Copy link
Copy Markdown

⏱️ Benchmark Results

gatsby install-full-cold

Metric Base Head Difference
Mean 2.431s 2.437s +0.26% ⚠️
Median 2.431s 2.427s -0.18% ✅
Min 2.391s 2.383s
Max 2.467s 2.772s
Std Dev 0.019s 0.069s
📊 Raw benchmark data (gatsby install-full-cold)

Base times: 2.441s, 2.442s, 2.467s, 2.421s, 2.442s, 2.457s, 2.415s, 2.432s, 2.438s, 2.431s, 2.413s, 2.417s, 2.391s, 2.464s, 2.431s, 2.428s, 2.443s, 2.434s, 2.416s, 2.449s, 2.407s, 2.428s, 2.457s, 2.409s, 2.423s, 2.427s, 2.431s, 2.448s, 2.395s, 2.423s

Head times: 2.404s, 2.412s, 2.398s, 2.452s, 2.430s, 2.425s, 2.399s, 2.496s, 2.448s, 2.428s, 2.383s, 2.420s, 2.407s, 2.392s, 2.425s, 2.403s, 2.440s, 2.386s, 2.436s, 2.446s, 2.453s, 2.495s, 2.431s, 2.430s, 2.441s, 2.447s, 2.391s, 2.420s, 2.398s, 2.772s


gatsby install-cache-and-lock (warm, with lockfile)

Metric Base Head Difference
Mean 0.339s 0.337s -0.47% ✅
Median 0.339s 0.336s -0.85% ✅
Min 0.330s 0.332s
Max 0.371s 0.348s
Std Dev 0.007s 0.004s
📊 Raw benchmark data (gatsby install-cache-and-lock (warm, with lockfile))

Base times: 0.347s, 0.339s, 0.339s, 0.347s, 0.339s, 0.338s, 0.340s, 0.340s, 0.341s, 0.337s, 0.339s, 0.337s, 0.340s, 0.341s, 0.371s, 0.339s, 0.333s, 0.339s, 0.340s, 0.334s, 0.337s, 0.331s, 0.330s, 0.336s, 0.330s, 0.338s, 0.333s, 0.335s, 0.340s, 0.331s

Head times: 0.341s, 0.337s, 0.334s, 0.338s, 0.342s, 0.345s, 0.337s, 0.336s, 0.332s, 0.341s, 0.339s, 0.348s, 0.336s, 0.341s, 0.335s, 0.333s, 0.335s, 0.336s, 0.336s, 0.337s, 0.335s, 0.335s, 0.333s, 0.335s, 0.340s, 0.332s, 0.336s, 0.336s, 0.337s, 0.336s

@arcanis arcanis merged commit 2035475 into main Apr 21, 2026
25 of 26 checks passed
@arcanis arcanis deleted the mael/init-version branch April 21, 2026 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant