npmshrinkwrapjson
npm-shrinkwrap.json, often referred to as npm-shrinkwrap.json or npm shrinkwrap, is a JSON manifest used by the Node.js package manager npm to lock a project’s dependencies to exact versions. It records the complete and exact dependency tree at a specific point in time, pinning each package to a precise version and source. The goal is to enable reproducible installs across different environments and over time, so that downstream developers and automated systems install the same dependency graph.
The file typically contains project metadata and a dependencies map. Each dependency entry includes fields such
Generation and usage: npm-shrinkwrap.json is created or updated by running the shrinkwrap command (npm shrinkwrap) in
Relation to other lock files: shrinkwrap predates the package-lock.json file and serves a similar purpose—ensuring deterministic
Limitations and best practices: shrinkwrap locks only the dependencies that exist at the time of generation.