Closed denar90 closed 7 years ago
From experience on different projects, yarn
is really nice. I've never used npm-shrinkwrap
so I've got no basis for comparison on that front but I've noticed yarn is way faster than npm i
.
@denar90
The entire idea behind this client was to minimize the time taken to install or update dependencies or make sure that they are locked correctly. When you go with this, I think you should verify that shrinkwrap was created with dev
, so the yarn could recreate similar dependency tree. Then make sure in install scripts that yarn in correct version is installed so postinstall script is run (and eventually address the postinstall script in package.json as it is also area covered by yarn)
👍
When I tried to deploy the system locally a couple of days before it took pretty long. I did not do any measurements but more than 5 minutes with no success. Then I removed npm-shrinkwrap.json
and it took more than an hour. I had to leave my laptop enabled and went to sleep :)
I've just tried yarn. It took 87 seconds to fetch all deps and more 13 seconds to fetch git submodule.
However, I did not perform $ yarn cache clean
which may also affect measuring time. So, yeah not so easy to collect real measurements :)
It's easier to compare if you clear your cache before each install :)
Should we replace
npm-shrinkwrap.json
byyarn.lock
? Do we have to just updatenpm-shrinkwrap.json
? How much faster it would be using yarn (make some tests)?