2

So I have replaced npm with yarn due to performance boost and the lockfile.

Never will there be problems with unexpected versions of dependencies!

Wait.

Why is my build writing a yarn.lock?

It turns out, if you want yarn to exit with an error code if it's out of sync with the package.json, you have to run it with:

$ yarn install --frozen-lockfile

Only then it will produce an error.

The default for it is to notice, oh, there is some new dependencies, let resolve this to the most current version I can fetch, and use that one, and write a new lockfile. Meaning you will get unknown futures of a depdency. O_o

That's totally going besides the purpose of having a lockfile in the first place. Why would anyone want this?

Action I do expect to touch the lockfile:

add / remove / upgrade

Action I do NOT expect to touch the lockfile:

install

Install should just install whatever is in there, and if it realizes it is out of sync, die with an error.

But that would make sense!

Who needs sensible defaults anyway!?

Comments
  • 0
    npm 5.3 has both a lock file and is a lot faster
  • 1
    @xenira

    npm@5.3.0 vs yarn@0.27.5

    # uncached run:

    npm: added 1737 packages in 103.054s
    yarn: Done in 55.81s.

    # cached run:
    npm: up to date in 9.151s
    yarn: Done in 5.13s.

    I still rather use yarn than npm.
  • 1
    @k0pernikus can understand that, just wanted to throw in that npm got a lot better :)
  • -1
    There are many sites that are giving the instructions to use the new webs and materials. Thus I am suggesting you to have https://paper-writing-service.reviews/... a look on this site that will be known as the effective one.
  • 0
    I am glad that you share this info
Add Comment