Yarn is the newest package manager on the block with speed and improvements over npm.
From bower to npm, package management for the web has come a long way. I remember when I first started learning web development — you went online, looked for a package, download a zipped version, extract, and link on the web page. Heck, if we wanted a faster website, we would go to a CDN like jsDelivr and pick a globally cached version. From there, tools like bower emerged.
Since most packages are open-source, and since GitHub is the most popular place to host version controlled open-sourced files, bower served as a management tool to download the files, easily upgrade, etc. Bower had its shortcomings, but in the javascript world, a problem doesn’t last too long. There are things like polyfills, hacks, etc. A better management solution to bower called npm rose from the shadows. Being that npm is the default package manager for Node.js, it quickly rose to fame as it was and is a better package management tool than bower (IMHO).
Tech giants like facebook and google decided to team up and make a better package management tool, they called it Yarn. This tool will take packages from NpmJS or Bower registries, it also runs dependency installs parallel to each other.
If you’ve installed a package before, yarn creates a cached copy which facilitates offline package installs. Out of the box, yarn offers flat dependency structure as compared to npm’s nested structure.