reggi/cache-based-on-version
@reggi/path-to-regexp
dependabot/npm_and_yarn/main/copy-to-clipboard-4.0.2
dependabot/npm_and_yarn/main/eslint-10.4.0
dependabot/npm_and_yarn/main/npmcli/eslint-config-7.0.0
dependabot/npm_and_yarn/main/proc-log-7.0.0
dependabot/npm_and_yarn/npm_and_yarn-826852524d
dependabot/npm_and_yarn/npm_and_yarn-ab9a7f4bc2
deprecate-totp-2fa
dhei/classic-tokens
gat-bypass-2fa-docs
jpg619/fix-accessibility-content-flow
jpg619/version-bump-tar-2
kartykp/gat-bypass-2fa-docs
kartykp/upgrade-path-to-regex
main
maitxn/version-bump-tar
patch-1
reggi/cache-based-on-version
reggi/dev-engines
reggi/fix-transform-prettier
reggi/overrides
update-search-sensitivity
| 1 | --- |
| 2 | title: shrinkwrap.json |
| 3 | section: 5 |
| 4 | description: A publishable lockfile |
| 5 | github_repo: npm/cli |
| 6 | github_branch: release/v6 |
| 7 | github_path: docs/content/configuring-npm/shrinkwrap-json.md |
| 8 | redirect_from: |
| 9 | - /cli-documentation/v6/configuring-npm/shrinkwrap-json |
| 10 | - /cli-documentation/v6/configuring-npm/shrinkwrap.json |
| 11 | - /cli-documentation/v6/files/shrinkwrap-json |
| 12 | - /cli-documentation/v6/files/shrinkwrap.json |
| 13 | - /cli/v6/configuring-npm/shrinkwrap.json |
| 14 | - /cli/v6/files/shrinkwrap-json |
| 15 | - /cli/v6/files/shrinkwrap.json |
| 16 | --- |
| 17 | |
| 18 | ### Description |
| 19 | |
| 20 | `npm-shrinkwrap.json` is a file created by [`npm shrinkwrap`](/cli/v6/commands/npm-shrinkwrap). It is identical to `package-lock.json`, with one major caveat: Unlike `package-lock.json`, `npm-shrinkwrap.json` may be included when publishing a package. |
| 21 | |
| 22 | The recommended use-case for `npm-shrinkwrap.json` is applications deployed through the publishing process on the registry: for example, daemons and command-line tools intended as global installs or `devDependencies`. It's strongly discouraged for library authors to publish this file, since that would prevent end users from having control over transitive dependency updates. |
| 23 | |
| 24 | Additionally, if both `package-lock.json` and `npm-shrinkwrap.json` are present in a package root, `package-lock.json` will be ignored in favor of this file. |
| 25 | |
| 26 | For full details and description of the `npm-shrinkwrap.json` file format, refer to the manual page for [package-lock.json](/cli/v6/configuring-npm/package-lock-json). |
| 27 | |
| 28 | ### See also |
| 29 | |
| 30 | - [npm shrinkwrap](/cli/v6/commands/npm-shrinkwrap) |
| 31 | - [package-lock.json](/cli/v6/configuring-npm/package-lock-json) |
| 32 | - [package.json](/cli/v6/configuring-npm/package-json) |
| 33 | - [npm install](/cli/v6/commands/npm-install) |