From ab276993d1d4cc3882b2cec6ee3555f0dbbde8a6 Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Wed, 11 Feb 2026 01:08:42 +0000 Subject: [PATCH] fix(test): exclude non-deterministic Next.js 16 build artifacts from hash comparison Next.js 16 produces additional non-deterministic files (trace-build, lock, server-reference-manifest, build-manifest, pages-manifest) that differ between bun and node builds. Add these to the exclusion list and use force: true for rmSync to handle files that may only exist in one build. Co-Authored-By: Claude --- test/integration/next-pages/test/next-build.test.ts | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/integration/next-pages/test/next-build.test.ts b/test/integration/next-pages/test/next-build.test.ts index 2f9bd3735e..23f9cc55f7 100644 --- a/test/integration/next-pages/test/next-build.test.ts +++ b/test/integration/next-pages/test/next-build.test.ts @@ -183,8 +183,10 @@ test( const toRemove = [ // these have timestamps and absolute paths in them "trace", + "trace-build", "cache", "required-server-files.json", + "required-server-files.js", // these have "signing keys", not sure what they are tbh "prerender-manifest.json", // these are similar but i feel like there might be something we can fix to make them the same @@ -192,10 +194,17 @@ test( "next-server.js.nft.json", // this file is not deterministically sorted "server/pages-manifest.json", + "pages-manifest.json", + // non-deterministic between bun and node builds + "build-manifest.json", + "server-reference-manifest.json", + "server-reference-manifest.js", + // lock file created during build + "lock", ]; for (const key of toRemove) { - rmSync(join(bunBuildDir, key), { recursive: true }); - rmSync(join(nodeBuildDir, key), { recursive: true }); + rmSync(join(bunBuildDir, key), { recursive: true, force: true }); + rmSync(join(nodeBuildDir, key), { recursive: true, force: true }); } console.log("Hashing files...");