Skip to content

Commit

Permalink
Add final newline to package-lock.json
Browse files Browse the repository at this point in the history
This aligns the output with what npm outputs. Without this change,
Next.js causes unwanted changes in package-lock.json.
  • Loading branch information
remcohaszing committed May 10, 2022
1 parent 342331e commit 8a9cb68
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/next/lib/patch-incorrect-lockfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 8a9cb68

Please sign in to comment.