Skip to content

refactor(es/react): Split jsx into automatic/classic #10616

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

Merged
merged 14 commits into from
Jun 19, 2025

Conversation

magic-akari
Copy link
Member

No description provided.

Copy link

changeset-bot bot commented Jun 16, 2025

🦋 Changeset detected

Latest commit: 7d2533f

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member Author

@magic-akari magic-akari left a comment

Choose a reason for hiding this comment

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

The primary reason for early directive parsing is that configuration directives in code comments may override settings from .swcrc.
We require all relevant options to be finalized before entering automatic/classic passes to ensure stability during transformation.

Longer-term, we'll move the classic pass earlier in the processing pipeline.

@magic-akari
Copy link
Member Author

Roadmap:

@magic-akari magic-akari marked this pull request as ready for review June 17, 2025 17:03
@magic-akari magic-akari requested review from a team as code owners June 17, 2025 17:03
@kdy1 kdy1 self-assigned this Jun 17, 2025
@kdy1 kdy1 added this to the Planned milestone Jun 17, 2025
@magic-akari magic-akari requested a review from kdy1 June 18, 2025 03:33
@kdy1
Copy link
Member

kdy1 commented Jun 18, 2025

Are you fine with using dev branch as the target instead of main while everything is implemented?

@magic-akari
Copy link
Member Author

Are you fine with using dev branch as the target instead of main while everything is implemented?

I'll introduce the breaking change in Step 3 when switching the default JSX runtime. Given that a breaking change is unavoidable regardless, It's OK to use dev branch.

@kdy1 kdy1 changed the base branch from main to dev June 18, 2025 09:38
Copy link
Member

@kdy1 kdy1 left a comment

Choose a reason for hiding this comment

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

Looks good to me

Copy link

codspeed-hq bot commented Jun 19, 2025

CodSpeed Performance Report

Merging #10616 will degrade performances by 21.98%

Comparing magic-akari:refactor/jsx (7d2533f) with dev (d75c22b)

Summary

⚡ 36 improvements
❌ 15 regressions
✅ 78 untouched benchmarks
🆕 11 new benchmarks
⁉️ 23 dropped benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
⁉️ deserialization of serde 2.4 µs N/A N/A
⁉️ serialization of serde 2.7 µs N/A N/A
css/lexer/bootstrap_5_1_3 10.3 ms 11.2 ms -8.75%
css/lexer/foundation_6_7_4 8.3 ms 9.1 ms -8.71%
css/lexer/tailwind_3_1_1 1.6 ms 1.8 ms -8.37%
css/parser/bootstrap_5_1_3 47.5 ms 48.7 ms -2.43%
css/parser/foundation_6_7_4 37.6 ms 38.4 ms -2.3%
css/parser/tailwind_3_1_1 7.3 ms 7.5 ms -2.16%
es/codegen/large 657.9 µs 642.3 µs +2.43%
es/codegen/with-parser/colors 196.1 µs 176.1 µs +11.4%
es/codegen/with-parser/large 1.5 ms 1.3 ms +15.03%
⁉️ es/fast-lexer/angular 9.2 ms N/A N/A
⁉️ es/fast-lexer/backbone 1.2 ms N/A N/A
⁉️ es/fast-lexer/jquery 6.1 ms N/A N/A
⁉️ es/fast-lexer/jquery mobile 10 ms N/A N/A
⁉️ es/fast-lexer/mootools 4.9 ms N/A N/A
⁉️ es/fast-lexer/three 29.8 ms N/A N/A
⁉️ es/fast-lexer/underscore 954.6 µs N/A N/A
⁉️ es/fast-lexer/yui 5.6 ms N/A N/A
🆕 es/lexer/angular N/A 12.5 ms N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants