mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-10-27 06:43:19 +08:00
'new TransformStream()' had no lowering, so hono's stream() and streamSSE() helpers failed to compile their checked-dynamic paths. The constructor without arguments now builds a native handle: its readable side is a native ReadableStream with a zero high-water mark, and its writable side runs the streams spec's WritableStream state machine (getWriter, abort, close, locked; the writer's write, close, abort, releaseLock, ready, closed and desiredSize). A write completes when the readable side reads its chunk, close/abort/cancel propagate across the pair, and deferred reactions take as many microtask turns as in Node. Web ReadableStreams can also be weak collection keys (hono keys a WeakMap by the response stream). A transformer, queuing strategies and the WritableStream constructor keep the SC2020 refusal. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>