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

[update-react-imports] fails to transform files that contain the satisfies keyword #324

Open
TkDodo opened this issue Sep 4, 2024 · 0 comments

Comments

@TkDodo
Copy link

TkDodo commented Sep 4, 2024

All TypeScript files that use satisfies - a rather new TS keyword - fail parsing with:

Error: did not recognize object of type "TSSatisfiesExpression"

for us, that's 375 files that I need to manually adjust now 😅

Stack Trace
Error: did not recognize object of type "TSSatisfiesExpression"
    at Object.getFieldNames (node_modules/ast-types/lib/types.js:660:19)
    at visitChildren (node_modules/ast-types/lib/path-visitor.js:184:36)
    at Visitor.PVp.visitWithoutReset (node_modules/ast-types/lib/path-visitor.js:166:20)
    at visitChildren (node_modules/ast-types/lib/path-visitor.js:203:25)
    at Visitor.PVp.visitWithoutReset (node_modules/ast-types/lib/path-visitor.js:166:20)
    at NodePath.each (node_modules/ast-types/lib/path.js:87:26)
    at visitChildren (node_modules/ast-types/lib/path-visitor.js:178:18)
    at Visitor.PVp.visitWithoutReset (node_modules/ast-types/lib/path-visitor.js:166:20)
    at visitChildren (node_modules/ast-types/lib/path-visitor.js:203:25)
    at Context.traverse (node_modules/ast-types/lib/path-visitor.js:317:20)
    at Context.visit (node_modules/jscodeshift/src/collections/Node.js:42:12)
    at Context.visitor.<computed> [as visitProgram] (node_modules/jscodeshift/src/collections/Node.js:50:24)
    at Context.invokeVisitorMethod (node_modules/ast-types/lib/path-visitor.js:282:51)
    at Visitor.PVp.visitWithoutReset (node_modules/ast-types/lib/path-visitor.js:157:32)
    at visitChildren (node_modules/ast-types/lib/path-visitor.js:203:25)
    at Visitor.PVp.visitWithoutReset (node_modules/ast-types/lib/path-visitor.js:166:20)
    at Visitor.PVp.visit (node_modules/ast-types/lib/path-visitor.js:104:29)
    at Object.visit (node_modules/ast-types/lib/path-visitor.js:80:55)
    at Collection.<anonymous> (node_modules/jscodeshift/src/collections/Node.js:53:14)
    at Array.forEach (<anonymous>)
    at Collection.find (node_modules/jscodeshift/src/collections/Node.js:44:18)
    at Collection.find (node_modules/jscodeshift/src/Collection.js:413:43)
    at getFirstNode (node_modules/react-codemod/transforms/update-react-imports.js:17:17)
    at module.exports (node_modules/react-codemod/transforms/update-react-imports.js:21:21)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant