From fc21f6386c88ecfde6620371b9fef1eeab943377 Mon Sep 17 00:00:00 2001 From: Max Black Date: Sat, 29 Nov 2025 18:01:44 -0800 Subject: [PATCH] docs(package-lock-json): clarify that version field may be omitted for certain dependencies --- docs/lib/content/configuring-npm/package-lock-json.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/lib/content/configuring-npm/package-lock-json.md b/docs/lib/content/configuring-npm/package-lock-json.md index 813db23fd370b..b221b5439156e 100644 --- a/docs/lib/content/configuring-npm/package-lock-json.md +++ b/docs/lib/content/configuring-npm/package-lock-json.md @@ -149,6 +149,8 @@ Dependency objects have the following fields: * local link sources: This is the file URL of the link. (eg `file:libs/our-module`) + **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. + * 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. For git dependencies, this is the commit sha.