Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[hotfix] Use same targets for fields as for private methods #11633

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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);
}

}