Open hilja opened 7 months ago
Just stumbled upon this too.
Chrome does the same as Node
Since ES2018, the spec requires the return value of toString() to be the exact same source code as it was declared, including any whitespace and/or comments
Quoting from MDN, it should keep everything in, pretty unambiguous in that way.
I don't really know Zig but I could whip the tests for it to get the ball rolling, would be nice to get this sorted :)
👋 Stumbled on this too - I would really like to be able to run Lighthouse with Bun.
What version of Bun is running?
1.0.25
What platform is your computer?
Darwin 23.3.0 arm64 arm
What steps can reproduce the bug?
Make a file:
Run it:
What is the expected behavior?
String with the function name:
What do you see instead?
Function name omitted:
Additional information
Lighthouse performance metric package fails here https://github.com/GoogleChrome/lighthouse/blob/5e18c5a0656b427e59890dc9c125164ef9f276c3/core/lib/page-functions.js#L578
They have a util like this:
Bun can't find the match and errors out: