Skip to content

[Bug]: The value of a key named __proto__ in JSON is missing in output #7382

@sapphi-red

Description

@sapphi-red

Reproduction link or steps

REPL

What is expected?

The output to be:

//#region data.json
const __proto__ = { foo: "bar" };
var data_default = {
	"": "The property below should be converted to a computed property:",
	["__proto__"]: __proto__
};

//#endregion
//#region entry.js
console.log(data_default);

//#endregion

What is actually happening?

The output is:

//#region data.json
var data_default = {
	"": "The property below should be converted to a computed property:",
	["__proto__"]: __proto__
};

//#endregion
//#region entry.js
console.log(data_default);

//#endregion

System Info

REPL 1.0.0-beta.53

Any additional comments?

Found in esbuild tests.

Metadata

Metadata

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions