diff --git a/src/napi/napi.zig b/src/napi/napi.zig index de8beab2b4..06c96280d8 100644 --- a/src/napi/napi.zig +++ b/src/napi/napi.zig @@ -1683,6 +1683,7 @@ pub const ThreadSafeFunction = struct { .env = this.env, .fun = fun, .data = this.finalizer_data, + .hint = this.ctx, }; finalizer.enqueue(); } else { diff --git a/test/js/bun/test/parallel/test-integration-rspack.ts b/test/js/bun/test/parallel/test-integration-rspack.ts new file mode 100644 index 0000000000..7ee282c65d --- /dev/null +++ b/test/js/bun/test/parallel/test-integration-rspack.ts @@ -0,0 +1,39 @@ +import { expect } from "bun:test"; +import { bunEnv, bunExe, tmpdirSync } from "harness"; +import { join } from "path"; + +const cwd = tmpdirSync(); +console.log([0, cwd]); + +let proc = Bun.spawn({ + cmd: [bunExe(), "create", "rsbuild@latest", "app", "--template", "solid-ts"], + stdio: ["ignore", "inherit", "inherit"], + cwd, + env: bunEnv, +}); +await proc.exited; +console.log([1]); +expect(proc.signalCode).toBeNull(); +expect(proc.exitCode).toBe(0); + +proc = Bun.spawn({ + cmd: [bunExe(), "install"], + stdio: ["ignore", "inherit", "inherit"], + cwd: join(cwd, "app"), + env: bunEnv, +}); +await proc.exited; +console.log([2]); +expect(proc.signalCode).toBeNull(); +expect(proc.exitCode).toBe(0); + +proc = Bun.spawn({ + cmd: [bunExe(), "--bun", "run", "build"], + stdio: ["ignore", "inherit", "inherit"], + cwd: join(cwd, "app"), + env: bunEnv, +}); +await proc.exited; +console.log([3]); +expect(proc.signalCode).toBeNull(); +expect(proc.exitCode).toBe(0); diff --git a/test/no-validate-exceptions.txt b/test/no-validate-exceptions.txt index c3b05f5a11..7ca32272e1 100644 --- a/test/no-validate-exceptions.txt +++ b/test/no-validate-exceptions.txt @@ -54,6 +54,7 @@ test/bundler/bundler_comments.test.ts test/js/node/test/parallel/test-fs-promises-file-handle-readLines.mjs test/js/bun/test/parallel/test-require-builtins.ts test/cli/install/bun-install-lifecycle-scripts.test.ts +test/js/bun/test/parallel/test-integration-rspack.ts # trips asan on my macos test machine test/js/node/test/parallel/test-fs-watch.js diff --git a/test/no-validate-leaksan.txt b/test/no-validate-leaksan.txt index 8fe4d3468b..aaca0b2f5d 100644 --- a/test/no-validate-leaksan.txt +++ b/test/no-validate-leaksan.txt @@ -391,6 +391,7 @@ test/napi/node-napi-tests/test/js-native-api/6_object_wrap/do.test.ts test/bake/dev/production.test.ts test/js/third_party/pg-gateway/pglite.test.ts +test/js/bun/test/parallel/test-integration-rspack.ts test/js/web/websocket/websocket-subprotocol-strict.test.ts test/js/node/net/node-net-server.test.ts @@ -427,4 +428,4 @@ test/js/bun/test/parallel/test-http-should-not-accept-untrusted-certificates.ts # Need to run the event loop once more to ensure sockets close test/js/node/test/parallel/test-https-localaddress-bind-error.js -test/js/node/test/parallel/test-crypto-op-during-process-exit.js \ No newline at end of file +test/js/node/test/parallel/test-crypto-op-during-process-exit.js