bun icon indicating copy to clipboard operation
bun copied to clipboard

console.log ignores enumerable:false

Open sroussey opened this issue 1 year ago • 2 comments

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

sroussey avatar Jan 21 '24 03:01 sroussey

So, I made a change that fixes it, but it changes bindings.cpp and I have no idea what other ramifications it might have.

sroussey avatar Jan 21 '24 22:01 sroussey

https://github.com/oven-sh/bun/compare/main...sroussey:bun:main

sroussey avatar Jan 21 '24 23:01 sroussey