Issues

Select view

Select search mode

 

Try out Yarn instead of npm

Ready for Release

Description

Yarn appears to address npm's most important shortcomings: reproducibility, security and performance. It's still pretty new, but given our problems with npm, I think we should give it a try.

Official announcement: https://code.facebook.com/posts/1840075619545360

A comparison: https://www.sitepoint.com/yarn-vs-npm/

Notes:
Timebox this to 3 days

Details

Assignee

Reporter

Labels

Tested Version/s

Story Points

Components

Sprint

Fix versions

Priority

More fields

Created 29 November 2016 at 01:33
Updated 27 June 2018 at 02:17
Resolved 22 December 2016 at 05:07

Activity

Show:

Former user20 December 2016 at 21:59
Edited

Initial research:

Run (zanata-frontend module):
(yarn) mvn clean install 124.13s user 11.78s system 141% cpu 1:35.91 total
(npm) mvn clean install 285.47s user 20.03s system 122% cpu 4:08.57 total

Jenkins (zanata-frontend):
(npm)Zanata frontend 8 min 6 sec
(yarn)Zanata frontend 6 min 19 sec

Sean Flanigan15 December 2016 at 08:23

This looks interesting: https://medium.com/@boennemann/avoid-yarn-for-packages-and-fully-enjoy-its-benefits-for-application-development-8bdd4deb33cf#.6f3gni2jq I had no idea npm was downloading all those tarballs to check shrinkwrap files, but it helps to explain the terrible performance.

The fact that yarn apparently ignores dependencies' shrinkwrap/yarn.lock files is a bit of a concern. But it seems to me that whenever you use yarn upgrade (or npm install --no-shrinkwrap; npm shrinkwrap --dev) you will get the latest version (within a semver range) of everything anyway, so it may not be much worse in practice.

Loading...