ReviewOS

home-lang/home

Port esbuild transform and build child-process contracts

#218
Closed chris opened this 10 days ago ·
10 days ago

Context

The sequential Bun corpus frontier is js/third_party/esbuild/esbuild-child_process.test.ts at position 3960/4708, following completed es-module-lexer work in #217. This contributes to #66.

Current gap

The copied test starts a detached child that exercises esbuild transform, transformSync, build, and buildSync with both ordinary and one-million-character JavaScript sources. The child currently exits 1.

Acceptance criteria

  • esbuild named imports resolve in the child entrypoint.
  • Async/sync transform normalize the copied JavaScript and preserve large sources byte-for-byte apart from the trailing newline.
  • Async/sync stdin build return outputFiles with matching text and write:false behavior.
  • Detached inherited-stdio spawn lifecycle returns exit code 0 after all operations complete.
  • Transform/build failures include operation and source context.
  • The copied test passes and is pinned in the permanent third-party gate.
10 days ago

Completed on main in a8c3a13.

The esbuild shim now provides async/sync transform and stdin build APIs, JavaScript quote/semicolon normalization, exact trailing-newline behavior, outputFiles contents/text with write:false, million-character source preservation, and structured operation/source diagnostics. The detached inherited-stdio child validates every copied ordinary and large operation before returning exit code 0. The copied test passes 1/1 and is pinned permanently.

Verification: focused position 3960 reports files=1, passed=1, failed=0, todo=0, unsupported=0, allowed-empty=0; all permanent gates pass.

Sign in to comment on this issue.