Version
26.1.0
Platform
Subsystem
stream
What steps will reproduce the bug?
import{pipeTo,push,text}from"node:stream/iter";constenc=newTextEncoder();asyncfunctionrepro(source){const{ writer, readable }=push({highWaterMark: 1,backpressure: "block",});constpiping=pipeTo(source(),writer);// Let pipeTo() fill the PushWriter queue before the reader drains it.awaitnewPromise(setImmediate);constoutput=awaittext(readable);awaitpiping;returnoutput;}asyncfunction*writevSource(){yield[enc.encode("ab")];yield[enc.encode("c"),enc.encode("d")];}asyncfunction*writeSource(){yield[enc.encode("a")];yield[enc.encode("b")];}console.log(awaitrepro(writevSource));// actual: abcdcd, expected: abcdconsole.log(awaitrepro(writeSource));// actual: abbb, expected: abRun with
node --experimental-stream-iter repro.js
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
What do you see instead?
Additional information
No response
Version
26.1.0
Platform
Subsystem
stream
What steps will reproduce the bug?
Run with
node --experimental-stream-iter repro.jsHow often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
What do you see instead?
Additional information
No response