Skip to content
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

Merged
merged 4 commits into from
Apr 20, 2022
Merged

[babel 8] Remove selfClosing from jsxElement builder #14464

merged 4 commits into from
Apr 20, 2022

Conversation

wjw99830
Copy link
Contributor

@wjw99830 wjw99830 commented Apr 14, 2022

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"],
Copy link
Contributor

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

typeAnnotation: {
validate: process.env.BABEL_8_BREAKING
? assertNodeType("TypeAnnotation", "TSTypeAnnotation")
: assertNodeType("TypeAnnotation", "TSTypeAnnotation", "Noop"),
optional: true,
},

Copy link
Contributor Author

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.

@JLHwung
Copy link
Contributor

JLHwung commented Apr 19, 2022

Can you rebase on the latest main? The caniuse-lite CI error has been fixed.

Copy link
Contributor

@JLHwung JLHwung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@nicolo-ribaudo nicolo-ribaudo changed the title fix(babel-types): selfClosing doesn't work in jsxElement builder [babel 8] Remove selfClosing from jsxElement builder Apr 20, 2022
@nicolo-ribaudo nicolo-ribaudo merged commit f051e8b into babel:main Apr 20, 2022
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jul 21, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 21, 2022
@nicolo-ribaudo nicolo-ribaudo added this to the v8.0.0 milestone Aug 8, 2023
@nicolo-ribaudo nicolo-ribaudo added PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release and removed babel 8 labels Aug 8, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: types PR: Breaking Change 💥 A type of pull request used for our changelog categories for next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: 'selfClosing' doesn't work in 't.jsxElement'
4 participants