Unverified Commit 4b06e62d authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Sort next-server NFT json files (#79956)

For more deterministic build outputs (at least with Turbopack)
parent 9ff3f848
......@@ -506,12 +506,19 @@ export async function collectBuildTraces({
addToTracedFiles(root, relativeModulePath, minimalServerTracedFiles)
}
const serverTracedFilesSorted = Array.from(serverTracedFiles)
serverTracedFilesSorted.sort()
const minimalServerTracedFilesSorted = Array.from(
minimalServerTracedFiles
)
minimalServerTracedFilesSorted.sort()
await Promise.all([
fs.writeFile(
nextServerTraceOutput,
JSON.stringify({
version: 1,
files: Array.from(serverTracedFiles),
files: serverTracedFilesSorted,
} as {
version: number
files: string[]
......@@ -521,7 +528,7 @@ export async function collectBuildTraces({
nextMinimalTraceOutput,
JSON.stringify({
version: 1,
files: Array.from(minimalServerTracedFiles),
files: minimalServerTracedFilesSorted,
} as {
version: number
files: string[]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment