Facebook releases Yarn 1.0, an open source JavaScript Package Manager

JavaScript Package Manager

Facebook Yarn

Facebook releases new version of Yarn (an open source JavaScript Package Manager), which features a workspaces capability. Yarn, an alternative manager to NPM (Node Package Manager), and default package manager for Node.js installations.

Both Yarn and npm make JavaScript development more tolerable by managing the code libraries. Also, unavoidable when developing modern web applications. Facebook says, more than 175,000 projects on GitHub that use Yarn and the software now handles over 3 billion package downloads a month.

Almost a year ago we launched Yarn. The main focus is stability, resiliency, and performance, said, Facebook engineers. They claim that large companies like Twitter and Microsoft used the software and reduced package install times by a factor of five.

Facebook protect 360-degree photos look clarity by using AI

In addition to speed, Yarn’s main reason is to make the installations more reliable and reproducible through the inclusion of lock files. These files limit installed dependences to a specific version, to make every install result in the same file structure in the node_modules folder across all machines.

Yarn 1.0

Yarn’s deterministic approach to package management has appealed to devops automation, where scripts demand consistent behavior. Yarn 1.0 adds some new bells and whistles. A feature called Workspaces designed to make life easier for companies that prefer a single large code repository, to avoid dependency synchronization problems, over distributed repositories.

Workspaces allow users to gather dependences listed in multiple package.json files and install them in subfolders of a single root package.json file, under a single lock file. A new auto-merge mechanism resolves lock file merge conflicts that may arise after the yarn install command.

Kickstarter, A Crowdfunding Platform helps with funding on creativity

Also, a selective version resolution features designed to handle situations where layers of dependencies delay the availability of patched code. Instead of waiting for a direct dependency to update or forking code for a fix, the resolution field in package.json files can demand specific versions of sub-dependencies.

Facebook team says, we hope to make Yarn more useful for providing some assurance that packages are safe. Also, planning to work with npm to add two-factor authentication to Yarn to enhance package security.