-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
4.9 regression for visitEachChild #51542
Labels
Bug
A bug in TypeScript
Domain: Transforms
Relates to the public transform API
Fix Available
A PR has been opened for this issue
Milestone
Comments
simllll
added a commit
to simllll/TypeScript-1
that referenced
this issue
Nov 15, 2022
DanielRosenwasser
added
Bug
A bug in TypeScript
Domain: Transforms
Relates to the public transform API
labels
Nov 15, 2022
rbuckton
pushed a commit
that referenced
this issue
Nov 15, 2022
This was referenced Nov 17, 2022
Closed
@rbuckton @DanielRosenwasser may I ask you that when the TS 4.9.4 patch being published? |
Should be out now. Thanks for the patience! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Bug
A bug in TypeScript
Domain: Transforms
Relates to the public transform API
Fix Available
A PR has been opened for this issue
Bug Report
🔎 Search Terms
visitEachChild, SourceFile
🕗 Version & Regression Information
💻 Code
I'm using ts-patch that allows me to apply a transformer, in this case I use https://github.com/kimamula/ts-transformer-keys.
What it does is that it traveres all nodes and does some simply modification on it, it stopped working on ts 4.9 though.
(see also nonara/ts-patch#81)
After digging into it, it touched all nodes in 4.8:
but in 4.9 it didn't go any further after the first node (stopped after
visitNode SourceFile
), so I was looking into related changes and found https://github.com/microsoft/TypeScript/pull/50266/files#diff-044e53f5c31ee19a4e3fca606c4b4ab8d5618ec9b740aa2e01960a8fbbad6eb2R1288If you compare the change with the preivous lines:
https://github.com/microsoft/TypeScript/pull/50266/files#diff-044e53f5c31ee19a4e3fca606c4b4ab8d5618ec9b740aa2e01960a8fbbad6eb2L1282
it turns out that visitLexicalEnvironment(node.statements, visitor, context, /start/ undefined, /ensureUseStrict/ undefined, nodesVisitor));
got some more parameters, especially the "nodesVisitor".
If I remove this paramter again, all things are working again! Therefore I assume this is a bug, but please double check my findings :)
🙁 Actual behavior
Not traversing the tree correctly.
🙂 Expected behavior
Should work like in ts 4.8
The text was updated successfully, but these errors were encountered: