Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade yarn to v4 #644

Open
JoseWhite opened this issue Jun 12, 2024 · 2 comments
Open

Upgrade yarn to v4 #644

JoseWhite opened this issue Jun 12, 2024 · 2 comments

Comments

@JoseWhite
Copy link

Feature Description

The idea is to migrate the project away from Yarn 1 into Yarn 4.

Storybook for one has decided to drop support for Yarn 1 from Storybook v8 forward. Notes here

While this wont make it impossible for the project to continue to run storybook or newer versions, it will certainly make it more difficult to continue upgrading as Storybook no longer provides any of the migration scripts via Yarn 1.

Suggested Solution

Alternatives Considered / Existing Workarounds

Existing work around:

  1. is to switch to yarn 4 temporarily while upgrading Storybook
  2. Executes necessary scripts via yarn dlx
  3. Get the desired result on all migrated files
  4. Switch back to yarn 1
  5. remove changes made to package.json & yarn.lock
  6. Commit only desired changes

Additional Context

There are numerous improvements to be obtained by moving into Yarn 4 including but not limited to:

  • Stability: Yarn Modern came after years of experience with maintaining Classic; its design was informed by the shortcomings we saw, and as a result the software is much more stable than it ever was.
  • New features: Yarn Modern provides many new features that didn't exist in Yarn 1.x - or any other package managers for that matter. As an example, Constraints are exclusive to Yarn Modern.
  • Flexibility: Yarn Modern supports all three installation strategies: Yarn PnP, node_modules, and via a pnpm-like content-addressed cache. No matter which one you prefer, you have it at your disposal.
  • Future proof: Yarn Modern was built after we started to see how difficult it was to build new features on Yarn Classic, with most changes having unpredictable consequences. This plateau has been solved, as evidenced by the slate of features that we released in the past few major releases.

Reference: Yarn migration benefits

@chawes13
Copy link
Contributor

@JoseWhite Would this require a migration across all consumers (e.g., client-template)?

@JoseWhite
Copy link
Author

I'm honestly not sure, and can't seem to find resources about it.
Perhaps trying it as a "beta" release and seeing how it holds up on a matching consumer beta release would be good way to test it out?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants