So what’s new in Yarn? Yarn added a new feature called Workspaces, which lets people automatically aggregate all the dependencies from multiple
package.json files and install them all in one go. It also uses a single
yarn.lock file at the root, to lock them all, according to a Facebook post debuting the Yarn 1.0 release.
Workspaces is used by some teams at Facebook already, like in Babel. Lerna, a mono-repository management tool lets you opt in to Yarn’s Workspaces.
“By making Workspaces native to Yarn, we hope to enable faster and lighter installations by preventing package duplication between the smaller parts of a larger project,” read the Facebook blog.
Also in Yarn 1.0 is the new auto-merging of lockfiles feature. When there’s a merge conflict in the lockfile, Yarn will automatically handle the conflict resolution for you upon running
yarn install, according to the blog. And if it succeeds, the conflict-free lockfile will save to a disk.
Besides some of the top new features, Yarn also improved its interactive upgrade experience, it includes a faster file integrity check, and there’s a separate lockfile parser module that you can use in your project.
Still not sure what Yarn is all about? We first covered its big release here.
Top five projects trending on GitHub this week
#1. Every Programmer Should Know: A collection of (mostly) technical things every software developer should know
#2. R2: HTTP client. Spiritual successor to request.
#3. WTFPython: A collection of interesting, subtle, and tricky Python snippets.
#4. Easy Mock: A persistent service that generates mock data quickly and provides visualization view.
#5. Clean Code PHP:? Clean Code concepts adapted for PHP