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/preset-typescript: fix tsx assigment issue #12599

Merged
merged 2 commits into from Jan 10, 2021

Conversation

Zzzen
Copy link
Contributor

@Zzzen Zzzen commented Jan 9, 2021

Q                       A
Fixed Issues? Fixes #12587
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

This is actually copied from flowjs plugin

if (
this.hasPlugin("jsx") &&
(this.match(tt.jsxTagStart) || this.isRelational("<"))

Someone might forget ts when fixing it in flowjs plugin.

@babel-bot
Copy link
Collaborator

babel-bot commented Jan 9, 2021

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/37154/

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jan 9, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit e2cd9d3:

Sandbox Source
babel-repl-custom-plugin Configuration
babel-plugin-multi-config Configuration

@Zzzen Zzzen marked this pull request as draft January 10, 2021 07:23
@Zzzen
Copy link
Contributor Author

Zzzen commented Jan 10, 2021

Does it mean that I should remove jsxIntrinsicElementsExtendsRecord.tsx from the allowlist file?

yarn node scripts/parser-tests/typescript
Now running tests...
.........................................................................................................
Testing complete (5291 tests).
Summary:
 ✔ 4452 valid programs parsed without error
 ✔ 401 invalid programs produced a parsing error
 ✔ 5 invalid programs did not produce a parsing error (and allowed by the allowlist file)
 ✔ 432 valid programs produced a parsing error (and allowed by the allowlist file)

 ✘ 1 valid programs parsed without error (in violation of the allowlist file)

Details:
   1 valid programs parsed without error (in violation of the allowlist file):
     jsxIntrinsicElementsExtendsRecord.tsx

@Zzzen Zzzen marked this pull request as ready for review January 10, 2021 07:44
@nicolo-ribaudo
Copy link
Member

Yes 👍 Or better, you can run make test-typescript-update-allowlist

@nicolo-ribaudo nicolo-ribaudo added area: typescript pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories labels Jan 10, 2021
@existentialism existentialism merged commit 6c9a481 into babel:main Jan 10, 2021
@existentialism
Copy link
Member

@Zzzen thanks!

@Topthinking
Copy link

@existentialism When will the new version of this change be released

@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 Apr 13, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue pkg: parser PR: Bug Fix 🐛 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

@babel/preset-typescript Error: Assert fail @babel/parser/src/plugins/typescript/index.js:53:11
5 participants