-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[data grid] 7.0 migration script exception #12567
Comments
Hey @gvidaver could you tell us what the content of |
Looks like the codemod struggles with modern typescript constructs, like |
The reason migration on some of the recently introduced typescript constructs fails is the usage of the previous version of the We will try to have a workaround by pinning the dependencies to a previous version using yarn resolutions as suggested in facebook/jscodeshift#534 (comment) |
+1 |
I see. Personally, that issue feels less of a problem to me than the typescript one. It can be easily solved on my end by running my formatter after the MUI codemod. It's also not the only parentheses formatting problem with codemod. I ran into the following as well on the Toolpad codebase: const x = () => ({ foo: 'bar' }) as Foo; gets turned into const x = () => ({ foo: 'bar' } as Foo); |
The issue has been inactive for 7 days and has been automatically closed. |
Reproductions for both cases: import { GridColDef } from "@mui/x-data-grid";
// Transformation error (did not recognize object of type "TSSatisfiesExpression")
const cols = [] satisfies GridColDef[]; function makeBox<T>(value: T) {
return { value };
}
// Transformation error (did not recognize object of type "TSInstantiationExpression")
const makeStringBox = makeBox<string>;
const stringBox = makeStringBox("abc"); |
Agreed, perhaps the team could publish a canary with the upgrade on, that way those of us who use formatters can try the codemod and at least feed back on any other issues which come out the woodwork? Best case it works great alongside prettier and we can get upgraded! |
Morning @MBilalShafi @Janpot was there any progress on this? My team (Premium licences) is keen to upgrade, and can easily run prettier formatting afterwards, but the codemod crashing is a blocker as we have too many datagrids to migrate manually |
@gvidaver: How did we do? Your experience with our support team matters to us. If you have a moment, please share your thoughts in this short Support Satisfaction survey. |
Steps to reproduce
Link to live example: (required)
Gosh I wish I could give you a runnable example, but here's the log instead.
Steps:
Current behavior
Throws an exception while running migration script. Seems to complete otherwise though.
Expected behavior
No exception.
Context
Running 7.0 migration script.
Your environment
npx @mui/envinfo
Search keywords: TSInstantiationExpression
Order ID: c74f7af5c579dc47e7ed444056faa516Tz03NzAwMCxFPTE3MjkzNjI5NDQwMDAsUz1wcm8sTE09c3Vic2NyaXB0aW9uLEtWPTI=
The text was updated successfully, but these errors were encountered: