Skip to content

ci(js): add Bun and Deno to JS CI matrix with runtime-compat tests#889

Merged
chaliy merged 8 commits intomainfrom
claude/add-bun-ci-matrix-8vrAi
Mar 28, 2026
Merged

ci(js): add Bun and Deno to JS CI matrix with runtime-compat tests#889
chaliy merged 8 commits intomainfrom
claude/add-bun-ci-matrix-8vrAi

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Mar 27, 2026

Summary

  • Add Bun (latest, canary) and Deno (2.x, canary) to JS CI alongside Node (20, 22, 24, latest) — 8 total matrix entries
  • Create __test__/runtime-compat/ test suite using node:test + node:assert (no npm deps) that runs natively under all three runtimes
  • Split into 8 focused files: basics, builtins, control-flow, error-handling, filesystem, vfs, tool-metadata, security, scripts
  • Node runs both ava (full functional suite) and runtime-compat; Bun/Deno run runtime-compat + examples
  • Update specs/004-testing.md with runtime compat testing strategy and maintenance rules

Test plan

  • All 4 Node entries pass (ava + runtime-compat + examples)
  • Both Bun entries pass (runtime-compat + examples)
  • Both Deno entries pass (runtime-compat + examples)
  • Gate job (js-check) correctly blocks on any failure

chaliy added 6 commits March 28, 2026 01:11
Test Node bindings under Bun (latest + canary) alongside the existing
Node 20/22/24/latest matrix. Gate job now requires both runtimes green.
Replace separate build-and-test + bun-test jobs with one matrix using
runtime (node/bun) × version. Conditional steps handle runtime-specific
setup (setup-node vs setup-bun, npm test vs bun run test).
Add Deno 2.x and canary to the CI matrix. Refactor matrix to use `run`
and `pkg` variables per entry: Deno uses npm for install/build (napi-rs
needs Node) and `deno run -A` for executing examples.
'bun test' invokes Bun's built-in test runner instead of the package.json
script. 'bun run test' correctly delegates to ava.
Add runtime-compat.test.mjs using node:test + node:assert — runs
directly under Bun and Deno without ava dependency. Covers core
execution, variables, filesystem, pipes, VFS API, error handling,
control flow, all builtins, BashTool metadata, security/resource
limits, and instance isolation.

Node continues running the full ava suite; Bun/Deno run this file
directly with their respective runtimes plus examples.
…times

- Split monolithic runtime-compat.test.mjs into 8 focused files in
  __test__/runtime-compat/ (basics, builtins, control-flow, error-handling,
  filesystem, vfs, tool-metadata, security, scripts) plus shared _setup.mjs.
- Node now runs BOTH ava (full functional suite) AND runtime-compat tests.
- Bun/Deno run runtime-compat + examples.
- Update specs/004-testing.md with JS runtime compat testing strategy,
  CI matrix, maintenance rules, and local run instructions.
@chaliy chaliy force-pushed the claude/add-bun-ci-matrix-8vrAi branch from d8e2e47 to 4e895a8 Compare March 28, 2026 01:25
@chaliy chaliy changed the title ci(js): add Bun and Deno to JS CI matrix ci(js): add Bun and Deno to JS CI matrix with runtime-compat tests Mar 28, 2026
chaliy added 2 commits March 28, 2026 01:30
- Load wrapper.js instead of index.cjs in _setup.mjs so
  executeSyncOrThrow and BashError are available
- Use 'bun test' instead of 'bun <file>' for Bun (required for
  node:test describe/it APIs)
- Split export/unset into own test case for isolation
Unset of exported variables may behave differently. Match the ava
test's pattern: assign with X=123, then unset X.
@chaliy chaliy merged commit 834ac92 into main Mar 28, 2026
20 checks passed
@chaliy chaliy deleted the claude/add-bun-ci-matrix-8vrAi branch March 28, 2026 01:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant