Skip to content

Commit 5f3ea3b

Browse files
authored
chore: Update typescript to v5.3 (#7081)
## Explanation Update TypeScript to v5.3. Changes: https://devblogs.microsoft.com/typescript/announcing-typescript-5-3 Only changes were to fix newly highlighted type errors or lint errors. ## References N/A ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Bumps TypeScript to v5.3.3 across the monorepo and updates ESLint config and minor code to satisfy new type/lint checks. > > - **Build/Tooling**: > - Upgrade `typescript` from `~5.2.2` to `~5.3.3` in root and all packages; update `yarn.lock` accordingly. > - ESLint: disable `@typescript-eslint/no-unnecessary-type-arguments` in `eslint.config.mjs` (with TODO comment). > - **Core Backend**: > - `core-backend/src/*`: annotate non-awaited traces/handlers with comments and ESLint disables (`no-floating-promises`, `no-misused-promises`). > - **Permissions**: > - `permission-controller/src/SubjectMetadataController.ts`: add `@ts-expect-error` on deep type instantiation; adjust `trimMetadataState` to return new state via `this.state`. > - **Samples**: > - `sample-controllers/sample-gas-prices-service.ts`: ensure `fromHex(chainId)` is stringified via `.toString()` when building query param. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 0bb70cd. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
1 parent 668663a commit 5f3ea3b

File tree

70 files changed

+159
-139
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+159
-139
lines changed

eslint.config.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ const config = createConfig([
133133
},
134134
],
135135

136+
// TODO: Disable in `eslint-config-typescript`, tracked here: https://github.com/MetaMask/eslint-config/issues/413
137+
'@typescript-eslint/no-unnecessary-type-arguments': 'off',
138+
136139
// This rule does not detect multiple imports of the same file where types
137140
// are being imported in one case and runtime values are being imported in
138141
// another

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@
101101
"semver": "^7.6.3",
102102
"simple-git-hooks": "^2.8.0",
103103
"tsx": "^4.20.5",
104-
"typescript": "~5.2.2",
104+
"typescript": "~5.3.3",
105105
"typescript-eslint": "^8.7.0",
106106
"yargs": "^17.7.2"
107107
},

packages/account-tree-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@
7474
"ts-jest": "^27.1.4",
7575
"typedoc": "^0.24.8",
7676
"typedoc-plugin-missing-exports": "^2.0.0",
77-
"typescript": "~5.2.2",
77+
"typescript": "~5.3.3",
7878
"webextension-polyfill": "^0.12.0"
7979
},
8080
"peerDependencies": {

packages/accounts-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
"ts-jest": "^27.1.4",
8080
"typedoc": "^0.24.8",
8181
"typedoc-plugin-missing-exports": "^2.0.0",
82-
"typescript": "~5.2.2",
82+
"typescript": "~5.3.3",
8383
"webextension-polyfill": "^0.12.0"
8484
},
8585
"peerDependencies": {

packages/address-book-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"ts-jest": "^27.1.4",
6363
"typedoc": "^0.24.8",
6464
"typedoc-plugin-missing-exports": "^2.0.0",
65-
"typescript": "~5.2.2"
65+
"typescript": "~5.3.3"
6666
},
6767
"engines": {
6868
"node": "^18.18 || >=20"

packages/analytics-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"ts-jest": "^27.1.4",
6363
"typedoc": "^0.24.8",
6464
"typedoc-plugin-missing-exports": "^2.0.0",
65-
"typescript": "~5.2.2"
65+
"typescript": "~5.3.3"
6666
},
6767
"engines": {
6868
"node": "^18.18 || >=20"

packages/announcement-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
"ts-jest": "^27.1.4",
6161
"typedoc": "^0.24.8",
6262
"typedoc-plugin-missing-exports": "^2.0.0",
63-
"typescript": "~5.2.2"
63+
"typescript": "~5.3.3"
6464
},
6565
"engines": {
6666
"node": "^18.18 || >=20"

packages/app-metadata-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"ts-jest": "^27.1.4",
6262
"typedoc": "^0.24.8",
6363
"typedoc-plugin-missing-exports": "^2.0.0",
64-
"typescript": "~5.2.2"
64+
"typescript": "~5.3.3"
6565
},
6666
"engines": {
6767
"node": "^18.18 || >=20"

packages/approval-controller/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"ts-jest": "^27.1.4",
6565
"typedoc": "^0.24.8",
6666
"typedoc-plugin-missing-exports": "^2.0.0",
67-
"typescript": "~5.2.2"
67+
"typescript": "~5.3.3"
6868
},
6969
"engines": {
7070
"node": "^18.18 || >=20"

packages/assets-controllers/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"ts-jest": "^27.1.4",
112112
"typedoc": "^0.24.8",
113113
"typedoc-plugin-missing-exports": "^2.0.0",
114-
"typescript": "~5.2.2",
114+
"typescript": "~5.3.3",
115115
"webextension-polyfill": "^0.12.0"
116116
},
117117
"peerDependencies": {

0 commit comments

Comments
 (0)