Should package-lock.json also be published?
What is the difference between npm-shrinkwrap.json and package-lock.json?
After reading the above one question remains. When to use what where.
When writing a node module which will be published to the npm lifecycle (so others can npm install it), shrinkwrap.json
should be used, since it can be published.
When writing a node module which you will use in prodution for your company etc., which will not be published to the npm lifecycle, package-lock.json
should be used.
Tbh reading the other questions might give people insight in the mechanics, but for those who want a simple view of how to use them, I must ask this straight forward question.