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.
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.