bun
bun copied to clipboard
console.log ignores enumerable:false
What version of Bun is running?
1.0.24+6fa35839c
What platform is your computer?
Darwin 23.2.0 arm64 arm
What steps can reproduce the bug?
In file test.js:
const test = {
a: 1,
b: 2,
};
console.log(test);
Object.defineProperty(test, "b", { enumerable: false });
console.log(test);
What is the expected behavior?
❯ node test.js { a: 1, b: 2 } { a: 1 }
What do you see instead?
❯ bun test.js { a: 1, b: 2, } { a: 1, b: 2, }
Additional information
No response
So, I made a change that fixes it, but it changes bindings.cpp and I have no idea what other ramifications it might have.
https://github.com/oven-sh/bun/compare/main...sroussey:bun:main