Skip to content

Bump typescript to ^4.8.2 #33031

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

Merged
merged 4 commits into from
Sep 5, 2022
Merged

Bump typescript to ^4.8.2 #33031

merged 4 commits into from
Sep 5, 2022

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 5, 2022

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
typescript (source) ^4.6.4 -> ^4.8.2 age adoption passing confidence

Configuration

📅 Schedule: Branch creation - "on sunday before 6:00am" in timezone UTC, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, click this checkbox. ⚠ Warning: custom changes will be lost.

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot added the dependencies Update of dependencies label Jun 5, 2022
@render
Copy link

render bot commented Jun 5, 2022

@mui-bot
Copy link

mui-bot commented Jun 5, 2022

No bundle size changes

Generated by 🚫 dangerJS against f86bf09

@renovate renovate bot force-pushed the renovate/typescript-4.x branch from 2b8febf to aca4ce1 Compare June 8, 2022 13:46
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jun 10, 2022
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Jun 21, 2022
@mnajdova
Copy link
Member

@michaldudak could you help out with this one? It currently fails on the @mui/base package check, but to be honest I have no idea what causes this:

@mui/base: D:\workspace\mui\node_modules\typescript\lib\tsc.js:96887
@mui/base:                 throw e;
@mui/base:                 ^
@mui/base: Error: Debug Failure. Expected [object Object] === [object Object]. Parameter symbol already has a cached type which differs from newly assigned type
@mui/base:     at assignParameterType (D:\workspace\mui\node_modules\typescript\lib\tsc.js:64861:26)
@mui/base:     at assignContextualParameterTypes (D:\workspace\mui\node_modules\typescript\lib\tsc.js:64826:21)
@mui/base:     at contextuallyCheckFunctionExpressionOrObjectLiteralMethod (D:\workspace\mui\node_modules\typescript\lib\tsc.js:65228:29)
@mui/base:     at checkFunctionExpressionOrObjectLiteralMethod (D:\workspace\mui\node_modules\typescript\lib\tsc.js:65207:13)
@mui/base:     at checkExpressionWorker (D:\workspace\mui\node_modules\typescript\lib\tsc.js:66804:28)
@mui/base:     at checkExpression (D:\workspace\mui\node_modules\typescript\lib\tsc.js:66706:38)
@mui/base:     at checkExpressionWithContextualType (D:\workspace\mui\node_modules\typescript\lib\tsc.js:66395:28)
@mui/base:     at inferTypeArguments (D:\workspace\mui\node_modules\typescript\lib\tsc.js:62905:39)
@mui/base:     at chooseOverload (D:\workspace\mui\node_modules\typescript\lib\tsc.js:63565:53)
@mui/base:     at resolveCall (D:\workspace\mui\node_modules\typescript\lib\tsc.js:63402:26)
@mui/base: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@mui/base: error Command failed with exit code 1.

I could find this related issue if it helps - microsoft/TypeScript#49383

@michaldudak
Copy link
Member

Sure, I'll take a look at it.

@michaldudak
Copy link
Member

I spent some time today trying to find statements that cause this error, so I can work around it, but I couldn't solve this.
I hope the corresponding TS issue will be fixed and it'll make our codebase buildable again. So far, I'm getting the same error with TS 4.8.0-beta

@mnajdova
Copy link
Member

Alright, let's wait then.

@mnajdova mnajdova added the on hold There is a blocker, we need to wait label Jun 23, 2022
@github-actions github-actions bot added the PR: out-of-date The pull request has merge conflicts and can't be merged label Jul 4, 2022
@michaldudak
Copy link
Member

Good news - TypeScript 4.8 RC does not show this error. Upgrading to it won't be effortless, though, as some checks are now more strict and our code fails in a couple of places (mostly in Base). I'll wait until it's stable before fixing the issues, though.

@renovate renovate bot force-pushed the renovate/typescript-4.x branch from d2f3b09 to ce3a752 Compare August 23, 2022 21:26
@renovate renovate bot changed the title Bump typescript to ^4.7.3 Bump typescript to ^4.7.4 Aug 23, 2022
@github-actions github-actions bot removed the PR: out-of-date The pull request has merge conflicts and can't be merged label Aug 23, 2022
@renovate renovate bot changed the title Bump typescript to ^4.7.4 Bump typescript to ^4.8.2 Aug 25, 2022
@renovate renovate bot force-pushed the renovate/typescript-4.x branch from ce3a752 to f274421 Compare August 25, 2022 23:23
@michaldudak
Copy link
Member

There were a couple of type changes needed due to breaking changes TypeScript 4.8 has introduced.
@siriwatknp and @mnajdova - you may want to review them as they touch the areas you own. I used my best judgment, but as I'm not very familiar with some parts of the code, feel free to correct me.

The good part is that the new TS is better at inferring types and it allowed us to remove some expect-errors from type tests.

@michaldudak michaldudak force-pushed the renovate/typescript-4.x branch from 2a505e4 to 8ef7f6c Compare September 2, 2022 09:54
@michaldudak michaldudak removed the on hold There is a blocker, we need to wait label Sep 2, 2022
@michaldudak michaldudak self-requested a review as a code owner September 2, 2022 11:01
Copy link
Member

@siriwatknp siriwatknp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me. I pushed one change that removed the casting with proper extends, please check the latest commit.

@michaldudak michaldudak merged commit 2cb9664 into master Sep 5, 2022
@michaldudak michaldudak deleted the renovate/typescript-4.x branch September 5, 2022 11:22
@michaldudak
Copy link
Member

michaldudak commented Sep 5, 2022

@mui/x, @mui/toolpad right after I hit "merge" I realized that you might also be affected by this change. Could you please check if it causes any issues on your side?

@flaviendelangle
Copy link
Member

It does break on our side but we'll fix to keep up to date with TS 👍

@Janpot
Copy link
Member

Janpot commented Sep 5, 2022

I see we have a few breaks on our end as well, but good incentive to update typescript on our side. Will fix asap.

@michaldudak
Copy link
Member

Sorry for such a late notice

@Janpot
Copy link
Member

Janpot commented Sep 5, 2022

Well, I just noticed our docs workspace was using typescript 3.8.3 😄

daniel-rabe pushed a commit to daniel-rabe/material-ui that referenced this pull request Nov 29, 2022
Co-authored-by: Michał Dudak <[email protected]>
Co-authored-by: siriwatknp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Update of dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants