The Complete Magazine on Open Source

Facebook develops open source Javascript manager Yarn

SHARE
/ 688 0

Facebook

Facebook has made yet another contribution to the world of open source by releasing its open source JavaScript package manager called Yarn. This new development is touted to offer faster and more reliable installs than the original npm and is compatible with the npm registry.

According to an official statement by Facebook, Yarn is capable of reducing install times from many minutes to just some seconds. The package manager uses lockfiles and deterministic installation algorithm to deliver efficient results. Also, it eases the process of maintaining node_modules directories.

“Yarn is a new package manager that replaces the existing workflow for the npm client or other package managers while remaining compatible with the npm registry,” the Facebook engineering team led by Sebastian McKenzie, Christoph Pojer and James Kyle wrote in a recent post.

Through caching all newly downloaded packages, Yarn ensures quicker and reliable installs. This also helps in installing the packages even when you don’t have an active internet connection. However, you need to have installed the same package at least once to cache the data. Facebook confirms that Yarn is compatible with both npm and bower workflows.

Yarn comes months after the social networking company faced numerous issues with npm. It was using the default JavaScript package manager internally for a long time. And finally, Yarn emerged through a partnership between Facebook engineers and multiple teams of developers from Google, Exponent and Tilde.

You can experience the advantages of Yarn over original npm by downloading its package from its official website. Its code is also available openly on GitHub.