fix: correctly transform __proto__ properties (#12664)

* fix: correctly transform `__proto__` properties

* fixup! fix: correctly transform `__proto__` properties
This commit is contained in:
ExE Boss
2021-01-22 10:58:33 +01:00
committed by GitHub
parent 2811b535d6
commit f1314a1683
9 changed files with 52 additions and 5 deletions

View File

@@ -0,0 +1,11 @@
var shorthand = {
__proto__,
}
var method = {
__proto__() {}
}
var methodComputed = {
["__proto__"]() {}
}

View File

@@ -0,0 +1,7 @@
{
"plugins": [
"external-helpers",
"transform-computed-properties",
"transform-shorthand-properties"
]
}

View File

@@ -0,0 +1,3 @@
var shorthand = babelHelpers.defineProperty({}, "__proto__", __proto__);
var method = babelHelpers.defineProperty({}, "__proto__", function () {});
var methodComputed = babelHelpers.defineProperty({}, "__proto__", function () {});

View File

@@ -0,0 +1,3 @@
var obj = {
['__proto__']: 123
};

View File

@@ -0,0 +1 @@
var obj = babelHelpers.defineProperty({}, '__proto__', 123);