From bc192665d7828cf5eea9ba6245053ab7903098a7 Mon Sep 17 00:00:00 2001 From: Mads Jon Nielsen <madsjon@gmail.com> Date: Thu, 3 Aug 2023 13:58:50 +0200 Subject: [PATCH] fix(npm): package-lock.json v3 root project out of sync with package.json (#23495) Co-authored-by: Rhys Arkins <rhys@arkins.net> --- lib/modules/manager/npm/post-update/npm.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/modules/manager/npm/post-update/npm.ts b/lib/modules/manager/npm/post-update/npm.ts index aff424ee92..d2587236de 100644 --- a/lib/modules/manager/npm/post-update/npm.ts +++ b/lib/modules/manager/npm/post-update/npm.ts @@ -174,7 +174,10 @@ export async function generateLockFile( // because npm install was called with an explicit version for rangeStrategy=update-lockfile if (lockUpdates.length) { const { detectedIndent, lockFileParsed } = parseLockFile(lockFile); - if (lockFileParsed?.lockfileVersion === 2) { + if ( + lockFileParsed?.lockfileVersion === 2 || + lockFileParsed?.lockfileVersion === 3 + ) { lockUpdates.forEach((lockUpdate) => { const depType = lockUpdate.depType as | 'dependencies' -- GitLab