oven-sh/bun

console.log ignores enumerable:false

Open

#8.316 geöffnet am 21. Jan. 2024

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Rust (4.486 Forks)batch import
buggood first issueweb-api

Repository-Metriken

Stars
 (90.348 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 17h) (357 gemergte PRs in 30 T)

Beschreibung

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