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

transformer: tsc vs babel on enum transformation #8342

Closed
Boshen opened this issue Jan 8, 2025 Discussed in #8341 · 4 comments · Fixed by #8543
Closed

transformer: tsc vs babel on enum transformation #8342

Boshen opened this issue Jan 8, 2025 Discussed in #8341 · 4 comments · Fixed by #8543
Assignees

Comments

@overlookmotel
Copy link
Contributor

overlookmotel commented Jan 8, 2025

Confirmed that this weird behavior is also present in Babel. Babel REPL

I am no TypeScript expert, so I may be wrong, but my understanding is: TSC is the "source of truth" on TypeScript transforms, and Babel's TS transform should replicate TSC's behavior. If it doesn't, then that's a bug in Babel.

@branchseer May I suggest raising an issue on Babel? That would help "flush out" answer on whether they diverged from TSC for any good reason, or if it's simply a bug.

@branchseer
Copy link
Contributor

issue logged for Babel: babel/babel#17049

@branchseer
Copy link
Contributor

The Babel team acknowledged the bug and has merged the fix.

@Dunqing I can draft a fix for oxc if no one is working on it.

@overlookmotel
Copy link
Contributor

Great! Thank you. #8508 updates our transformer test fixtures to latest from Babel, which includes the test case you added in babel/babel#17050 (obviously, that test is failing currently).

I'll let @Dunqing come back on whether he plans to work on it, or if he has any thoughts, but as far as I'm aware he's currently working on other things, and a PR would be very welcome.

Boshen pushed a commit that referenced this issue Jan 15, 2025
Update babel submodule for conformance tests to latest HEAD.

The test fixtures include a new one for a bug fix which @branchseer
intends to also apply to Oxc - babel/babel#17050
(see #8342).
Boshen pushed a commit that referenced this issue Jan 18, 2025
…tant enum members (#8543)

fixes #8342

---------

Co-authored-by: overlookmotel <theoverlookmotel@gmail.com>
Co-authored-by: Dunqing <dengqing0821@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants