From a172c771f7cee8987d38c63a213b9d4e278c3fd8 Mon Sep 17 00:00:00 2001 From: Tuukka Hastrup Date: Tue, 21 Feb 2023 17:54:00 +0200 Subject: [PATCH 1/2] docs: npm v9 creates package-lock.json v3 --- docs/lib/content/configuring-npm/package-lock-json.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/lib/content/configuring-npm/package-lock-json.md b/docs/lib/content/configuring-npm/package-lock-json.md index 4aa8dc375c89f..e7e0187c9b3da 100644 --- a/docs/lib/content/configuring-npm/package-lock-json.md +++ b/docs/lib/content/configuring-npm/package-lock-json.md @@ -114,10 +114,10 @@ the npm registry. Lockfiles generated by npm v7 will contain * `1`: The lockfile version used by npm v5 and v6. * `2`: The lockfile version used by npm v7, which is backwards compatible to v1 lockfiles. -* `3`: The lockfile version used by npm v7, _without_ backwards - compatibility affordances. This is used for the hidden lockfile at - `node_modules/.package-lock.json`, and will likely be used in a future - version of npm, once support for npm v6 is no longer relevant. +* `3`: The lockfile version supported by npm v7, _without_ backwards + compatibility to npm v6. This is used for the hidden lockfile at + `node_modules/.package-lock.json`. This is also used for + `package-lock.json` whenever npm v9 creates a new one. npm will always attempt to get whatever data it can out of a lockfile, even if it is not a version that it was designed to support. From 1dae4f6b3e0efa10b83daa7d735983dfd1838ac5 Mon Sep 17 00:00:00 2001 From: Tuukka Hastrup Date: Mon, 27 Feb 2023 18:04:02 +0200 Subject: [PATCH 2/2] docs: Describe lockfile compatibility more simply --- docs/lib/content/configuring-npm/package-lock-json.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/docs/lib/content/configuring-npm/package-lock-json.md b/docs/lib/content/configuring-npm/package-lock-json.md index e7e0187c9b3da..37dc59f3260aa 100644 --- a/docs/lib/content/configuring-npm/package-lock-json.md +++ b/docs/lib/content/configuring-npm/package-lock-json.md @@ -112,12 +112,9 @@ the npm registry. Lockfiles generated by npm v7 will contain * No version provided: an "ancient" shrinkwrap file from a version of npm prior to npm v5. * `1`: The lockfile version used by npm v5 and v6. -* `2`: The lockfile version used by npm v7, which is backwards compatible - to v1 lockfiles. -* `3`: The lockfile version supported by npm v7, _without_ backwards - compatibility to npm v6. This is used for the hidden lockfile at - `node_modules/.package-lock.json`. This is also used for - `package-lock.json` whenever npm v9 creates a new one. +* `2`: The lockfile version used by npm v7 and v8. Backwards compatible to v1 + lockfiles. +* `3`: The lockfile version used by npm v9. Backwards compatible to npm v7. npm will always attempt to get whatever data it can out of a lockfile, even if it is not a version that it was designed to support.