Original by TrappedInVacancy on DeviantArt.
Among the many changes, it removes support for bower. So yarn is truly a drop in replacement for npm now.
npm install -g yarn
yarn --version returns
0.17. Then run it against your code base by simply typing this:
Only thing you should see is a
First, yarn freezes your dependency when you first install them. This allows you to avoid upgrading sub-sub-sub-sub-sub-sub-sub-sub dependency that could break your build because someone down the chain didn’t get semver.
The lock file is alphabetically ordered YAML and automatically generated when running
yarn. Every time this file change, you know your dependencies changed. As simple as that. Not only that, it also freezes all child dependencies as well. That makes build process repeatable and non-breaking even if someone decides that semver is stupid.
Second, yarn allows for interactive dependency upgrade. Just look at this beauty.
Cherry picking your upgrade has never been easier. If include
yarn why <PACKAGE NAME> which gives you the reason for a package’s existence, yarn truly allows you to see and manage your dependencies with ease.
Finally, yarn will checksum and cache every packages it downloads. Even better for build servers that always re-install the same packages. Yarn also install/download everything in parallel. Everything to get you fast and secure builds for this special Single Page Application you’ve been building.
If you want the whole sales pitch, you can head read so on Facebook’s announcement’s page.
What is your favorite Yarn feature? Have you upgraded yet? Leave me a comment!