Locking modules to specific versions
suggest changenpm installs the newest version that satisfies each dependency's semantic version range. A later publish inside that range can still change what a fresh install gets.
Since npm 5, a normal install writes package-lock.json, which records the exact tree. npm shrinkwrap writes npm-shrinkwrap.json instead. That file is meant to be published with a library and, when both exist, it takes precedence over package-lock.json for people who install the package.
npm shrinkwrap
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents