* Use ~ for preset-env's @babel/compat-data dependency
* Revert "Use ~ for preset-env's @babel/compat-data dependency"
This reverts commit e7d57c7894095d381670cddfbbce06bd2a480a32.
* Allow using `preset-env` with newer versions of `compat-data`
* fix(babel-parser): chain off optionally chained keys named class and function
Fixes#11197
* Extract override as variable to satisfy typechecker
Flow did not trust that curContext.override would be defined
* Chore: align babel-eslint-parser & espree
* Start program at beginning of comment when no tokens exist
* Import correct version of Espree for tests
* Remove hasOwnProperty guard
* Fix rewriteThis in helper-module-transforms for computed class elements
* Added test file and corrected the visitor
* Revert .gitignore
* Using skipAllButComputedKey method from plugin-replace-supers
* added tests for class methods
* Added tests for both class properties and methods and fixed skipping computed key for methods
* Fixed condition for class methods
* revised the conditions for class methods
* Added more tests and used else-if in classmethod condition
* Update packages/babel-helper-replace-supers/src/index.js
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
* Draft fix for TDZError in computed prototype methods
* Added tests for loose:false and also extracted handleClassTDZ
* Added state parameter to handleClassTDZ function
* Extracted the state object to a variable
* Added helper comments for environmentVisitor
* Added else condition to traverse computed Path
* Cached computed path key into a variable
* Fix type opts.getObjetRef to opts.getObjectRef
* Added // @flow to possibly catch for more errors.
* tweaks
Co-authored-by: InsignificantReasons <41794038+InsignificantReasons@users.noreply.github.com>
* Correctly transpile export bindings for some for-of loops
* Correctly transform non-destructured for of loops to update exported variables
* Add tests
* Don't replace entire for of loop
* Correctly transform destructured for-of/for-in exports
* Update exported variables in array pattern and more fixes
* Refresh test output
* Update tests and rebase on master
* Refactor ForOf|ForIn visitor
* Don't transform re-declared exported vars
* Generate better name for loop id
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
* Idiomatically generate UidIdentifier
* Update scope after replacing loop declaration
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
* Change isReferenced to return false for object/class method parameter names.
* use indexOf instead of for-of loop
* replace `.indexOf` check with `.includes` and assume `parent.params` exists
Co-Authored-By: Justin Ridgewell <justin@ridgewell.name>
* check .params within case block for ClassMethod/ClassPrivateMethod/ObjectMethod only
* add comment clarifying that case clause fall-through is intentional
Co-authored-by: Justin Ridgewell <justin@ridgewell.name>