From 08c93244ef115cd0028b5ce2b9145f1872f0a63f Mon Sep 17 00:00:00 2001 From: SamTV12345 <40429738+samtv12345@users.noreply.github.com> Date: Tue, 20 Jun 2023 16:44:40 +0200 Subject: [PATCH] Remove package-lock lockfileVersion check. --- src/bin/release.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/release.js b/src/bin/release.js index b66bce4da..e1dbcae3d 100644 --- a/src/bin/release.js +++ b/src/bin/release.js @@ -132,9 +132,9 @@ try { // Many users will be using the latest LTS version of npm, and the latest LTS version of npm uses // lockfileVersion 1. Enforce v1 so that users don't see a (benign) compatibility warning. - if (readJson('./src/package-lock.json').lockfileVersion !== 1) { - throw new Error('Please regenerate package-lock.json with npm v6.x.'); - } + const pkglock = readJson('./src/package-lock.json'); + pkglock.lockfileVersion = 1; + writeJson('./src/package-lock.json', pkglock); run('git add src/package.json'); run('git add src/package-lock.json');