react icon indicating copy to clipboard operation
react copied to clipboard

Add packageManager fields for Corepack compat

Open merrywhether opened this issue 1 month ago • 2 comments

Summary

For users with Yarn defaulted to >1 / Berry, setting up the repo will result in the creation of the .yarn/ directory, yarn.lock updates, and package.json edits. This change enables corepack users to automatically detect and use Yarn Classic with no effect on anyone else.

I targeted the latest version of Yarn Classic as a guess, since there were no engines entries to key off of. Happy to change this as desired.

How did you test this change?

Before this, running yarn in a fresh clone in either the root or compiler workspaces resulted in Yarn Berry making the above changes to the repo: 2000+ .yarn/cache entries, lockfile regeneration, and package.json formatting changes.

After this, yarn is handled by Yarn Classic as expected and no changes occur (and repo functions as expected).

merrywhether avatar May 16 '24 19:05 merrywhether