From c7bb7a6e698cbc22d987fda3d2b53e42cc9de046 Mon Sep 17 00:00:00 2001 From: Max Black Date: Sat, 29 Nov 2025 17:17:18 -0800 Subject: [PATCH] docs: clarify version field can be omitted in package-lock --- docs/lib/content/configuring-npm/package-lock-json.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/lib/content/configuring-npm/package-lock-json.md b/docs/lib/content/configuring-npm/package-lock-json.md index 579dd49807812..403c1dab68bb8 100644 --- a/docs/lib/content/configuring-npm/package-lock-json.md +++ b/docs/lib/content/configuring-npm/package-lock-json.md @@ -130,6 +130,7 @@ npm v7 ignores this section entirely if a `packages` section is present, but doe Dependency objects have the following fields: * version: a specifier that varies depending on the nature of the package, and is usable in fetching a new copy of it. + Note that for peer dependencies that are not installed, or optional dependencies that are not installed, this field may be omitted. * bundled dependencies: Regardless of source, this is a version number that is purely for informational purposes. * registry sources: This is a version number.