Yarn version 2

Christoffer Niska

Why a version 2?

Legacy architecture ๐Ÿข

Initial stack inherit too much from NPM, undocumented quirks, confusing configuration

Easier contributions ๐Ÿ‘จ๐Ÿปโ€๐Ÿ’ป

Written in TypeScript, scoped features, lower risk of unwanted interractions

New features

Offline mirror ๐Ÿ”ฎ

No network connection required
which means more reliable builds

Plug'n'Play ๐Ÿ”Œ

Generated .pnp.js file
(similar to autoload.php)ย 

Improved workspaces ๐Ÿ› 

ย 

Decouple monoliths into subprojects while still allowing for a "mono-repository"

Improved logging ๐Ÿ“„

Message codes and colors to emphasize importantance

Yarn DLX โš™๏ธ

NPX for Yarn
Install remote packages globally and run them locally
without updating package.json

Interactive mode ๐Ÿ•น

Select between versions, confirm actions for each workspace separately, etc.

Yarn UP โ˜๏ธ

Upgrade packages across workspaces

Constraints ๐Ÿ”—

Linting for package.json
with auto-fixable rules

Zero-installs ๐Ÿš€

Commit node_modules to run yarn install only once

Recap ๐Ÿ’ก

Offline mirror
Improved workspaces
Improved logging
Yarn DLX & Yarn UP
Constraints
Zero-installs

Try it out ๐Ÿงช

Read more ๐Ÿ“š

Thank you ๐Ÿ™๐Ÿป

Yarn version 2

By Christoffer Niska

Yarn version 2

What does the future of Yarn look like and why we all should be hyped about it.

  • 461