From dd7912745ce17fa391d6d3a4da55e8e9011179b8 Mon Sep 17 00:00:00 2001 From: "Sebastian \"Sebbie\" Silbermann" Date: Fri, 10 Jan 2025 17:51:03 +0100 Subject: [PATCH] Write errors.json fully formatted (#74753) --- packages/next/check-error-codes.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/next/check-error-codes.js b/packages/next/check-error-codes.js index fe463757ad354..59537d74e5c4e 100644 --- a/packages/next/check-error-codes.js +++ b/packages/next/check-error-codes.js @@ -1,3 +1,4 @@ +const os = require('os') const path = require('path') const fs = require('fs/promises') @@ -56,7 +57,9 @@ async function main() { // Write updated errors and cleanup await fs.writeFile( path.join(__dirname, 'errors.json'), - JSON.stringify(existingErrors, null, 2) + JSON.stringify(existingErrors, null, 2) + + // Formatters would add these anyway + os.EOL ) await fs.rm(errorsDir, { recursive: true, force: true })