ReviewOS

home-lang/home

Bun parity: port blob URL TypeScript module imports and source-mapped stacks

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

Upstream gap

The copied Bun corpus currently stops at position 4112 (js/web/fetch/blob.test.ts) because importing a live blob: URL deliberately throws a parser placeholder instead of loading the Blob as a module.

Required parity

  • Resolve live object URLs through the shared Blob registry and reject revoked/unknown URLs.
  • Decode Blob bytes and use Home’s production Bun.Transpiler bridge for TypeScript/JavaScript.
  • Evaluate named/default exports as a module namespace and preserve object-URL revocation behavior.
  • Preserve the original TypeScript source in Bun.inspect(new Error()) output, including the typed function declaration.
  • Surface structured ERR_BLOB_MODULE failures with operation, phase, blob URL, causal chain, and composed stack.
  • Add focused regression coverage and pass the complete upstream file plus the surrounding corpus queue.

Tracked under #66.

10 days ago

Completed in add6ef2.\n\nBlob URL imports now use the Home runner's Bun.Transpiler path for TypeScript syntax, build module-like frozen namespaces (including named/default exports and Symbol.toStringTag), re-check revocation on every import, and preserve source-aware structured failures through ERR_BLOB_MODULE with operation/phase/blobURL/cause/composed stack metadata.\n\nVerified by the focused TypeScript Blob module regression and the exact js/web/fetch/blob.test.ts corpus run (26 passing, 0 failed/unsupported).

Sign in to comment on this issue.