Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
32eeb22
Bump TypeScript from 5 to 6, and add TypeScript 7 side by side
Mrtenz Jul 15, 2026
74a0e5f
Patch `@typescript/old` to fix tsc/tsc6 binary resolution
Mrtenz Jul 15, 2026
9cecb2c
Remove `baseUrl` from all tsconfig files
Mrtenz Aug 26, 2026
58713b9
Use `${configDir}` in tsconfig path mappings
Mrtenz Aug 26, 2026
c95e510
Fix TS4094 errors in polling-controller mixins
Mrtenz Aug 26, 2026
4d89424
Use public underscore-prefixed fields instead of private fields in po…
Mrtenz Aug 26, 2026
50c26bd
Fix remaining build errors
Mrtenz Aug 26, 2026
48c7fd1
Add a script to clean the tsc lint cache, and fix local-node-utils types
Mrtenz Aug 27, 2026
75d3e9a
Ignore `@typescript/native` in wallet-framework-docs' knip check
Mrtenz Aug 27, 2026
b4eaddf
Fix imports broken by baseUrl removal
Mrtenz Aug 27, 2026
941e4a3
Remove type assertions made redundant by TypeScript 6/7's better narr…
Mrtenz Aug 27, 2026
a68cc71
Fix TypeScript errors in Jest tests
Mrtenz Aug 27, 2026
eb59804
Bump tstyche to fix an incompatibility with TypeScript 6
Mrtenz Aug 27, 2026
7c8fef1
More test fixes
Mrtenz Aug 27, 2026
f9ffbcf
Add missing `@typescript/native` to kyc-controller and money-account-…
Mrtenz Aug 27, 2026
e304fb8
Remove `baseUrl` from all tsconfig files
Mrtenz Aug 26, 2026
d49f800
Fix TS4094 errors in polling-controller mixins
Mrtenz Aug 26, 2026
7d6c717
Use public underscore-prefixed fields instead of private fields in po…
Mrtenz Aug 26, 2026
84400a2
Fix remaining build errors
Mrtenz Aug 26, 2026
15bc787
Restore comment in `ComposableController`
Mrtenz Aug 27, 2026
f1a3bfd
Add comments explaining `ts-expect-error` after TS7 bump
Mrtenz Aug 27, 2026
c925b0f
Change `@ts-expect-error` to `@ts-ignore`
Mrtenz Aug 28, 2026
399206b
Remove now unnecessary type assertions
Mrtenz Sep 2, 2026
f2b52e1
Revert TypeScript import change
Mrtenz Sep 3, 2026
8dc33f1
Fix messenger-cli coverage
Mrtenz Sep 3, 2026
3bdec3d
Remove now unused `@ts-expect-error`
Mrtenz Sep 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 15 additions & 0 deletions .yarn/patches/typescript-npm-6.0.3-585eecd158.patch

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I couldn't get tsc and tsc6 working without this patch. With this patch, the tsc and tsc6 executables work as expected.

➜ tsc -v 
Version 7.0.2

➜ tsc6 -v
Version 6.0.3

Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
diff --git a/package.json b/package.json
index 202f5f7353c0ba60756102dc03ca58cdcf4333c5..17d4e72004937d35c9b564584215969a36571c93 100644
--- a/package.json
+++ b/package.json
@@ -21,10 +21,6 @@
},
"main": "./lib/typescript.js",
"typings": "./lib/typescript.d.ts",
- "bin": {
- "tsc": "./bin/tsc",
- "tsserver": "./bin/tsserver"
- },
"engines": {
"node": ">=14.17"
},
1 change: 1 addition & 0 deletions jest.config.packages.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ module.exports = {
module: 'CommonJS',
moduleResolution: 'Node',
verbatimModuleSyntax: false,
ignoreDeprecations: '6.0',

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

moduleResolution: 'Node' is deprecated in TS6, and removed in TS7. I'm hoping we can switch to Vitest before that becomes a problem.

},
},
],
Expand Down
3 changes: 3 additions & 0 deletions knip.config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ const config: KnipConfig = {
// Webpack loader used by docusaurus' build pipeline; never imported
// by source.
'raw-loader',
// Not invoked by any script yet (this package builds via docusaurus,
// not `tsc`), kept for consistency with every other package.
'@typescript/native',
],
},
},
Expand Down
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
"lint:misc:check": "yarn lint:misc --check",
"lint:teams": "tsx scripts/lint-teams-json.ts",
"lint:tsc": "tsc --build tsconfig.lint.json",
"lint:tsc:clean": "yarn lint:tsc:only-clean && yarn lint:tsc",
"lint:tsc:only-clean": "rimraf -g 'packages/*/.tsc-lint-cache' '.tsc-lint-cache'",
"lint:tsconfigs": "tsx scripts/lint-tsconfigs/lint-tsconfigs.mts",
"lint:tsconfigs:all": "yarn workspaces foreach --all --parallel --interlaced --verbose run lint:tsconfigs",
"lint:tsconfigs:fix": "tsx scripts/lint-tsconfigs/lint-tsconfigs.mts --fix",
Expand Down Expand Up @@ -84,6 +86,7 @@
"@types/semver": "^7",
"@typescript-eslint/eslint-plugin": "^8.48.0",
"@typescript-eslint/parser": "^8.48.0",
"@typescript/native": "npm:typescript@^7.0.2",
"@yarnpkg/cli": "^4.17.1",
"@yarnpkg/core": "^4.9.0",
"@yarnpkg/fslib": "^3.1.5",
Expand Down Expand Up @@ -114,13 +117,14 @@
"simple-git-hooks": "^2.8.0",
"ts-jest": "^29.4.11",
"tsx": "^4.20.5",
"typescript": "~5.3.3",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"typescript-eslint": "^8.48.0",
"uuid": "^8.3.2",
"yargs": "^17.7.2"
},
"resolutions": {
"@nktkas/hyperliquid@npm:^0.33.1": "patch:@nktkas/hyperliquid@npm%3A0.33.1#~/.yarn/patches/@nktkas-hyperliquid-npm-0.33.1-6a541fdd1d.patch",
"@typescript/old": "patch:typescript@npm%3A6.0.3#~/.yarn/patches/typescript-npm-6.0.3-585eecd158.patch",
Comment thread
cursor[bot] marked this conversation as resolved.
Comment thread
FrederikBolding marked this conversation as resolved.
"elliptic@6.5.4": "^6.5.7",
"fast-xml-parser@^4.3.4": "^4.4.1",
"ws@7.4.6": "^7.5.10"
Expand All @@ -131,7 +135,7 @@
"engines": {
"node": "^22.14.0 || ^24"
},
"packageManager": "yarn@4.16.0+sha256.ba05224324578801b9cc98170d64aa50b9a36733b440fb0942306da3fbbdc7d1",
"packageManager": "yarn@4.17.1+sha256.471ffb15e0523663865bbf46a69e7d157ecf532412eb436c48dfab6e3f2abe88",
"lavamoat": {
"allowScripts": {
"$root$": true,
Expand Down
3 changes: 2 additions & 1 deletion packages/account-tree-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,15 @@
"@metamask/eth-hd-keyring": "^15.0.0",
"@metamask/providers": "^22.1.0",
"@types/jest": "^30.0.0",
"@typescript/native": "npm:typescript@^7.0.2",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

"deepmerge": "^4.2.2",
"jest": "^30.4.2",
"rimraf": "^5.0.5",
"ts-jest": "^29.4.11",
"tsx": "^4.20.5",
"typedoc": "^0.25.13",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"webextension-polyfill": "^0.12.0"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function getLocalEntropyWallets(
): AccountWalletEntropyObject[] {
return Object.values(context.controller.state.accountTree.wallets).filter(
(wallet) => wallet.type === AccountWalletType.Entropy,
) as AccountWalletEntropyObject[];
);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

TypeScript 6+ has better support for filter, so these type assertions are not necessary anymore.

}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ import {
} from '@metamask/keyring-api';
import { KeyringTypes } from '@metamask/keyring-controller';
import type { InternalAccount } from '@metamask/keyring-internal-api';
import type { AccountWalletEntropyObject } from 'src/wallet';

import {
getAccountTreeControllerMessenger,
getRootMessenger,
} from '../../tests/mockMessenger.js';
import type { AccountGroupObjectOf } from '../group.js';
import type { AccountWalletEntropyObject } from '../wallet.js';
import { EntropyRule } from './entropy.js';

const ETH_EOA_METHODS = [
Expand Down
25 changes: 18 additions & 7 deletions packages/account-tree-controller/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
{
"extends": "../../tsconfig.packages.build.json",
"compilerOptions": {
"baseUrl": "./",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

baseUrl was removed in TypeScript 7.

"outDir": "./dist",
"rootDir": "./src"
},
"references": [
{ "path": "../accounts-controller/tsconfig.build.json" },
{ "path": "../base-controller/tsconfig.build.json" },
{ "path": "../keyring-controller/tsconfig.build.json" },
{ "path": "../messenger/tsconfig.build.json" },
{ "path": "../multichain-account-service/tsconfig.build.json" },
{ "path": "../profile-sync-controller/tsconfig.build.json" }
{
"path": "../accounts-controller/tsconfig.build.json"
},
{
"path": "../base-controller/tsconfig.build.json"
},
{
"path": "../keyring-controller/tsconfig.build.json"
},
{
"path": "../messenger/tsconfig.build.json"
},
{
"path": "../multichain-account-service/tsconfig.build.json"
},
{
"path": "../profile-sync-controller/tsconfig.build.json"
}
],
"include": ["../../types", "./src"],
"exclude": ["**/*.test.ts", "**/jest.config.ts", "./src/state/tests"]
Expand Down
3 changes: 0 additions & 3 deletions packages/account-tree-controller/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"extends": "../../tsconfig.packages.json",
"compilerOptions": {
"baseUrl": "./"
},
"references": [
{
"path": "../base-controller"
Expand Down
3 changes: 2 additions & 1 deletion packages/accounts-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@
"@metamask/providers": "^22.1.0",
"@types/jest": "^30.0.0",
"@types/readable-stream": "^2.3.0",
"@typescript/native": "npm:typescript@^7.0.2",
"jest": "^30.4.2",
"rimraf": "^5.0.5",
"ts-jest": "^29.4.11",
"tsx": "^4.20.5",
"typedoc": "^0.25.13",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3",
"typescript": "npm:@typescript/typescript6@^6.0.2",
"webextension-polyfill": "^0.12.0"
},
"peerDependencies": {
Expand Down
1 change: 0 additions & 1 deletion packages/accounts-controller/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"extends": "../../tsconfig.packages.build.json",
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist",
"rootDir": "./src",
"skipLibCheck": true
Expand Down
3 changes: 0 additions & 3 deletions packages/accounts-controller/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"extends": "../../tsconfig.packages.json",
"compilerOptions": {
"baseUrl": "./"
},
"references": [
{
"path": "../base-controller"
Expand Down
3 changes: 2 additions & 1 deletion packages/address-book-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@
"devDependencies": {
"@metamask/auto-changelog": "^6.1.0",
"@types/jest": "^30.0.0",
"@typescript/native": "npm:typescript@^7.0.2",
"deepmerge": "^4.2.2",
"jest": "^30.4.2",
"rimraf": "^5.0.5",
"ts-jest": "^29.4.11",
"tsx": "^4.20.5",
"typedoc": "^0.25.13",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
"typescript": "npm:@typescript/typescript6@^6.0.2"
},
"engines": {
"node": "^22.14.0 || ^24"
Expand Down
13 changes: 9 additions & 4 deletions packages/address-book-controller/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{
"extends": "../../tsconfig.packages.build.json",
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist",
"rootDir": "./src"
},
"references": [
{ "path": "../base-controller/tsconfig.build.json" },
{ "path": "../controller-utils/tsconfig.build.json" },
{ "path": "../messenger/tsconfig.build.json" }
{
"path": "../base-controller/tsconfig.build.json"
},
{
"path": "../controller-utils/tsconfig.build.json"
},
{
"path": "../messenger/tsconfig.build.json"
}
],
"include": ["../../types", "./src"]
}
15 changes: 9 additions & 6 deletions packages/address-book-controller/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"extends": "../../tsconfig.packages.json",
"compilerOptions": {
"baseUrl": "./"
},
"references": [
{ "path": "../base-controller" },
{ "path": "../controller-utils" },
{ "path": "../messenger" }
{
"path": "../base-controller"
},
{
"path": "../controller-utils"
},
{
"path": "../messenger"
}
],
"include": ["../../types", "./src"]
}
3 changes: 2 additions & 1 deletion packages/ai-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,15 @@
"devDependencies": {
"@metamask/auto-changelog": "^6.1.0",
"@types/jest": "^30.0.0",
"@typescript/native": "npm:typescript@^7.0.2",
"deepmerge": "^4.2.2",
"jest": "^30.4.2",
"rimraf": "^5.0.5",
"ts-jest": "^29.4.11",
"tsx": "^4.20.5",
"typedoc": "^0.25.13",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
"typescript": "npm:@typescript/typescript6@^6.0.2"
},
"engines": {
"node": "^22.14.0 || ^24"
Expand Down
9 changes: 6 additions & 3 deletions packages/ai-controllers/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
{
"extends": "../../tsconfig.packages.build.json",
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist",
"rootDir": "./src"
},
"references": [
{ "path": "../base-controller/tsconfig.build.json" },
{ "path": "../messenger/tsconfig.build.json" }
{
"path": "../base-controller/tsconfig.build.json"
},
{
"path": "../messenger/tsconfig.build.json"
}
],
"include": ["../../types", "./src"]
}
12 changes: 8 additions & 4 deletions packages/ai-controllers/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{
"extends": "../../tsconfig.packages.json",
"compilerOptions": {
"baseUrl": "./"
},
"references": [{ "path": "../base-controller" }, { "path": "../messenger" }],
"references": [
{
"path": "../base-controller"
},
{
"path": "../messenger"
}
],
"include": ["../../types", "./src"]
}
3 changes: 2 additions & 1 deletion packages/analytics-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@
"@metamask/auto-changelog": "^6.1.0",
"@types/jest": "^30.0.0",
"@types/uuid": "^8.3.0",
"@typescript/native": "npm:typescript@^7.0.2",
"deepmerge": "^4.2.2",
"jest": "^30.4.2",
"rimraf": "^5.0.5",
"ts-jest": "^29.4.11",
"tsx": "^4.20.5",
"typedoc": "^0.25.13",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
"typescript": "npm:@typescript/typescript6@^6.0.2"
},
"engines": {
"node": "^22.14.0 || ^24"
Expand Down
13 changes: 9 additions & 4 deletions packages/analytics-controller/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
{
"extends": "../../tsconfig.packages.build.json",
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist",
"rootDir": "./src"
},
"references": [
{ "path": "../base-controller/tsconfig.build.json" },
{ "path": "../geolocation-controller/tsconfig.build.json" },
{ "path": "../messenger/tsconfig.build.json" }
{
"path": "../base-controller/tsconfig.build.json"
},
{
"path": "../geolocation-controller/tsconfig.build.json"
},
{
"path": "../messenger/tsconfig.build.json"
}
],
"include": ["../../types", "./src"]
}
15 changes: 9 additions & 6 deletions packages/analytics-controller/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"extends": "../../tsconfig.packages.json",
"compilerOptions": {
"baseUrl": "./"
},
"references": [
{ "path": "../base-controller" },
{ "path": "../geolocation-controller" },
{ "path": "../messenger" }
{
"path": "../base-controller"
},
{
"path": "../geolocation-controller"
},
{
"path": "../messenger"
}
],
"include": ["../../types", "./src"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"devDependencies": {
"@metamask/auto-changelog": "^6.1.0",
"@types/jest": "^30.0.0",
"@typescript/native": "npm:typescript@^7.0.2",
"deepmerge": "^4.2.2",
"jest": "^30.4.2",
"nock": "^13.3.1",
Expand All @@ -66,7 +67,7 @@
"tsx": "^4.20.5",
"typedoc": "^0.25.13",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
"typescript": "npm:@typescript/typescript6@^6.0.2"
},
"engines": {
"node": "^22.14.0 || ^24"
Expand Down
Loading
Loading