-
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
Implement console.Console
constructor.
#3625
Comments
If you don't mind, I would like to work on this issue. |
go for it i would add this in ConsoleObject.ts basically implement it in js using Bun.inspect make it similar to how the async iterator works in terms of wiring it up to the console object. |
Great. Thanks for the tips. I'll get started on this |
Hey @adsellor, I'm also facing this issue while trying to start my nestjs project. |
Hey @joaogl. Sorry for taking this long and not updating my findings here. Here is what I found while trying to make this work.
I wasn't able to do it |
Hey @adsellor, don't expect too much from me :D first time looking into a codebase like this one. Is there any documentation around the codebase structure or architecture besides what is in https://bun.sh/docs/project/development that I could use to warm up? |
I don't think so, and I don't feel confident enough to give an advice on where to start :D . But maybe join discord and ask questions along the way. P.S I'll get back to this during this weekend, hoping to have at least a simple Console constructor with stdout working. |
unfortunatly there isnt. but if you're in our discord i can answer any questions about the project. in this documentation page really needs updating. |
also, the idea i was thinking was to use I dont think we need to do much of this in Zig/C++. I don't really imagine this feature is used too heavily that it needs to be extremely fast either. Also it's stdout and stderr, not stdin. I was confused for a second before checking docs. *the note about Bun.inspect is right now it actually does almost exactly what we need, but we want to change the signature of this function from |
Sorry for the confusion, it should've been
I see, I'll try to implement it this way. Thanks for the advice. |
@adsellor if you don't mind, please share the PR once you start looking into this, I'm deeply interested in understand how this will turn out and to look into the changes you make to learn something 🙏 |
console.Console
constructor.
This comment was marked as outdated.
This comment was marked as outdated.
@webivan1 Thanks for sharing, that might work for your particular script, but we'll still need to implement |
@Electroid Sorry, I forgot to mention It was for nestjs framework |
What version of Bun is running?
0.6.13
What platform is your computer?
Linux 5.15.49-linuxkit-pr aarch64 aarch64
What steps can reproduce the bug?
Execute this code in bun
What is the expected behavior?
Should not fail to call
new console.Console()
and must create a new Console instances.What do you see instead?
Additional information
This method is implemented in nodejs and some npm packages use it which causes it to fail when using it with bun.
Method documentation for nodejs https://nodejs.org/api/console.html#new-consoleoptions
The text was updated successfully, but these errors were encountered: