From 8a9cb6886ea7487c112ba9ca8f2580db3148bd20 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Tue, 10 May 2022 18:21:21 +0200 Subject: [PATCH] Add final newline to package-lock.json This aligns the output with what npm outputs. Without this change, Next.js causes unwanted changes in package-lock.json. --- packages/next/lib/patch-incorrect-lockfile.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/next/lib/patch-incorrect-lockfile.ts b/packages/next/lib/patch-incorrect-lockfile.ts index 470e67e6e963..02026779bd73 100644 --- a/packages/next/lib/patch-incorrect-lockfile.ts +++ b/packages/next/lib/patch-incorrect-lockfile.ts @@ -87,7 +87,7 @@ export async function patchIncorrectLockfile(dir: string) { await promises.writeFile( lockfilePath, - JSON.stringify(lockfileParsed, null, 2) + `${JSON.stringify(lockfileParsed, null, 2)}\n` ) Log.warn( 'Lockfile was successfully patched, please run "npm install" to ensure @next/swc dependencies are downloaded'