mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
In JavaScript sources, ReadableStream, ReadableStreamDefaultReader, ReadableStreamDefaultController, CountQueuingStrategy and ByteLengthQueuingStrategy (globals and node:stream/web exports) are class values over a new runtime unit, scr_webstreams.c, which follows Node 24's webstreams step by step: underlying sources, queuing strategies, default readers, tee, ReadableStream.from and async iteration settle their promises in Node's order. scr_dyn_handle_class.c gives a dyn handle tag a constructor value with a prototype, brand checks and Node's constructor errors. Stream state carries cycle headers, so the collector reclaims streams whose callbacks close over their controllers. Promise steps run as native promise reactions, a variant of scr_async.c that only programs with web streams link; every other program links the default object. TypeScript sources keep their static web stream lowerings. Byte streams, BYOB readers, pipeTo and pipeThrough throw SC2020. node24-web-stream-readers and node24-web-stream-readable-lifecycle now match Node.