npm 5 introduced package-lock.json
, of which the documentation is here.
It states that the file is intended to be included with version control, so anyone cloning your package and installing it will have the same dependency versions. In other words, you should not add it to your .gitignore
file.
What it does not state is wether or not the file is intended to be included with a published package. This question could be rephrased as; should package-lock.json
be included in .npmignore
?