Rename all proposal plugins to -proposal- from -transform- (#6570)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
const test = () => {
|
||||
try {
|
||||
throw 0;
|
||||
}
|
||||
catch {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
assert(test());
|
||||
|
||||
const test2 = () => {
|
||||
try {
|
||||
throw 0;
|
||||
}
|
||||
catch (err) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
assert(test2());
|
||||
@@ -0,0 +1,5 @@
|
||||
try {
|
||||
throw 0;
|
||||
} catch (err) {
|
||||
console.log("it failed, but this code executes");
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
try {
|
||||
throw 0;
|
||||
} catch (err) {
|
||||
console.log("it failed, but this code executes");
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
try {
|
||||
throw 0;
|
||||
} catch {
|
||||
console.log("it failed, but this code executes");
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
try {
|
||||
throw 0;
|
||||
} catch (_unused) {
|
||||
console.log("it failed, but this code executes");
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
try {
|
||||
throw 0;
|
||||
} catch (err) {
|
||||
console.log("it failed, but this code executes");
|
||||
} finally {
|
||||
console.log("this code also executes");
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
try {
|
||||
throw 0;
|
||||
} catch (err) {
|
||||
console.log("it failed, but this code executes");
|
||||
} finally {
|
||||
console.log("this code also executes");
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
try {
|
||||
throw 0;
|
||||
} catch {
|
||||
console.log("it failed, but this code executes");
|
||||
} finally {
|
||||
console.log("this code also executes");
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
try {
|
||||
throw 0;
|
||||
} catch (_unused) {
|
||||
console.log("it failed, but this code executes");
|
||||
} finally {
|
||||
console.log("this code also executes");
|
||||
}
|
||||
3
packages/babel-plugin-proposal-optional-catch-binding/test/fixtures/options.json
vendored
Normal file
3
packages/babel-plugin-proposal-optional-catch-binding/test/fixtures/options.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"plugins": ["proposal-optional-catch-binding"]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
import runner from "@babel/helper-plugin-test-runner";
|
||||
|
||||
runner(__dirname);
|
||||
Reference in New Issue
Block a user