Skip to content

Update typescript parser tests#17154

Merged
JLHwung merged 5 commits intobabel:mainfrom
JLHwung:update-typescript-parser-tests
Feb 27, 2025
Merged

Update typescript parser tests#17154
JLHwung merged 5 commits intobabel:mainfrom
JLHwung:update-typescript-parser-tests

Conversation

@JLHwung
Copy link
Copy Markdown
Contributor

@JLHwung JLHwung commented Feb 26, 2025

Q                       A
Fixed Issues? TSInstantiationExpression should not be allowed in LHS
Patch: Bug Fix? Yes
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

In this PR we update the typescript parser tests commit and fixed a parser bug. Previously the behaviour was changed in #16476, now it turns out that TS intentionally disallowed a.b<fn> as an LHS.

@JLHwung JLHwung added PR: Bug Fix 🐛 A type of pull request used for our changelog categories pkg: parser area: typescript labels Feb 26, 2025
@babel-bot
Copy link
Copy Markdown
Collaborator

babel-bot commented Feb 26, 2025

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

@JLHwung
Copy link
Copy Markdown
Contributor Author

JLHwung commented Feb 26, 2025

I think we should always align to the behaviour of the latest TS. If the impact of this change is concerning, we can ship in the next minor.

Copy link
Copy Markdown
Member

@nicolo-ribaudo nicolo-ribaudo left a comment

Choose a reason for hiding this comment

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

I'm fine with releasing this in a patch.

@JLHwung

This comment was marked as off-topic.

@JLHwung JLHwung merged commit 49a160e into babel:main Feb 27, 2025
@JLHwung JLHwung deleted the update-typescript-parser-tests branch February 27, 2025 18:25
laine-hallot pushed a commit to laine-hallot/uwu-parser that referenced this pull request Mar 31, 2025
* add some supported error codes

* update typescript commit

* fix(typescript): disallow TSInstantiationExpression in LHS

This commit essentially reverts babel#16476

* update error codes handling and allowlist

* remove invalid test
@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 May 30, 2025
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 30, 2025
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.

4 participants