See #143 (comment)
We should add subprocess.readableStream(), subprocess.writableStream() and subprocess.transformStream(). Those behave like subprocess.readable(), subprocess.writable() and subprocess.duplex() (see #912) but return web streams instead of Node.js streams.
One approach would be to use Readable.toWeb(subprocess.readable()), Writable.toWeb(subprocess.writable()) and Duplex.toWeb(subprocess.duplex()).
Another approach would be to re-implement this from scratch, i.e. call new ReadableStream(...) and so on.
Regardless, this should be tested thoroughly, just like the Node.js streams methods.
(Note to implementer: we need to remember to make it work on early errors too (see https://github.com/sindresorhus/execa/blob/main/lib/return/early-error.js).)
See #143 (comment)
We should add
subprocess.readableStream(),subprocess.writableStream()andsubprocess.transformStream(). Those behave likesubprocess.readable(),subprocess.writable()andsubprocess.duplex()(see #912) but return web streams instead of Node.js streams.One approach would be to use
Readable.toWeb(subprocess.readable()),Writable.toWeb(subprocess.writable())andDuplex.toWeb(subprocess.duplex()).Another approach would be to re-implement this from scratch, i.e. call
new ReadableStream(...)and so on.Regardless, this should be tested thoroughly, just like the Node.js streams methods.
(Note to implementer: we need to remember to make it work on early errors too (see https://github.com/sindresorhus/execa/blob/main/lib/return/early-error.js).)