diff --git a/scripts/runner.node.mjs b/scripts/runner.node.mjs index a681c27baa..aa514ba8d1 100755 --- a/scripts/runner.node.mjs +++ b/scripts/runner.node.mjs @@ -270,6 +270,7 @@ const skipArray = (() => { } return readFileSync(path, "utf-8") .split("\n") + .map(line => line.trim()) .filter(line => !line.startsWith("#") && line.length > 0); })(); @@ -478,7 +479,7 @@ async function runTests() { console.log("run in", cwd); let exiting = false; - const server = spawn(execPath, ["run", "ci-remap-server", execPath, cwd, getCommit()], { + const server = spawn(execPath, ["run", "--silent", "ci-remap-server", execPath, cwd, getCommit()], { stdio: ["ignore", "pipe", "inherit"], cwd, // run in main repo env: { ...process.env, BUN_DEBUG_QUIET_LOGS: "1", NO_COLOR: "1" }, @@ -488,18 +489,22 @@ async function runTests() { server.on("exit", (code, signal) => { if (!exiting && (code !== 0 || signal !== null)) errorResolve(signal ? signal : "code " + code); }); - process.on("exit", () => { + function onBeforeExit() { exiting = true; - server.kill(); - }); + server.off("error"); + server.off("exit"); + server.kill?.(); + } + process.once("beforeExit", onBeforeExit); const lines = createInterface(server.stdout); lines.on("line", line => { portResolve({ port: parseInt(line) }); }); - const result = await Promise.race([portPromise, errorPromise, setTimeoutPromise(5000, "timeout")]); - if (typeof result.port != "number") { - server.kill(); + const result = await Promise.race([portPromise, errorPromise.catch(e => e), setTimeoutPromise(5000, "timeout")]); + if (typeof result?.port != "number") { + process.off("beforeExit", onBeforeExit); + server.kill?.(); console.warn("ci-remap server did not start:", result); } else { console.log("crash reports parsed on port", result.port); diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp index 74d0769383..893e7cca85 100644 --- a/src/bun.js/bindings/ZigGlobalObject.cpp +++ b/src/bun.js/bindings/ZigGlobalObject.cpp @@ -187,7 +187,7 @@ #include "node/NodeTimers.h" #include "JSConnectionsList.h" #include "JSHTTPParser.h" - +#include #include "JSBunRequest.h" #include "ServerRouteList.h" diff --git a/test/no-validate-exceptions.txt b/test/no-validate-exceptions.txt index ff8bef01ed..de17bff358 100644 --- a/test/no-validate-exceptions.txt +++ b/test/no-validate-exceptions.txt @@ -254,27 +254,37 @@ test/js/third_party/resvg/bbox.test.js test/js/third_party/rollup-v4/rollup-v4.test.ts test/napi/uv.test.ts test/napi/uv_stub.test.ts -test/napi/node-napi-tests/test/node-api/test_fatal_exception/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_typedarray/do.test.ts -test/napi/node-napi-tests/test/node-api/test_async/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_symbol/do.test.ts -test/napi/node-napi-tests/test/node-api/1_hello_world/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_instance_data/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_object/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_number/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_new_target/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_constructor/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_handle_scope/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_conversions/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_dataview/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_array/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_date/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_bigint/do.test.ts -test/napi/node-napi-tests/test/js-native-api/test_cannot_run_js/do.test.ts +test/napi/node-napi-tests/test/js-native-api/2_function_arguments/do.test.ts test/napi/node-napi-tests/test/js-native-api/3_callbacks/do.test.ts test/napi/node-napi-tests/test/js-native-api/4_object_factory/do.test.ts test/napi/node-napi-tests/test/js-native-api/5_function_factory/do.test.ts -test/napi/node-napi-tests/test/js-native-api/2_function_arguments/do.test.ts +test/napi/node-napi-tests/test/js-native-api/6_object_wrap/do.test.ts +test/napi/node-napi-tests/test/js-native-api/7_factory_wrap/do.test.ts +test/napi/node-napi-tests/test/js-native-api/8_passing_wrapped/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_array/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_bigint/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_cannot_run_js/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_constructor/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_conversions/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_dataview/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_date/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_error/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_function/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_handle_scope/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_instance_data/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_new_target/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_number/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_object/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_promise/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_reference_double_free/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_symbol/do.test.ts +test/napi/node-napi-tests/test/js-native-api/test_typedarray/do.test.ts +test/napi/node-napi-tests/test/node-api/1_hello_world/do.test.ts +test/napi/node-napi-tests/test/node-api/test_async/do.test.ts +test/napi/node-napi-tests/test/node-api/test_cleanup_hook/do.test.ts +test/napi/node-napi-tests/test/node-api/test_exception/do.test.ts +test/napi/node-napi-tests/test/node-api/test_fatal_exception/do.test.ts +test/napi/node-napi-tests/test/node-api/test_worker_terminate_finalization/do.test.ts # normalizeCryptoAlgorithmParameters test/js/node/test/parallel/test-webcrypto-derivekey.js