-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[babel 8] Remove selfClosing
from jsxElement
builder
#14464
[babel 8] Remove selfClosing
from jsxElement
builder
#14464
Conversation
wjw99830
commented
Apr 14, 2022
•
edited by JLHwung
edited by JLHwung
Q | A |
---|---|
Fixed Issues? | Fixes #14460 |
Patch: Bug Fix? | ❌ |
Major: Breaking Change? | ✅ |
Minor: New Feature? | ❌ |
Tests Added + Pass? | ✅ |
Documentation PR Link | babel/website#2765 |
Any Dependency Changes? | ❌ |
License | MIT |
@@ -42,7 +42,7 @@ defineType("JSXClosingElement", { | |||
}); | |||
|
|||
defineType("JSXElement", { | |||
builder: ["openingElement", "closingElement", "children", "selfClosing"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this change should be behind the BABEL_8_BREAKING
flag, because a different shape is returned from t.JSXElement
.
For example, see
babel/packages/babel-types/src/definitions/core.ts
Lines 457 to 462 in 2c7e9f7
typeAnnotation: { | |
validate: process.env.BABEL_8_BREAKING | |
? assertNodeType("TypeAnnotation", "TSTypeAnnotation") | |
: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"), | |
optional: true, | |
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's right. I'll fix it later.
Can you rebase on the latest main? The caniuse-lite CI error has been fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
selfClosing
from jsxElement
builder