GitHub project of the week: Yarn 1.0

GitHub project of the week: Yarn 1.0

The team behind Yarn, an open-source, fast and secure alternative npm client, announced the 1.0 release of the JavaScript package manager, which is a major step for the project. In the 11 month since its initial release in 2016 has generated more than 175,000 projects on GitHub, and it’s responsible for nearly three billion package downloads per month.

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.

The next time you have a lockfile conflict, you can save time by running yarn install instead of doing a manual resolution, according to the Yarn team.

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.

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

Related Post