\fBpackage-lock.json\fR\- A manifestation of the manifest
.SHDESCRIPTION
.P
\fBpackage\-lock\.json\fP is automatically generated for any operations where npm
modifies either the \fBnode_modules\fP tree, or \fBpackage\.json\fP\|\. It describes the
exact tree that was generated, such that subsequent installs are able to
generate identical trees, regardless of intermediate dependency updates\.
.P
This file is intended to be committed into source repositories, and serves
various purposes:
.RS0
.IP\(bu2
Describe a single representation of a dependency tree such that teammates, deployments, and continuous integration are guaranteed to install exactly the same dependencies\.
.IP\(bu2
Provide a facility for users to "time\-travel" to previous states of \fBnode_modules\fP without having to commit the directory itself\.
.IP\(bu2
To facilitate greater visibility of tree changes through readable source control diffs\.
.IP\(bu2
And optimize the installation process by allowing npm to skip repeated metadata resolutions for previously\-installed packages\.
.RE
.P
One key detail about \fBpackage\-lock\.json\fP is that it cannot be published, and it
will be ignored if found in any place other than the toplevel package\. It shares
a format with npm help 5 shrinkwrap\.json, which is essentially the same file, but
allows publication\. This is not recommended unless deploying a CLI tool or
otherwise using the publication process for producing production packages\.
.P
If both \fBpackage\-lock\.json\fP and \fBnpm\-shrinkwrap\.json\fP are present in the root of
a package, \fBpackage\-lock\.json\fP will be completely ignored\.
.SHFILEFORMAT
.SSname
.P
The name of the package this is a package\-lock for\. This must match what's in
\fBpackage\.json\fP\|\.
.SSversion
.P
The version of the package this is a package\-lock for\. This must match what's in
\fBpackage\.json\fP\|\.
.SSlockfileVersion
.P
An integer version, starting at \fB1\fP with the version number of this document
whose semantics were used when generating this \fBpackage\-lock\.json\fP\|\.
.SSpackageIntegrity
.P
This is a subresource
integrity \fIhttps://w3c\.github\.io/webappsec/specs/subresourceintegrity/\fR value