Implement @babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression (#13842)

* fix: register function expression id after params

* implement bugfix plugin

* add more testcases

* fix: do not skip pattern binding referencing id

* update compat-table

* add bugfix plugin to preset-env

* update Babel 8 test fixtures

* Update packages/babel-plugin-bugfix-safari-id-destructuring-collision-in-function-expression/README.md

* chore: bundle bugfix plugin

* address review comments

* add runtime version check

* update compat table

* fix syntax error

* update test fixtures

* revert bugfixes targets update

* update Babel 8 test fixtures
This commit is contained in:
Huáng Jùnliàng
2021-10-20 15:53:40 -04:00
committed by GitHub
parent 780aa48d2a
commit 29f697c84e
195 changed files with 731 additions and 310 deletions

View File

@@ -31,6 +31,10 @@ module.exports = {
],
replaces: "transform-block-scoping",
},
"bugfix/transform-safari-id-destructuring-collision-in-function-expression": {
features: ["destructuring, parameters / duplicate identifier"],
replaces: "transform-parameters",
},
"bugfix/transform-tagged-template-caching": {
features: ["template literals / TemplateStrings permanent caching"],
replaces: "transform-template-literals",

View File

@@ -18,6 +18,7 @@ const es2015Parameter = {
"rest parameters",
"destructuring, parameters / aliased defaults, arrow function",
"destructuring, parameters / shorthand defaults, arrow function",
"destructuring, parameters / duplicate identifier",
],
},
};

View File

@@ -1,7 +1,7 @@
#!/bin/bash
set -e
COMPAT_TABLE_COMMIT=63abfe227f4b9c6ef019efbbf059025b537b8511
COMPAT_TABLE_COMMIT=34b14f8eb016f8f2f3312adf35c53d6364742582
GIT_HEAD=build/compat-table/.git/HEAD
if [ -d "build/compat-table" ]; then