-
Notifications
You must be signed in to change notification settings - Fork 27.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve next.config.js validation for
images
prop (#46326)
This PR removes the custom validation in favor of json schema validation. Previously Next.js would print warnings on schema errors and only throw when custom validation failed (albeit with a nasty stack trace). ### Before <img width="1193" alt="image" src="https://user-images.githubusercontent.com/229881/221045942-b035092b-1236-4da6-b676-58e3adae030d.png"> ### After <img width="794" alt="image" src="https://user-images.githubusercontent.com/229881/221046100-fc0041b3-8fa8-4938-bd99-d0e3d3c0fae6.png"> ---------
- Loading branch information
Showing
4 changed files
with
142 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { traceGlobals } from '../trace/shared' | ||
|
||
export async function flushAndExit(code: number) { | ||
let telemetry = traceGlobals.get('telemetry') as | ||
| InstanceType<typeof import('./storage').Telemetry> | ||
| undefined | ||
if (telemetry) { | ||
await telemetry.flush() | ||
} | ||
process.exit(code) | ||
} |
Oops, something went wrong.