npm and yarn, together

yarn is an improvement on npm, in terms of speed, consistency, security, and the general aesthetics of its console output. This has, in turn, made npm betternpm v5.0.0 introduced the following changes, obtained from the official announcement on the npm blog:

  • npm will --save by default now. Additionally, package-lock.json will be automatically created unless an instance of npm-shrinkwrap.json exists.
  • Package metadata, package download, and caching infrastructure have been replaced. The new cache is very fault-tolerant and supports concurrent access.
  • Running npm while offline will no longer insist on retrying network requests. npm will now immediately fall back to the cache if possible, or fail.