-
-
Notifications
You must be signed in to change notification settings - Fork 222
Upgrade Babel parser to support Typescript 5.0 #788
Conversation
I tried using this upgraded dependency (via a yarn dependency resolution) and it seems to have completely broken TypeScript parsing on my project. I get a bunch of "TypeError: p is not iterable" errors as a result. It seems this was a previously documented issue (#688) and it was fixed in depcheck 1.4.3 by pinning @babel/parser to exactly 7.6.14. There's a related discussion here too (#687). TL;DR unfortunately it seems that upgrading @babel/parser to 7.21.3 re-introduces this problem :( |
Thanks for the comment. I will try to find the fundamental solution. |
Oh I see, that has been merged but not released yet. Thanks for double-checking, and apologies for the false alarm 😄 |
As a workaround, if you're using Yarn, you can both peg the resolved version of the Babel parser (a la #788 (comment)) and then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good for me.
Thanks for merging this @rumpl 🙏 |
I'm also waiting for this change to be released 🎉 thank you! |
Thank you for fixing this. Looking forward to the release 🙏. |
@rumpl thanks a lot for your efforts. |
This PR upgrades Babel parser to 7.21.3, which supports Typescript 5.0. As it is minor version upgrade, I would expect that there will be no breaking changes.
This will help checking the typescript files with new keywords, such as
satisfies
. Hence, this PR can fix #768To ensure the new syntex support, this PR also adds a simple function to the index.ts file in the test.