Support flow jsx opening element type arguments#17028
Merged
JLHwung merged 9 commits intobabel:mainfrom Jan 8, 2025
Merged
Conversation
Collaborator
|
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/58525 |
JLHwung
commented
Dec 16, 2024
|
|
||
| # Re-enable this test once prettier updated the snapshot | ||
| # https://github.com/babel/babel/pull/17028 | ||
| rm -r tests/format/flow/jsx/format.test.js |
JLHwung
commented
Dec 16, 2024
|
|
||
| JSX/invalid_unpaired_gt.js | ||
| JSX/invalid_unpaired_rcurly.js | ||
| JSX/jsx_type_args_types_disabled.js |
Contributor
Author
There was a problem hiding this comment.
In this test, <Component<T> /> is parsed with the flow parser option { types: false }, but we don't have a mirroring parser option.
The test is broken because we now support typeArguments in JSXOpeningElement
a7826f3 to
cbeba81
Compare
nicolo-ribaudo
approved these changes
Jan 8, 2025
Member
nicolo-ribaudo
left a comment
There was a problem hiding this comment.
I would consider this to be a bugfix
liuxingbaoyu
approved these changes
Jan 8, 2025
Tobbe
added a commit
to redwoodjs/graphql
that referenced
this pull request
Mar 15, 2025
Tobbe
added a commit
to redwoodjs/graphql
that referenced
this pull request
Mar 25, 2025
laine-hallot
pushed a commit
to laine-hallot/uwu-parser
that referenced
this pull request
Mar 31, 2025
* refactor: rename tsInNoContext to tsInTopLevelContext * fix: support type arguments in JSXOpeningElement * add test cases * update per Babel 8 AST * define typeArguments and remove it in flow transform * update generated AST types * fix typing errors * e2e: ignore the broken prettier test The test is broken because we now support typeArguments in JSXOpeningElement * update test allowlist
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces support for the Flow type arguments in JSXOpeningElement, e.g.
<Component<string>></Component>. The implementation is mostly borrowed directly from the previous TypeScript implementation (#11912 and #14145).