-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Fix incomplete visitor keys #17019
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
Fix incomplete visitor keys #17019
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/58472 |
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.
Nice!
packages/babel-types/test/fields.js
Outdated
node[field].type && | ||
!( | ||
ignoredVisitorKeysCheckTypes[type] === true || | ||
ignoredVisitorKeysCheckTypes[type]?.[field] === true |
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.
ignoredVisitorKeysCheckTypes[type]?.[field] === true | |
(ignoredVisitorKeysCheckTypes[type] && ignoredVisitorKeysCheckTypes[type][field] === true) |
to fix ci
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.
Thanks! Didn't notice this comment when I pushed the same fix.
options
property of theTSImportType
.In this PR we ensure that for every AST node, its visitor keys always include the properties whose value is an AST node, with few exemptions. The new test detects quite a few incomplete visitor keys and they are now fixed in this PR.
This PR avoids builder changes so that it can be shipped in patch release. We can sync the builder with visitors in minor release.