mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-07 08:33:50 +08:00
setEncoding() converted the buffered entries once, but Readable.from's lazy reader, the operators and compose added later object-mode entries in the kind they arrived in, so a Buffer entry could be read as a string. Every insertion now passes the entry's kind: Buffer entries decode through the stream's decoder, entries that would mix strings and Buffers are refused, and the buffer insert checks the kind. setEncoding() on an ended stream also flushes the decoder's partial tail, as in Node 24.