forked from babel/babel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix destructuring assignments being transpiled for edge 15 (babel#9902)
* Current behavior for preset-env destructuring and edge * fix(preset-env): destructuring transpiled in edge 15
- Loading branch information
1 parent
16e17c5
commit eae7a33
Showing
5 changed files
with
26 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
packages/babel-preset-env/test/fixtures/preset-options/destructuring-edge/input.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
((a, { b = 0, c = 3 }) => { | ||
return a === 1 && b === 2 && c === 3; | ||
})(1, { b: 2 }); |
13 changes: 13 additions & 0 deletions
13
packages/babel-preset-env/test/fixtures/preset-options/destructuring-edge/options.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"../../../../lib", | ||
{ | ||
"targets": { | ||
"browsers": ["edge >= 15"] | ||
}, | ||
"modules": false | ||
} | ||
] | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
packages/babel-preset-env/test/fixtures/preset-options/destructuring-edge/output.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
((a, _ref) => { | ||
let { | ||
b = 0, | ||
c = 3 | ||
} = _ref; | ||
return a === 1 && b === 2 && c === 3; | ||
})(1, { | ||
b: 2 | ||
}); |