-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
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
- Follow the migration steps provided for Yarn upgrades
Alternatives Considered / Existing Workarounds
Existing work around:
- is to switch to yarn 4 temporarily while upgrading Storybook
- Executes necessary scripts via
yarn dlx - Get the desired result on all migrated files
- Switch back to yarn 1
- remove changes made to package.json & yarn.lock
- 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