oven-sh/bun

console.log ignores enumerable:false

Open

#8,316 opened on Jan 21, 2024

View on GitHub
 (2 comments) (0 reactions) (0 assignees)Rust (4,486 forks)batch import
buggood first issueweb-api

Repository metrics

Stars
 (90,348 stars)
PR merge metrics
 (Avg merge 1d 17h) (357 merged PRs in 30d)

Description

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

Contributor guide