Skip to content

Commit a367f9b

Browse files
Max Blackowlstronaut
authored andcommitted
docs(package-lock-json): clarify that version field may be omitted for certain dependencies
1 parent 35e8d38 commit a367f9b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/lib/content/configuring-npm/package-lock-json.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ Dependency objects have the following fields:
149149
* local link sources: This is the file URL of the link.
150150
(eg `file:libs/our-module`)
151151

152+
**Note:** The `version` field may be omitted for certain types of dependencies, such as optional peer dependencies that are not installed. In these cases, only metadata fields like `dev`, `optional`, and `peer` will be present.
153+
152154
* integrity: A `sha512` or `sha1` [Standard Subresource Integrity](https://w3c.github.io/webappsec/specs/subresourceintegrity/) string for the artifact that was unpacked in this location.
153155
For git dependencies, this is the commit sha.
154156

0 commit comments

Comments
 (0)