Skip to content

Commit

Permalink
[hotfix] Use same targets for fields as for private methods (#11633)
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolo-ribaudo committed May 27, 2020
1 parent 05804b1 commit 32bd530
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/babel-preset-env/src/plugins-compat-data.js
Expand Up @@ -19,4 +19,7 @@ for (const plugin of Object.keys(bugfixPlugins)) {
}
}

pluginsFiltered["proposal-class-properties"] =
pluginsFiltered["proposal-private-methods"];

export { pluginsFiltered as plugins, bugfixPluginsFiltered as pluginsBugfixes };
Expand Up @@ -9,7 +9,7 @@ Using modules transform: auto

Using plugins:
syntax-numeric-separator { "chrome":"80" }
syntax-class-properties { "chrome":"80" }
proposal-class-properties { "chrome":"80" }
proposal-private-methods { "chrome":"80" }
syntax-nullish-coalescing-operator { "chrome":"80" }
syntax-optional-chaining { "chrome":"80" }
Expand Down
@@ -0,0 +1,3 @@
class A {
x;
}
@@ -0,0 +1,8 @@
{
"presets": [
["env", {
"targets": { "node": 12 },
"shippedProposals": true
}]
]
}
@@ -0,0 +1,8 @@
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

class A {
constructor() {
_defineProperty(this, "x", void 0);
}

}

0 comments on commit 32bd530

Please sign in to comment.