| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 | .TH "PACKAGE\-LOCK\.JSON" "5" "August 2021" "" "".SH "NAME"\fBpackage-lock.json\fR \- A manifestation of the manifest.SS Description.P\fBpackage\-lock\.json\fP is automatically generated for any operations where npmmodifies either the \fBnode_modules\fP tree, or \fBpackage\.json\fP\|\. It describes theexact tree that was generated, such that subsequent installs are able togenerate identical trees, regardless of intermediate dependency updates\..PThis file is intended to be committed into source repositories, and servesvarious purposes:.RS 0.IP \(bu 2Describe a single representation of a dependency tree such that teammates, deployments, and continuous integration are guaranteed to install exactly the same dependencies\..IP \(bu 2Provide a facility for users to "time\-travel" to previous states of \fBnode_modules\fP without having to commit the directory itself\..IP \(bu 2To facilitate greater visibility of tree changes through readable source control diffs\..IP \(bu 2And optimize the installation process by allowing npm to skip repeated metadata resolutions for previously\-installed packages\..RE.POne key detail about \fBpackage\-lock\.json\fP is that it cannot be published, and itwill be ignored if found in any place other than the toplevel package\. It sharesa format with npm help npm\-shrinkwrap\.json, which is essentially the same file, butallows publication\. This is not recommended unless deploying a CLI tool orotherwise using the publication process for producing production packages\..PIf both \fBpackage\-lock\.json\fP and \fBnpm\-shrinkwrap\.json\fP are present in the root ofa package, \fBpackage\-lock\.json\fP will be completely ignored\..SS File Format.SS name.PThe name of the package this is a package\-lock for\. This must match what's in\fBpackage\.json\fP\|\..SS version.PThe version of the package this is a package\-lock for\. This must match what's in\fBpackage\.json\fP\|\..SS lockfileVersion.PAn integer version, starting at \fB1\fP with the version number of this documentwhose semantics were used when generating this \fBpackage\-lock\.json\fP\|\..SS packageIntegrity.PThis is a subresourceintegrity \fIhttps://w3c\.github\.io/webappsec/specs/subresourceintegrity/\fR valuecreated from the \fBpackage\.json\fP\|\. No preprocessing of the \fBpackage\.json\fP shouldbe done\. Subresource integrity strings can be produced by modules like\fBssri\fP \fIhttps://www\.npmjs\.com/package/ssri\fR\|\..SS preserveSymlinks.PIndicates that the install was done with the environment variable\fBNODE_PRESERVE_SYMLINKS\fP enabled\. The installer should insist that the value ofthis property match that environment variable\..SS dependencies.PA mapping of package name to dependency object\.  Dependency objects have thefollowing properties:.SS version.PThis is a specifier that uniquely identifies this package and should beusable in fetching a new copy of it\..RS 0.IP \(bu 2bundled dependencies: Regardless of source, this is a version number that is purely for informational purposes\..IP \(bu 2registry sources: This is a version number\. (eg, \fB1\.2\.3\fP).IP \(bu 2git sources: This is a git specifier with resolved committish\. (eg, \fBgit+https://example\.com/foo/bar#115311855adb0789a0466714ed48a1499ffea97e\fP).IP \(bu 2http tarball sources: This is the URL of the tarball\. (eg, \fBhttps://example\.com/example\-1\.3\.0\.tgz\fP).IP \(bu 2local tarball sources: This is the file URL of the tarball\. (eg \fBfile:///opt/storage/example\-1\.3\.0\.tgz\fP).IP \(bu 2local link sources: This is the file URL of the link\. (eg \fBfile:libs/our\-module\fP).RE.SS integrity.PThis is a Standard SubresourceIntegrity \fIhttps://w3c\.github\.io/webappsec/specs/subresourceintegrity/\fR for thisresource\..RS 0.IP \(bu 2For bundled dependencies this is not included, regardless of source\..IP \(bu 2For registry sources, this is the \fBintegrity\fP that the registry provided, or if one wasn't provided the SHA1 in \fBshasum\fP\|\..IP \(bu 2For git sources this is the specific commit hash we cloned from\..IP \(bu 2For remote tarball sources this is an integrity based on a SHA512 ofthe file\..IP \(bu 2For local tarball sources: This is an integrity field based on the SHA512 of the file\..RE.SS resolved.RS 0.IP \(bu 2For bundled dependencies this is not included, regardless of source\..IP \(bu 2For registry sources this is path of the tarball relative to the registryURL\.  If the tarball URL isn't on the same server as the registry URL thenthis is a complete URL\..RE.SS bundled.PIf true, this is the bundled dependency and will be installed by the parentmodule\.  When installing, this module will be extracted from the parentmodule during the extract phase, not installed as a separate dependency\..SS dev.PIf true then this dependency is either a development dependency ONLY of thetop level module or a transitive dependency of one\.  This is false fordependencies that are both a development dependency of the top level and atransitive dependency of a non\-development dependency of the top level\..SS optional.PIf true then this dependency is either an optional dependency ONLY of thetop level module or a transitive dependency of one\.  This is false fordependencies that are both an optional dependency of the top level and atransitive dependency of a non\-optional dependency of the top level\..PAll optional dependencies should be included even if they're uninstallableon the current platform\..SS requires.PThis is a mapping of module name to version\.  This is a list of everythingthis module requires, regardless of where it will be installed\.  The versionshould match via normal matching rules a dependency either in our\fBdependencies\fP or in a level higher than us\..SS dependencies.PThe dependencies of this dependency, exactly as at the top level\..SS See also.RS 0.IP \(bu 2npm help shrinkwrap.IP \(bu 2npm help shrinkwrap\.json.IP \(bu 2npm help package\-locks.IP \(bu 2npm help package\.json.IP \(bu 2npm help install.RE
 |