-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 process.stdin
, process.stdout
and process.stderr
#894
Comments
I'd be happy to provide a polyfill for console.log(Bun.stdin.stream(), Bun.stdout.stream());
// ReadableStream { } ReadableStream { } I have tried many things in JS-land to no avail, so would love some input about how to make |
@franciscop You need to use // log a file to stdout
await Bun.write(Bun.stdout, Bun.file("input.txt")); |
process.stdin
and process.stdout
process.stdin
, process.stdout
and process.stderr
Shimming my global process.stderr does the trick in my case: (your mileage might vary)
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I believe this issue can be closed with the release of v0.3.0. |
Yep! This is now supported in Bun v0.3.0 🎉 |
What is the problem this feature will solve?
It will allow more compatibility with node.js programs and make it easy(or maybe even stop it from being impossible) to receive user input.
What is the feature you are proposing to solve the problem?
Adding More support for
process.stdin
andprocess.stdout
(specifically,process.stdin.on("data", ()=>{...}
andprocess.stdout.write("...")
)What alternatives have you considered?
I have no fix for stdin so far, stdout I could maybe store all my lines in a string and log them whenever (would still always end in a newline, but would fix writing chars without an automatic newline)
The text was updated successfully, but these errors were encountered: