• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1---
2section: configuring-npm
3title: shrinkwrap.json
4description: A publishable lockfile
5---
6
7# npm-shrinkwrap.json(5)
8
9## A publishable lockfile
10
11### Description
12
13`npm-shrinkwrap.json` is a file created by [`npm shrinkwrap`](/cli-commands/npm-shrinkwrap). It is identical to
14`package-lock.json`, with one major caveat: Unlike `package-lock.json`,
15`npm-shrinkwrap.json` may be included when publishing a package.
16
17The recommended use-case for `npm-shrinkwrap.json` is applications deployed
18through the publishing process on the registry: for example, daemons and
19command-line tools intended as global installs or `devDependencies`. It's
20strongly discouraged for library authors to publish this file, since that would
21prevent end users from having control over transitive dependency updates.
22
23Additionally, if both `package-lock.json` and `npm-shrinkwrap.json` are present
24in a package root, `package-lock.json` will be ignored in favor of this file.
25
26For full details and description of the `npm-shrinkwrap.json` file format, refer
27to the manual page for [package-lock.json](/configuring-npm/package-lock-json).
28
29### See also
30
31* [npm shrinkwrap](/cli-commands/npm-shrinkwrap)
32* [package-lock.json](/configuring-npm/package-lock-json)
33* [package.json](/configuring-npm/package-json)
34* [npm install](/cli-commands/npm-install)
35