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

Do not warn for loose of class features in preset-env #12898

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
Expand Up @@ -29,6 +29,7 @@
},
"devDependencies": {
"@babel/core": "workspace:*",
"@babel/helper-plugin-test-runner": "workspace:*"
"@babel/helper-plugin-test-runner": "workspace:*",
"@babel/preset-env": "workspace:*"
}
}
Expand Up @@ -44,7 +44,7 @@ export function createClassFeaturePlugin({
const constantSuper = api.assumption("constantSuper");
const noDocumentAll = api.assumption("noDocumentAll");

if (loose) {
if (loose === true) {
const explicit = [];

if (setPublicClassFields !== undefined) {
Expand Down
@@ -0,0 +1,3 @@
class A {
foo;
}
@@ -0,0 +1,8 @@
{
"validateLogs": true,
"presets": [["env", { "shippedProposals": true }]],
"assumptions": {
"setPublicClassFields": true
},
"targets": "chrome 70"
}
@@ -0,0 +1,6 @@
class A {
constructor() {
this.foo = void 0;
}

}
@@ -0,0 +1 @@

@@ -0,0 +1,3 @@
class A {
foo;
}
@@ -0,0 +1,8 @@
{
"validateLogs": true,
"presets": [["env", { "loose": true, "shippedProposals": true }]],
"assumptions": {
"setPublicClassFields": true
},
"targets": "chrome 70"
}
@@ -0,0 +1,6 @@
class A {
constructor() {
this.foo = void 0;
}

}
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions yarn.lock
Expand Up @@ -429,6 +429,7 @@ __metadata:
"@babel/helper-plugin-test-runner": "workspace:*"
"@babel/helper-replace-supers": "workspace:^7.13.0"
"@babel/helper-split-export-declaration": "workspace:^7.12.13"
"@babel/preset-env": "workspace:*"
peerDependencies:
"@babel/core": ^7.0.0
languageName: unknown
Expand Down