What is the difference between yarn.lock and npm's shrinkwrap?

后端 未结 2 451
星月不相逢
星月不相逢 2020-12-23 11:20

Recently I tried installing my Node packages with Yarn. It works great and it\'s a lot faster than NPM. Yarn automatically generates yarn.lock. We already have

2条回答
  •  清歌不尽
    2020-12-23 11:44

    Is there any difference between them

    Yarn follows a more deterministic algorithm, compared to npm shrinkwrap. If you're using Yarn, continuing to use shrinkwrap would be counter-intuitive

    You can find this in the documentation for yarn.lock:

    It’s similar to npm’s npm-shrinkwrap.json, however it’s not lossy and it creates reproducible results

    However, the question still remains whether yarn is production ready. There are still a bunch of glaring bugs open on the GitHub repo, so I would wait it out for a month or so.

提交回复
热议问题