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

fix(js): add @babel/plugin-transform-class-properties to babel preset #19818

Merged
merged 10 commits into from
Oct 26, 2023

Conversation

ghost
Copy link

@ghost ghost commented Oct 24, 2023

Current Behavior

After removing the deprecated babel proposal plugin, apps that use classes have issues with field initialization inside constructors. (it broke a few of our apps)

Expected Behavior

Current applications should not break, and constructor field initialization should preserve TS rules.

Related Issue(s)

Fixes #19817

@ghost ghost requested review from a team as code owners October 24, 2023 12:01
@ghost ghost requested review from JamesHenry, AgentEnder and juristr October 24, 2023 12:01
@vercel
Copy link

vercel bot commented Oct 24, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
nx-dev ✅ Ready (Inspect) Visit Preview Oct 26, 2023 4:39pm

@ghost
Copy link
Author

ghost commented Oct 25, 2023

any approvers in the building so we can have it in the next version? 😉

@ghost
Copy link
Author

ghost commented Oct 26, 2023

@AgentEnder @JamesHenry wdyt?

@bigcakes
Copy link
Contributor

Can confirm this fixes an issue we hit in the upgrade as well

@jaysoo
Copy link
Member

jaysoo commented Oct 26, 2023

It's supposed to be added in preset-env, but perhaps there's another reason it isn't working. This LGTM, and we'll add some e2e tests to guard this.

packages/js/.eslintrc.json Outdated Show resolved Hide resolved
@jaysoo jaysoo force-pushed the fix/js-babel-reset-class-properties branch from f373f44 to 116e56b Compare October 26, 2023 16:33
@jaysoo jaysoo merged commit 2ea9f18 into nrwl:master Oct 26, 2023
6 checks passed
@ghost ghost deleted the fix/js-babel-reset-class-properties branch October 27, 2023 09:43
Copy link

github-actions bot commented Nov 2, 2023

This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v17 - TS with Babel fails on class properties initialization
4 participants