From be97400d03c2849345820ea4fa0434e5a5eaf7cf Mon Sep 17 00:00:00 2001 From: Tomas Zijdemans Date: Mon, 28 Sep 2026 18:53:10 +0200 Subject: [PATCH] chore: run Bun tests with --tsconfig-override deno task test:bun copied the Bun config to ./tsconfig.json and removed it after the run. That overwrote any local tsconfig.json at the repo root, and a failing test skipped the rm and left the copy behind. Pass the config with --tsconfig-override instead, and make its paths relative to _tools/node_test_runner/ where it lives. --- .gitignore | 4 ++-- _tools/node_test_runner/tsconfig_for_bun.json | 22 +++++++++---------- deno.json | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.gitignore b/.gitignore index 2ab38f259819..1e10f88616c1 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,6 @@ _tmp/ *.sublime-project *.sublime-workspace -# tsconfig for bun +# local TypeScript config /tsconfig.json -.claude/ \ No newline at end of file +.claude/ diff --git a/_tools/node_test_runner/tsconfig_for_bun.json b/_tools/node_test_runner/tsconfig_for_bun.json index 8288466aa2ed..3f5dcde6eec3 100644 --- a/_tools/node_test_runner/tsconfig_for_bun.json +++ b/_tools/node_test_runner/tsconfig_for_bun.json @@ -1,17 +1,17 @@ { "compilerOptions": { "paths": { - "@std/assert": ["./assert/mod.ts"], - "@std/assert/greater-or-equal": ["./assert/greater_or_equal.ts"], - "@std/internal/build-message": ["./internal/build_message.ts"], - "@std/internal/diff": ["./internal/diff.ts"], - "@std/internal/diff-str": ["./internal/diff_str.ts"], - "@std/internal/format": ["./internal/format.ts"], - "@std/internal/os": ["./internal/os.ts"], - "@std/internal/styles": ["./internal/styles.ts"], - "@std/path": ["./path/mod.ts"], - "@std/semver": ["./semver/mod.ts"], - "@std/testing/types": ["./testing/types.ts"] + "@std/assert": ["../../assert/mod.ts"], + "@std/assert/greater-or-equal": ["../../assert/greater_or_equal.ts"], + "@std/internal/build-message": ["../../internal/build_message.ts"], + "@std/internal/diff": ["../../internal/diff.ts"], + "@std/internal/diff-str": ["../../internal/diff_str.ts"], + "@std/internal/format": ["../../internal/format.ts"], + "@std/internal/os": ["../../internal/os.ts"], + "@std/internal/styles": ["../../internal/styles.ts"], + "@std/path": ["../../path/mod.ts"], + "@std/semver": ["../../semver/mod.ts"], + "@std/testing/types": ["../../testing/types.ts"] } } } diff --git a/deno.json b/deno.json index 89e49f2003e3..90a87b6572a3 100644 --- a/deno.json +++ b/deno.json @@ -21,7 +21,7 @@ "test:tools": "deno test -A --doc _tools/", "test:browser": "git grep --name-only \"This module is browser compatible.\" | grep -v deno.json | grep -v .github/workflows | grep -v _tools | grep -v encoding/README.md | grep -v media_types/vendor/update.ts | xargs deno check --config browser-compat.tsconfig.json", "test:node": "(cd _tools/node_test_runner && npm install) && node --import ./_tools/node_test_runner/register_deno_shim.mjs ./_tools/node_test_runner/run_test.mjs", - "test:bun": "(cd _tools/node_test_runner && bun install) && cp _tools/node_test_runner/tsconfig_for_bun.json ./tsconfig.json && bun test --require ./_tools/node_test_runner/register_deno_shim.mjs _tools/node_test_runner/run_test.mjs && rm tsconfig.json", + "test:bun": "(cd _tools/node_test_runner && bun install) && bun test --tsconfig-override ./_tools/node_test_runner/tsconfig_for_bun.json --require ./_tools/node_test_runner/register_deno_shim.mjs _tools/node_test_runner/run_test.mjs", "lint:circular": "deno run --allow-env --allow-read --allow-write --allow-net=deno.land,jsr.io ./_tools/check_circular_package_dependencies.ts", "lint:mod-exports": "deno run --allow-env --allow-read ./_tools/check_mod_exports.ts", "lint:tools-types": "deno check _tools/*.ts",