Skip to content

[babel 8] Remove selfClosing from jsxElement builder#14464

Merged
nicolo-ribaudo merged 4 commits into
babel:mainfrom
wjw99830:hotfix/self_closing_in_jsx_element_builder
Apr 20, 2022
Merged

[babel 8] Remove selfClosing from jsxElement builder#14464
nicolo-ribaudo merged 4 commits into
babel:mainfrom
wjw99830:hotfix/self_closing_in_jsx_element_builder

Conversation

@wjw99830

@wjw99830 wjw99830 commented Apr 14, 2022

Copy link
Copy Markdown
Contributor
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

});

defineType("JSXElement", {
builder: ["openingElement", "closingElement", "children", "selfClosing"],

Copy link
Copy Markdown
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
Copy Markdown
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

JLHwung commented Apr 19, 2022

Copy link
Copy Markdown
Contributor

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

@JLHwung JLHwung left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@nicolo-ribaudo nicolo-ribaudo left a comment

Copy link
Copy Markdown
Member

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