Release: Yarn 2.0 ๐งถ๐
ยท 18 min read
Hi everyone! After exactly 365 days of very intensive development, I'm extremely happy to unveil the first stable release of Yarn 2. In this post I will explain what this release will mean for our community. Buckle up!
If you're interested to know more about what will happen to Yarn 1, keep reading as we detail our plans later down this post: Future Plans. If you just want to start right now with Yarn 2, check out the Getting Started or Migration guides.
Release Overviewโ
Describing this release is particularly difficult - it contains core, fundamental changes, shipped together with new features born from our own usage.
Highlightsโ
- The output got redesigned for improved readability
- designed for improved readability
- Our CLI commands (
yarn add
, ...) are now aware of workspaces - Running
yarn install
can be made optional on per-repo basis - A safer
npx
counterpart calledyarn dlx
to run one-shot tools - Run commands on all workspaces with
yarn workspaces foreach
- Packages can be modified in-place through the
patch:
protocol - Local packages can be referenced through the new
portal:
protocol - A new workflow has been designed to efficiently release workspaces
- Workspaces can now be declaratively linted and autofixed
But also...โ
- Package builds are now only triggered when absolutely needed
- Package builds can now be enabled or disabled on a per-package basis
- Scripts now execute within a normalized shell
- Peer dependencies now work even through
yarn link
- The lockfile is now proper YAML
- The codebase is now full TypeScript
- Yarn can now be extended through plugins