Skip to content

Commit 3988356

Browse files
JPeer264claude
andcommitted
fixup! test(bun, deno): Run shared Node integration suites on Bun and Deno
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 86595ca commit 3988356

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎dev-packages/bun-integration-tests/node-suites/alias-sentry-bun.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ const NODE_SUITE_FILE = /[\\/]node-integration-tests[\\/](suites|utils)[\\/]/;
77

88
// Bun's runtime `onResolve` does not see bare package specifiers, so ES modules are rewritten on
99
// load. `onLoad` output for a CommonJS file does not run, so those files keep their source.
10-
const NODE_SUITE_ESM_FILE = /[\\/]node-integration-tests[\\/](suites|utils)[\\/](?!\bnode_modules\b).*\.(mjs|ts)$/;
10+
// Dependencies in `node_modules` are skipped: Bun treats a module returned from `onLoad` as async,
11+
// and a CommonJS `require()` of it then fails.
12+
const NODE_SUITE_ESM_FILE =
13+
/[\\/]node-integration-tests[\\/](suites|utils)[\\/](?!(?:.*[\\/])?node_modules[\\/]).*\.(mjs|ts)$/;
1114
const SENTRY_NODE_SPECIFIER = /(['"])@sentry\/node\1/g;
1215

1316
plugin({

0 commit comments

Comments
 (0)