* grammar correction of an option description
(missed in #10589)
* changed description to be consistent with others
Co-Authored-By: Huáng Jùnliàng <jlhwung@gmail.com>
* ran prettier
* [parser] Add support for TS declare modifier on fields (#10484)
* [parser] Add support for TS declare modifier on fields
* Use Object.create(null)
* Comment
* Add support for TS declare types to types and generator (#10544)
* Transform TypeScript "declare" fields (#10546)
* Transform TypeScript "declare" fields
* Remove multiple spaces
* declareFields -> allowDeclareFields
* Update after rebase
* Add error recovery support to @babel/parser
* Update @babel/parser tests to always recover from errors
* Update this.raise usage in @babel/parser:
- expression.js
- lval.js
- statement.js
- estree.js
- flow.js
- jsx/index.js
- tokenizer/index.js
* Update @babel/parser fixtures with recovered errors
* Fix tests out of @babel/parser
* Do not use try/catch for control flow
* Update invalid fixtures
* Do not report invalid lhs in toAssignable
* Do not validate function id multiple times
* Dedupe reserved await errors
* Remove duplicate errors about strict reserved bindings
* Remove duplicated error about yield/await inside params
* Don't error twice for methods in object patterns
* Don't report invalid super() twice
* Remove dup error about reserved param for expr arrows
* Remove double escapes in migrated tests
* Dedupe errors about invalid escapes in identifiers
* Remove duplicated error about decorated constructor
* Remove duplicated error about spread in flow class
* Don't throw for invalid super usage
* Don't fail for object decorators with stage 2
* Fix flow inexact type errors
* Fix flow
* Fix errors about escapes in keywords (ref: #10455)
* Update after rebase
* Fix todo
* Remove duplicated error when using += for defaults
* Remove unnecessary throw
* Nit: use ??
This PR allows legacy decorators to work with strict class fields, which
are now stage 3 and have shipped in a number of browsers. Allowing this will
allow users of the legacy transform (which is currently recommended by the
champions of the decorator proposal) to use the proper class field semantics
for non-decorated fields, which should help prevent breakage later on.
This change is not a breaking change, since users had to explicitly opt into
loose mode in class fields before. This just gives them the option to remove
that opt-in.
* [transform-react-jsx] Add useSpread option to transform JSX
* Add validation for default option
* Add error when using useSpread and useBuiltIns at the same time
* Move useSpread to convertAttribute helper function
* Add useSpread option to presect-react
* Remove casting useSpread to boolean in preset-react option.
Co-Authored-By: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
* feat: implement create-regexp-features-plugin
* fix: test input is not effective
* refactor: leverage create-regexp-features-plugin
* test: add more test cases
* test: update test fixture
* chore: add type annotation to features
* test: add regression test for issue 9892
* add regression test for issue 9199
* address review comments from Nicolò
* address review comments from Brian
* small tweaks
* Enable dotAllFlag when flags includes u
* Flow enums parsing
* Parse exporting enums
* Enums parsing remove lookahead, other improvements
* Enums: add EnumBody and EnumMember aliases, change boolean members to use BooleaLiteral value
* Fix enum member init flow type, now that boolean members have a BooleanLiteral value
* Flow enums: use contextual utils, change members length checks to use logic operators, remove reserved word logic modification
* Flow enums: remove unnecessary code in generator, fix error message
* 🐛 fixed missing errors on assignment pattern in object expression
* ♻️ remove a non-needed comment
* 🐛 missed adding comma in the test input
* 🐛 fixed the failing valid-property-initializer test
* Changes UMD callsite to be more likely to pass in the intended object.
Fixes#10476
Note: This PR should be considered pseudocode and used as an illustration of the proposed fix. I do not know nearly enough about this project to know if this is an appropriate solution to the problem, nor do I have the confidence to update the tests appropriately.
* Update tests