-
-
Notifications
You must be signed in to change notification settings - Fork 217
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add stdin: ReadableStream
and stdout|stderr: WritableStream
options
#603
Comments
Definitely a feature I would leverage!
Is Stability: 1 - Experimental a concern? I haven't been using the Web Stream utils in production for that reason. Might be worth opening a request in Node.js to mark as stable. (At least that's the process I'm familiar with following along with the util.parseArgs stability) |
That's a very good point @aaronccasanova. My concern would be to end up re-implementing the same logic, but without all the tests and insight knowledge that James Snell has (see original PR in nodejs/node#39134). From checking the history, it seems rather stable. For reference, links to the code of We could also wait until those APIs become stable. What are your thoughts on this @sindresorhus? |
I think we should do it and use the built-in APIs, but we can mention in our docs too that the web streams stuff is experimental. |
I gave it a go and ran into the following problem: https://nodejs.org/api/child_process.html#optionsstdio
The problem is: this is currently checked by verifying if the stream is an Unfortunately, when passing a web stream to I do not see a way to go around this problem. If you do, please let me know! |
Update: there is a solution. When a web stream is passed to the |
|
|
As discussed in #593 (comment)
We should support web streams for the
stdin
/stdout
/stderr
options.We can implement this by converting them to Node.js streams using
stream.Readable.fromWeb()
andstream.Writable.fromWeb()
The text was updated successfully, but these errors were encountered: