Skip to content

Commit

Permalink
Bump typescript from ~5.0.4 to ~5.1.6 (#4576)
Browse files Browse the repository at this point in the history
## References

- Closes #4370 

## Changelog

```md
### Changed

- Upgrade TypeScript version to `~5.1.6` ([#4576](#4576))
```

## 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 highlighted breaking changes using the "BREAKING" category
above as appropriate
  • Loading branch information
MajorLift authored Aug 2, 2024
1 parent 60d055d commit d4702a2
Show file tree
Hide file tree
Showing 38 changed files with 83 additions and 83 deletions.
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.0.4",
"typescript": "~5.1.6",
"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.0.4"
"typescript": "~5.1.6"
},
"peerDependencies": {
"@metamask/keyring-controller": "^17.0.0",
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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4",
"typescript": "~5.1.6",
"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.0.4",
"typescript": "~5.1.6",
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"peerDependencies": {
"@metamask/approval-controller": "^7.0.0"
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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
8 changes: 4 additions & 4 deletions packages/rate-limit-controller/src/RateLimitController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ export class RateLimitController<
}
this.recordRequest(type, origin);

const implementation = this.implementations[type].method;
const implementation = this.implementations[type].method as (
...args: Parameters<RateLimitedApis[ApiType]['method']>
) => ReturnType<RateLimitedApis[ApiType]['method']>;

if (!implementation) {
throw new Error('Invalid api type');
}

return implementation(...args) as ReturnType<
RateLimitedApis[ApiType]['method']
>;
return implementation(...args);
}

/**
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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"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.0.4"
"typescript": "~5.1.6"
},
"engines": {
"node": "NODE_VERSIONS"
Expand Down
Loading

0 comments on commit d4702a2

Please sign in to comment.