From 6dcd16657ece1c2bc1956da9f7b8dcf9dd8cb036 Mon Sep 17 00:00:00 2001 From: Claude Bot Date: Sun, 18 Jan 2026 09:55:29 +0000 Subject: [PATCH] Address code review feedback for virtual mode - Change bundleWarnings check from key length check to truthy check - Add missing unsupported options: keepNames, emitDCEAnnotations, ignoreDCEAnnotations, bytecode, compile - Pass define, drop, conditions to Bun.build since they are supported - Fix readFile to use 'in' operator instead of truthy check (handles empty string outputs correctly) Co-Authored-By: Claude Opus 4.5 --- test/bundler/expectBundled.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/bundler/expectBundled.ts b/test/bundler/expectBundled.ts index 1a39adfbcc..3f0f4fccaf 100644 --- a/test/bundler/expectBundled.ts +++ b/test/bundler/expectBundled.ts @@ -600,7 +600,12 @@ function expectBundled( if (snapshotSourceMap) unsupportedOptions.push("snapshotSourceMap"); if (expectExactFilesize) unsupportedOptions.push("expectExactFilesize"); if (onAfterApiBundle) unsupportedOptions.push("onAfterApiBundle"); - if (bundleWarnings && Object.keys(bundleWarnings).length > 0) unsupportedOptions.push("bundleWarnings"); + if (bundleWarnings) unsupportedOptions.push("bundleWarnings"); + if (keepNames) unsupportedOptions.push("keepNames"); + if (emitDCEAnnotations) unsupportedOptions.push("emitDCEAnnotations"); + if (ignoreDCEAnnotations) unsupportedOptions.push("ignoreDCEAnnotations"); + if (bytecode) unsupportedOptions.push("bytecode"); + if (compile) unsupportedOptions.push("compile"); if (outdir) unsupportedOptions.push("outdir (use outfile instead)"); if (unsupportedOptions.length > 0) { @@ -648,6 +653,9 @@ function expectBundled( development: jsx.development, } : undefined, + define, + drop, + conditions, }); if (!build.success) { @@ -696,7 +704,7 @@ function expectBundled( if (!normalizedFile.startsWith("/")) normalizedFile = "/" + normalizedFile; // Try exact match first - if (outputCache[normalizedFile]) return outputCache[normalizedFile]; + if (normalizedFile in outputCache) return outputCache[normalizedFile]; // For single-output builds, allow accessing the output by the configured outfile path const outputs = Object.keys(outputCache);