* Fix createSuper in Babel <7.5.5
In Babel <7.5.5, addHelper only throws when called for the first time.
This was fixed by babel/babel#10208, but since we are already adding
a workaround for <7.9.0, we may as well fix <7.5.5
* Use 7.0.0 in "babel-old-version" test
* Test Babel compiled using an old version of @babel/core
This should catch regressions where we use a new helper without a fallback
for older versions, or when we use a new @babel/traverse method.
* Enable the test
* fix: disallow private name in object member and TS type elements
* chore: update test262 whitelist
* chore: make flow happy
* Update packages/babel-parser/src/parser/expression.js
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
* chore: update test fixtures
* Update packages/babel-parser/src/parser/expression.js
Co-Authored-By: Brian Ng <bng412@gmail.com>
* chore: update test fixtures
Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
Co-authored-by: Brian Ng <bng412@gmail.com>
* migrated mocha to jest
* migrated mocha to jest - 2
* migrated mocha to jest - removed preversion hook from script
* migrated mocha to jest - 3
* migrated mocha to jest - 4
* cleanup
* review
* review
* Allow duplicate __proto__ keys in patterns, simple case (#6705)
* Update test262 whitelist
* Rename checkDuplicatedProto's parameter and adjust type
* Store first __proto__ redefinition's position
* Add test
* Add nonOctalDecimal verification
* Update regex and code style
* Refactor non octal detection
* Add numeric separator test
* Disallow numeric separators in non octals
* Update whitelist
* Better test naming
* Disallow numeric separators in non oct for all numbers
* Specific error above the general error
* Add test for invalid leading zero in num separator
* Add start position to error
* [parser] Disallow numeric separator in unicode scape sequences (#10460)
* raise error only when numeric separator plugin is set
* Adds argument for checking numeric separator
* Fix condition for readability
* Add test for hex escape sequence and rephrase error message
* Remove exposure for allowNumSeparator in readHexChar method
* 🚀 added check to disallow super.private variable access and test case added
* ♻️ change the other linting change back to how it was
* ♻️ change the other linting change back to how it was
* ♻️ added newline at the end test output.json file
* ♻️ changed the linting style to the way it was
* ♻️ updated error message, removed super private member access test cases from whitelist of flow and test 262 suite
* ♻️ added newline in output.json
* Disallow static fields named `constructor` in a class
- Disallowed static fields named `constructor` in a class (previously only non-static were disallowed)
- Updated the text for the error for one consolidated warning, for both static and non-static fields
- Added a test
- Updated an existing test in the `flow` test suite of the parser to reflect the parse error.
Strangely, the test used to pass and started failing when inlining the `isNonstaticConstructor` method, without any changes.
In that test, `constructor` was a field, so in theory it should never have passed.
Would appreciate some feedback on this, as I'm not 100% sure if this is somehow related to Flow
* Update test262 whitelist
* Add comment and fix && operator