nodejs / corepack

Zero-runtime-dependency package acting as bridge between Node projects and their package managers
MIT License
2.31k stars 146 forks source link

Marks `yarn init` as a transparent command #410

Closed arcanis closed 4 months ago

arcanis commented 4 months ago

New projects should use the newest versions when setup. Adding yarn init as a transparent command means that people running it will automatically have the packageManager field set to 4.1.0+sha... unless they explicitly opt-out by running corepack yarn@1 init instead.

Projects that don't list package managers will still execute Yarn 1.x, and so will other Yarn commands executed from outside any package directory (yarn config set, etc).

arcanis commented 4 months ago

I agree with @aduh95 - the two problems are separate, I don't think this PR should be blocked until I send a fix for the other one.

arcanis commented 4 months ago

Going to work on the "transparent version should be ignored if the local version supports the command" issue in a separate PR. Merging this one in the meantime.