Files
Nicolas Le Cam 1173de0686 fix(js): correct bun and deno runtime behavior
Failure detection, so a green run is never reported red:

- a failure marker vouches for the block it closes, so a frameless failure
  such as a timeout keeps the line that says why it failed
- bun's marker and run footer are matched with the duration and test count
  they carry, since a test is free to log a line that starts the same way
- deno's FAILURES entries are matched by shape, because a bare " => " also
  occurs in arrow functions and assertion messages
- deno fences output it did not write, and names the fence for when it was
  printed, so the rule is matched by shape and gates both the failures list
  and the block engine

Diagnostics that were reaching nobody:

- deno's type-check errors are kept with the frame under them: they open no
  block and carry no section, so a type error left the caller with a bare
  "Type checking failed."
- bun's frames are kept, since two failing tests that share a name, and a
  module error that has no marker at all, cannot otherwise be located

Runs whose output rtk must not touch:

- watch mode on every filtered entry point goes through unfiltered, since the
  runners buffer the whole stream until a child that never exits
- a deno reporter the user named is left alone, because --reporter=junit and
  --junit-path write the report to stdout
- bun build and deno compile run unfiltered: without an output flag the bundle
  is stdout, with one the emitted-file summary is the point of the run, and on
  failure the diagnostics are, none of which an errors-only filter keeps

Tool resolution:

- a package runner the user named wins over lockfile detection, and over a
  tool that merely happens to be on PATH
- lockfile detection never resolves through bunx, which always fetches a
  missing tool and cannot be told not to
- a tool rtk may fetch resolves through npx, the only runner that can

Input and output:

- bunx forwards the caller's stdin when it is a pipe, since the filtered path
  buffers output and an inherited terminal would let a prompt wait invisibly
- strip the resolution lines bun actually prints when piped, count the tree
  levels drawn with a leading pipe, and stop injecting --json into a command
  the user typed
- the lint label records the arguments once, and the shell runners' placeholder
  tool name stays out of their verbose line

Fixtures are real bun 1.2.20 and deno 2.9.6 captures for each case.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-03 02:16:01 +02:00
..