"We've used the NPM client successfully at Facebook for years, but as the size of our code base and the number of engineers grew, we ran into problems with consistency, security, and performance," Facebook engineers Sebastian McKenzie, Christoph Pojer, and James Kyle said in a jointly authored statement. "After trying to solve for each issue as it came up, we set out to build a new solution to help us manage our dependencies more reliably."
While NPM has been dependable, it can break down in large-scale code bases, Facebook said. Yarn replaces NPM in existing workflows while maintaining access to the popular NPM registry.
Npmjs.com, which provides the NPM registry, is paying close attention to Yarn. "We haven't had time to run extensive tests on the compatibility of Yarn," the company noted, "but it seems to work great with public packages. It does not authenticate to the registry the way the official client does, so it's currently unable to work with private packages. The Yarn team is aware of this issue and have said they'll address it."
Sign up for CIO Asia eNewsletters.