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

Bump typescript from ~5.2.2 to ~5.4.5 #4586

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"simple-git-hooks": "^2.8.0",
"ts-node": "^10.9.1",
"tsup": "^8.0.2",
"typescript": "~5.1.6",
"typescript": "~5.4.5",
"yargs": "^17.7.2"
},
"packageManager": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion packages/accounts-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/keyring-controller": "^17.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/accounts-controller/src/AccountsController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -444,8 +444,7 @@ export class AccountsController extends BaseController<
metadata: { ...account.metadata, ...metadata },
};
// Do not remove this comment - This error is flaky: Comment out or restore the `ts-expect-error` directive below as needed.
// See: https://github.com/MetaMask/utils/issues/168
// // @ts-expect-error Known issue - `Json` causes recursive error in immer `Draft`/`WritableDraft` types
// // @ts-expect-error - Known issue: `Json` causes recursive error in immer `Draft`/`WritableDraft` types (See: https://github.com/MetaMask/utils/issues/168)
currentState.internalAccounts.accounts[accountId] = internalAccount;
});
}
Expand Down
2 changes: 1 addition & 1 deletion packages/address-book-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/announcement-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/approval-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/assets-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/accounts-controller": "^18.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/base-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/build-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/chain-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/composable-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/controller-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/ens-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/network-controller": "^20.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/eth-json-rpc-provider/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"jest-it-up": "^2.0.2",
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/gas-fee-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/network-controller": "^20.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/json-rpc-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"jest-it-up": "^2.0.2",
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/json-rpc-middleware-stream/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6",
"typescript": "~5.4.5",
"webextension-polyfill-ts": "^0.26.0"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/keyring-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6",
"typescript": "~5.4.5",
"uuid": "^8.3.2"
},
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/logging-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/message-manager/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/name-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/network-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/notification-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/notification-services-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/keyring-controller": "^17.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/permission-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/approval-controller": "^7.0.0"
Expand Down
2 changes: 2 additions & 0 deletions packages/permission-controller/src/PermissionController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,8 @@ export class PermissionController<
);

if (caveatIndex === -1) {
// Do not remove this comment - This error is flaky: Comment out or restore the `ts-expect-error` directive below as needed.
// // @ts-expect-error - Known issue: `Json` causes recursive error in immer `Draft`/`WritableDraft` types (See: https://github.com/MetaMask/utils/issues/168)
permission.caveats.push(caveat);
} else {
permission.caveats.splice(caveatIndex, 1, caveat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ export class SubjectMetadataController extends BaseController<
*/
trimMetadataState(): void {
this.update((draftState) => {
// @ts-expect-error ts(2589)
// Do not remove this comment - This error is flaky: Comment out or restore the `ts-expect-error` directive below as needed.
// @ts-expect-error - Known issue: `Json` causes recursive error in immer `Draft`/`WritableDraft` types (See: https://github.com/MetaMask/utils/issues/168)
return SubjectMetadataController.getTrimmedState(
draftState,
this.subjectHasPermissions,
Expand Down
2 changes: 1 addition & 1 deletion packages/permission-log-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/phishing-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/polling-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/network-controller": "^20.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/preferences-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/keyring-controller": "^17.0.0"
Expand Down
2 changes: 1 addition & 1 deletion packages/profile-sync-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/keyring-controller": "^17.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/queued-request-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/network-controller": "^20.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/rate-limit-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
2 changes: 1 addition & 1 deletion packages/selected-network-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/network-controller": "^20.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/signature-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/approval-controller": "^7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/transaction-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@babel/runtime": "^7.23.9",
Expand Down
2 changes: 1 addition & 1 deletion packages/user-operation-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"peerDependencies": {
"@metamask/approval-controller": "^7.0.0",
Expand Down
2 changes: 1 addition & 1 deletion scripts/create-package/package-template/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.1.6"
"typescript": "~5.4.5"
},
"engines": {
"node": "NODE_VERSIONS"
Expand Down
Loading
Loading