Skip to content

Commit

Permalink
Write errors.json fully formatted (#74753)
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon authored Jan 10, 2025
1 parent da3f782 commit dd79127
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/next/check-error-codes.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const os = require('os')
const path = require('path')
const fs = require('fs/promises')

Expand Down Expand Up @@ -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 })
Expand Down

0 comments on commit dd79127

Please sign in to comment.