Version
26.2.0
Platform
Subsystem
stream
What steps will reproduce the bug?
import{pipeTo}from'node:stream/iter';asyncfunction*source(){yield[newUint8Array([65]),newUint8Array([66])];}constchunks=[];constwriter={write(chunk){chunks.push(chunk);},writev(batch){chunks.push(...batch);// Synchronous success: returns undefined.},end(){},};try{constbytes=awaitpipeTo(source(),writer);console.log('resolved:',bytes,Buffer.concat(chunks).toString());}catch(err){console.log('rejected:',`${err.name}: ${err.message}`);}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?
rejected: TypeError: Method Promise.prototype.then called on incompatible receiver undefined
piping into a custom writer that supports batched writes fails even though the writer successfully accepts the data synchronously. The same kind of synchronous success works for single writes, so batched writev() writes should complete normally instead of rejecting with a TypeError.
Additional information
No response
Version
26.2.0
Platform
Subsystem
stream
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
resolved: 2 ABWhat do you see instead?
rejected: TypeError: Method Promise.prototype.then called on incompatible receiver undefinedpiping into a custom writer that supports batched writes fails even though the writer successfully accepts the data synchronously. The same kind of synchronous success works for single writes, so batched
writev()writes should complete normally instead of rejecting with aTypeError.Additional information
No response