From 57a722e10c39150ca140e3aff7f1bde76155860a Mon Sep 17 00:00:00 2001 From: Dovydas Stankevicius Date: Fri, 13 Sep 2024 16:55:25 +0100 Subject: [PATCH 1/7] fix: remove extra slash when constructing user storage url (#4702) ## Explanation This PR solves the bug of adding extra slash when user storage url is generated ## References ## Changelog ### `@metamask/profile-sync-controller` - **FIXED**: remove extra slash when constructing user storage url ## 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 --------- Co-authored-by: Mathieu Artu --- .../user-storage/__fixtures__/mockResponses.ts | 2 +- .../src/controllers/user-storage/schema.test.ts | 17 ++++++++++++++++- .../src/controllers/user-storage/schema.ts | 2 +- .../src/controllers/user-storage/services.ts | 4 ++-- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/packages/profile-sync-controller/src/controllers/user-storage/__fixtures__/mockResponses.ts b/packages/profile-sync-controller/src/controllers/user-storage/__fixtures__/mockResponses.ts index 3d252c6086..cfb16a7aee 100644 --- a/packages/profile-sync-controller/src/controllers/user-storage/__fixtures__/mockResponses.ts +++ b/packages/profile-sync-controller/src/controllers/user-storage/__fixtures__/mockResponses.ts @@ -27,7 +27,7 @@ export const getMockUserStorageEndpoint = ( return `${USER_STORAGE_ENDPOINT}/${path}`; } - return `${USER_STORAGE_ENDPOINT}${createEntryPath( + return `${USER_STORAGE_ENDPOINT}/${createEntryPath( path as UserStoragePathWithFeatureAndKey, MOCK_STORAGE_KEY, )}`; diff --git a/packages/profile-sync-controller/src/controllers/user-storage/schema.test.ts b/packages/profile-sync-controller/src/controllers/user-storage/schema.test.ts index 048ab93d6b..f5d0f965a2 100644 --- a/packages/profile-sync-controller/src/controllers/user-storage/schema.test.ts +++ b/packages/profile-sync-controller/src/controllers/user-storage/schema.test.ts @@ -1,10 +1,25 @@ -import { getFeatureAndKeyFromPath, USER_STORAGE_SCHEMA } from './schema'; +import { + createEntryPath, + getFeatureAndKeyFromPath, + USER_STORAGE_SCHEMA, +} from './schema'; // eslint-disable-next-line @typescript-eslint/no-explicit-any type ErroneousUserStoragePath = any; describe('user-storage/schema.ts', () => { describe('getFeatureAndKeyFromPath', () => { + it('should correctly construct user storage url', () => { + expect( + createEntryPath( + 'notifications.notificationSettings', + 'dbdc994804e591f7bef6695e525543712358dd5c952bd257560b629887972588', + ), + ).toBe( + 'notifications/2072257b71d53b6cb8e72bab8e801e3d66faa0d5e1b822c88af466127e5e763b', + ); + }); + it('should throw error if the feature.key format is incorrect', () => { const path = 'feature/key'; expect(() => diff --git a/packages/profile-sync-controller/src/controllers/user-storage/schema.ts b/packages/profile-sync-controller/src/controllers/user-storage/schema.ts index 888939cf3d..2c2f2a9ae6 100644 --- a/packages/profile-sync-controller/src/controllers/user-storage/schema.ts +++ b/packages/profile-sync-controller/src/controllers/user-storage/schema.ts @@ -93,5 +93,5 @@ export function createEntryPath( const { feature, key } = getFeatureAndKeyFromPath(path); const hashedKey = createSHA256Hash(key + storageKey); - return `/${feature}/${hashedKey}`; + return `${feature}/${hashedKey}`; } diff --git a/packages/profile-sync-controller/src/controllers/user-storage/services.ts b/packages/profile-sync-controller/src/controllers/user-storage/services.ts index c925f792e4..752c4f899a 100644 --- a/packages/profile-sync-controller/src/controllers/user-storage/services.ts +++ b/packages/profile-sync-controller/src/controllers/user-storage/services.ts @@ -58,7 +58,7 @@ export async function getUserStorage( const { bearerToken, path, storageKey, nativeScryptCrypto } = opts; const encryptedPath = createEntryPath(path, storageKey); - const url = new URL(`${USER_STORAGE_ENDPOINT}${encryptedPath}`); + const url = new URL(`${USER_STORAGE_ENDPOINT}/${encryptedPath}`); const userStorageResponse = await fetch(url.toString(), { headers: { @@ -172,7 +172,7 @@ export async function upsertUserStorage( nativeScryptCrypto, ); const encryptedPath = createEntryPath(path, storageKey); - const url = new URL(`${USER_STORAGE_ENDPOINT}${encryptedPath}`); + const url = new URL(`${USER_STORAGE_ENDPOINT}/${encryptedPath}`); const res = await fetch(url.toString(), { method: 'PUT', From 1d12f7e028a731f5d6caab39e6268822b5a144a8 Mon Sep 17 00:00:00 2001 From: Maarten Zuidhoorn Date: Mon, 16 Sep 2024 11:00:15 +0200 Subject: [PATCH 2/7] Replace `tsup` with `ts-bridge` (#4648) ## Explanation `ts-bridge` finally supports project references. In this PR, I've swapped out `tsup` for `ts-bridge` everywhere. ## References Related to MetaMask/metamask-module-template#247, MetaMask/utils#182. Closes #4333. ## 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 --- .yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch | 13 - docs/contributing.md | 2 +- package.json | 10 +- packages/accounts-controller/package.json | 17 +- .../accounts-controller/tsconfig.build.json | 2 +- packages/address-book-controller/package.json | 17 +- .../tsconfig.build.json | 2 +- packages/announcement-controller/package.json | 17 +- .../tsconfig.build.json | 2 +- packages/approval-controller/package.json | 17 +- .../approval-controller/tsconfig.build.json | 2 +- packages/assets-controllers/package.json | 17 +- .../assets-controllers/tsconfig.build.json | 2 +- packages/base-controller/package.json | 17 +- packages/base-controller/tsconfig.build.json | 2 +- packages/build-utils/package.json | 17 +- packages/build-utils/tsconfig.build.json | 2 +- packages/chain-controller/package.json | 17 +- packages/chain-controller/tsconfig.build.json | 2 +- packages/composable-controller/package.json | 17 +- .../composable-controller/tsconfig.build.json | 2 +- packages/controller-utils/package.json | 17 +- packages/controller-utils/tsconfig.build.json | 2 +- packages/ens-controller/package.json | 17 +- packages/ens-controller/src/EnsController.ts | 2 +- packages/ens-controller/tsconfig.build.json | 2 +- packages/eth-json-rpc-provider/package.json | 17 +- .../eth-json-rpc-provider/tsconfig.build.json | 2 +- packages/gas-fee-controller/package.json | 17 +- .../gas-fee-controller/tsconfig.build.json | 2 +- packages/json-rpc-engine/package.json | 17 +- packages/json-rpc-engine/tsconfig.build.json | 2 +- .../json-rpc-middleware-stream/package.json | 17 +- .../tsconfig.build.json | 2 +- packages/keyring-controller/package.json | 17 +- .../keyring-controller/tsconfig.build.json | 2 +- packages/logging-controller/package.json | 17 +- .../logging-controller/tsconfig.build.json | 2 +- packages/message-manager/package.json | 17 +- packages/message-manager/tsconfig.build.json | 2 +- packages/name-controller/package.json | 17 +- packages/name-controller/tsconfig.build.json | 2 +- packages/network-controller/package.json | 17 +- .../network-controller/tsconfig.build.json | 2 +- packages/notification-controller/package.json | 17 +- .../tsconfig.build.json | 2 +- .../package.json | 17 +- .../tsconfig.build.json | 2 +- packages/permission-controller/package.json | 17 +- .../permission-controller/tsconfig.build.json | 2 +- .../permission-log-controller/package.json | 17 +- .../tsconfig.build.json | 2 +- packages/phishing-controller/package.json | 17 +- .../src/PhishingController.ts | 2 +- .../phishing-controller/tsconfig.build.json | 2 +- packages/polling-controller/package.json | 17 +- .../polling-controller/tsconfig.build.json | 2 +- packages/preferences-controller/package.json | 17 +- .../tsconfig.build.json | 2 +- packages/profile-sync-controller/package.json | 17 +- .../tsconfig.build.json | 2 +- .../queued-request-controller/package.json | 17 +- .../tsconfig.build.json | 2 +- packages/rate-limit-controller/package.json | 17 +- .../rate-limit-controller/tsconfig.build.json | 2 +- .../selected-network-controller/package.json | 17 +- .../tsconfig.build.json | 2 +- packages/signature-controller/package.json | 17 +- .../signature-controller/tsconfig.build.json | 2 +- packages/transaction-controller/package.json | 17 +- .../tsconfig.build.json | 2 +- .../user-operation-controller/package.json | 17 +- .../tsconfig.build.json | 2 +- .../package-template/package.json | 2 +- .../package-template/tsconfig.build.json | 2 +- tsup.config.ts | 44 - yarn.config.cjs | 42 +- yarn.lock | 769 +----------------- 78 files changed, 487 insertions(+), 1047 deletions(-) delete mode 100644 .yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch delete mode 100644 tsup.config.ts diff --git a/.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch b/.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch deleted file mode 100644 index 2ac7512ab5..0000000000 --- a/.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/dist/index.js b/dist/index.js -index 4500c4e43c3bbd24aa60b7d4cf95aa3fee8eb185..9c442bc216f99b7cfadb5ac62cb98d3ae9ce2f56 100644 ---- a/dist/index.js -+++ b/dist/index.js -@@ -1813,6 +1813,8 @@ var cjsSplitting = () => { - } - const { transform: transform3 } = await Promise.resolve().then(() => require("sucrase")); - const result = transform3(code, { -+ // https://github.com/egoist/tsup/issues/1087 -+ disableESTransforms: true, - filePath: info.path, - transforms: ["imports"], - sourceMapOptions: this.options.sourcemap ? { diff --git a/docs/contributing.md b/docs/contributing.md index 10d46be69f..6539cd1a2d 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -60,7 +60,7 @@ If you have a project that depends on a package in this monorepo, you may want t If you're developing your project locally and want to test changes to a package, you can follow these steps: -1. First, you must build the monorepo. It's recommend to run `yarn build:watch` so that changes to the package you want to change are reflected in your project automatically. +1. First, you must build the monorepo, by running `yarn build`. 2. Next, you need to connect the package to your project by overriding the resolution logic in your package manager to replace the published version of the package with the local version. 1. Open `package.json` in the project and locate the dependency entry for the package. diff --git a/package.json b/package.json index d5a24d8cd3..1204adc78e 100644 --- a/package.json +++ b/package.json @@ -12,12 +12,10 @@ "packages/*" ], "scripts": { - "build": "yarn run build:source && yarn run build:types", + "build": "yarn ts-bridge --project tsconfig.build.json --verbose", "build:clean": "rimraf dist '**/*.tsbuildinfo' && yarn build", "build:docs": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run build:docs", - "build:source": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run build", "build:types": "tsc --build tsconfig.build.json --verbose", - "build:watch": "yarn run build --watch", "changelog:update": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:update", "changelog:validate": "yarn workspaces foreach --all --no-private --parallel --interlaced --verbose run changelog:validate", "create-package": "ts-node scripts/create-package", @@ -45,7 +43,6 @@ "resolutions": { "elliptic@6.5.4": "^6.5.7", "fast-xml-parser@^4.3.4": "^4.4.1", - "tsup@^8.0.2": "patch:tsup@npm%3A8.0.2#./.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch", "ws@7.4.6": "^7.5.10" }, "devDependencies": { @@ -62,6 +59,7 @@ "@metamask/eth-json-rpc-provider": "^4.1.3", "@metamask/json-rpc-engine": "^9.0.2", "@metamask/utils": "^9.1.0", + "@ts-bridge/cli": "^0.5.1", "@types/jest": "^27.4.1", "@types/lodash": "^4.14.191", "@types/node": "^16.18.54", @@ -93,7 +91,6 @@ "semver": "^7.6.3", "simple-git-hooks": "^2.8.0", "ts-node": "^10.9.1", - "tsup": "^8.0.2", "typescript": "~5.2.2", "yargs": "^17.7.2" }, @@ -106,8 +103,7 @@ "@lavamoat/preinstall-always-fail": false, "@keystonehq/bc-ur-registry-eth>hdkey>secp256k1": true, "babel-runtime>core-js": false, - "simple-git-hooks": false, - "tsup>esbuild": true + "simple-git-hooks": false } } } diff --git a/packages/accounts-controller/package.json b/packages/accounts-controller/package.json index ccc9e0c9a4..055d0c4350 100644 --- a/packages/accounts-controller/package.json +++ b/packages/accounts-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/accounts-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/accounts-controller", diff --git a/packages/accounts-controller/tsconfig.build.json b/packages/accounts-controller/tsconfig.build.json index 614e29021e..b4fbdd4821 100644 --- a/packages/accounts-controller/tsconfig.build.json +++ b/packages/accounts-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src", "skipLibCheck": true }, diff --git a/packages/address-book-controller/package.json b/packages/address-book-controller/package.json index f7fccf51fc..2f713ae047 100644 --- a/packages/address-book-controller/package.json +++ b/packages/address-book-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/address-book-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/address-book-controller", diff --git a/packages/address-book-controller/tsconfig.build.json b/packages/address-book-controller/tsconfig.build.json index cb31c4f3ae..bbfe057a20 100644 --- a/packages/address-book-controller/tsconfig.build.json +++ b/packages/address-book-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/announcement-controller/package.json b/packages/announcement-controller/package.json index 85b0135e43..375fe172be 100644 --- a/packages/announcement-controller/package.json +++ b/packages/announcement-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/announcement-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/announcement-controller", diff --git a/packages/announcement-controller/tsconfig.build.json b/packages/announcement-controller/tsconfig.build.json index 6782c18c44..e5fd7422b9 100644 --- a/packages/announcement-controller/tsconfig.build.json +++ b/packages/announcement-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [{ "path": "../base-controller/tsconfig.build.json" }], diff --git a/packages/approval-controller/package.json b/packages/approval-controller/package.json index bc7879c8e9..6e32df7289 100644 --- a/packages/approval-controller/package.json +++ b/packages/approval-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/approval-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/approval-controller", diff --git a/packages/approval-controller/tsconfig.build.json b/packages/approval-controller/tsconfig.build.json index e639919040..779d385a6a 100644 --- a/packages/approval-controller/tsconfig.build.json +++ b/packages/approval-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/assets-controllers/package.json b/packages/assets-controllers/package.json index 11e488cf0e..ca577634df 100644 --- a/packages/assets-controllers/package.json +++ b/packages/assets-controllers/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/assets-controllers", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/assets-controllers", diff --git a/packages/assets-controllers/tsconfig.build.json b/packages/assets-controllers/tsconfig.build.json index 608981bd68..5d38b99686 100644 --- a/packages/assets-controllers/tsconfig.build.json +++ b/packages/assets-controllers/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/base-controller/package.json b/packages/base-controller/package.json index fe99943014..0ea34b6c7f 100644 --- a/packages/base-controller/package.json +++ b/packages/base-controller/package.json @@ -17,19 +17,24 @@ "license": "MIT", "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/base-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/base-controller", diff --git a/packages/base-controller/tsconfig.build.json b/packages/base-controller/tsconfig.build.json index 2f6a1f4ef9..1d66e6732a 100644 --- a/packages/base-controller/tsconfig.build.json +++ b/packages/base-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/build-utils/package.json b/packages/build-utils/package.json index 57d02e1aca..16c96448bc 100644 --- a/packages/build-utils/package.json +++ b/packages/build-utils/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/build-utils", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/build-utils", diff --git a/packages/build-utils/tsconfig.build.json b/packages/build-utils/tsconfig.build.json index 2d590ce675..0df910b215 100644 --- a/packages/build-utils/tsconfig.build.json +++ b/packages/build-utils/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "include": ["../../types", "./src"] diff --git a/packages/chain-controller/package.json b/packages/chain-controller/package.json index 91c7eeef79..7fc3ce8b1f 100644 --- a/packages/chain-controller/package.json +++ b/packages/chain-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/chain-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/chain-controller", diff --git a/packages/chain-controller/tsconfig.build.json b/packages/chain-controller/tsconfig.build.json index 8d4cf54b4c..fe743f185a 100644 --- a/packages/chain-controller/tsconfig.build.json +++ b/packages/chain-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src", "skipLibCheck": true }, diff --git a/packages/composable-controller/package.json b/packages/composable-controller/package.json index 6ea7d3cc6f..38b7d4e6a1 100644 --- a/packages/composable-controller/package.json +++ b/packages/composable-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/composable-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/composable-controller", diff --git a/packages/composable-controller/tsconfig.build.json b/packages/composable-controller/tsconfig.build.json index e639919040..779d385a6a 100644 --- a/packages/composable-controller/tsconfig.build.json +++ b/packages/composable-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/controller-utils/package.json b/packages/controller-utils/package.json index 8cdfc9bae2..8a49973a2b 100644 --- a/packages/controller-utils/package.json +++ b/packages/controller-utils/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/controller-utils", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/controller-utils", diff --git a/packages/controller-utils/tsconfig.build.json b/packages/controller-utils/tsconfig.build.json index 2d590ce675..0df910b215 100644 --- a/packages/controller-utils/tsconfig.build.json +++ b/packages/controller-utils/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "include": ["../../types", "./src"] diff --git a/packages/ens-controller/package.json b/packages/ens-controller/package.json index 6c32dfad53..c16c5e7878 100644 --- a/packages/ens-controller/package.json +++ b/packages/ens-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/ens-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/ens-controller", diff --git a/packages/ens-controller/src/EnsController.ts b/packages/ens-controller/src/EnsController.ts index e3f4247ca8..dea2edfe5f 100644 --- a/packages/ens-controller/src/EnsController.ts +++ b/packages/ens-controller/src/EnsController.ts @@ -18,7 +18,7 @@ import type { } from '@metamask/network-controller'; import type { Hex } from '@metamask/utils'; import { createProjectLogger } from '@metamask/utils'; -import { toASCII } from 'punycode/'; +import { toASCII } from 'punycode/punycode.js'; const log = createProjectLogger('ens-controller'); diff --git a/packages/ens-controller/tsconfig.build.json b/packages/ens-controller/tsconfig.build.json index ebd72afc8e..ac0df4920c 100644 --- a/packages/ens-controller/tsconfig.build.json +++ b/packages/ens-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/eth-json-rpc-provider/package.json b/packages/eth-json-rpc-provider/package.json index 4299234253..fb771cc2f9 100644 --- a/packages/eth-json-rpc-provider/package.json +++ b/packages/eth-json-rpc-provider/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/eth-json-rpc-provider", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/eth-json-rpc-provider", diff --git a/packages/eth-json-rpc-provider/tsconfig.build.json b/packages/eth-json-rpc-provider/tsconfig.build.json index 962b5cb237..1c5f260cfd 100644 --- a/packages/eth-json-rpc-provider/tsconfig.build.json +++ b/packages/eth-json-rpc-provider/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [{ "path": "../json-rpc-engine/tsconfig.build.json" }], diff --git a/packages/gas-fee-controller/package.json b/packages/gas-fee-controller/package.json index ca7e306198..f7187b2128 100644 --- a/packages/gas-fee-controller/package.json +++ b/packages/gas-fee-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/gas-fee-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/gas-fee-controller", diff --git a/packages/gas-fee-controller/tsconfig.build.json b/packages/gas-fee-controller/tsconfig.build.json index 9482fd751a..0e520317bb 100644 --- a/packages/gas-fee-controller/tsconfig.build.json +++ b/packages/gas-fee-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/json-rpc-engine/package.json b/packages/json-rpc-engine/package.json index 4b8b148481..121dbd099c 100644 --- a/packages/json-rpc-engine/package.json +++ b/packages/json-rpc-engine/package.json @@ -18,14 +18,19 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "directories": { "test": "test" }, @@ -33,7 +38,7 @@ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/json-rpc-engine --tag-prefix-before-package-rename json-rpc-engine@ --version-before-package-rename 6.1.0", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/json-rpc-engine --tag-prefix-before-package-rename json-rpc-engine@ --version-before-package-rename 6.1.0", diff --git a/packages/json-rpc-engine/tsconfig.build.json b/packages/json-rpc-engine/tsconfig.build.json index 2d590ce675..0df910b215 100644 --- a/packages/json-rpc-engine/tsconfig.build.json +++ b/packages/json-rpc-engine/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "include": ["../../types", "./src"] diff --git a/packages/json-rpc-middleware-stream/package.json b/packages/json-rpc-middleware-stream/package.json index 8be3470b15..5c6a127d72 100644 --- a/packages/json-rpc-middleware-stream/package.json +++ b/packages/json-rpc-middleware-stream/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/json-rpc-middleware-stream --tag-prefix-before-package-rename json-rpc-middleware-stream@ --version-before-package-rename 5.0.1", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/json-rpc-middleware-stream --tag-prefix-before-package-rename json-rpc-middleware-stream@ --version-before-package-rename 5.0.1", diff --git a/packages/json-rpc-middleware-stream/tsconfig.build.json b/packages/json-rpc-middleware-stream/tsconfig.build.json index 962b5cb237..1c5f260cfd 100644 --- a/packages/json-rpc-middleware-stream/tsconfig.build.json +++ b/packages/json-rpc-middleware-stream/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [{ "path": "../json-rpc-engine/tsconfig.build.json" }], diff --git a/packages/keyring-controller/package.json b/packages/keyring-controller/package.json index f99c3b18ee..a58a90b87e 100644 --- a/packages/keyring-controller/package.json +++ b/packages/keyring-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/keyring-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/keyring-controller", diff --git a/packages/keyring-controller/tsconfig.build.json b/packages/keyring-controller/tsconfig.build.json index e65b74850b..38d8a31843 100644 --- a/packages/keyring-controller/tsconfig.build.json +++ b/packages/keyring-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/logging-controller/package.json b/packages/logging-controller/package.json index 3749ca89fd..d0c500cd24 100644 --- a/packages/logging-controller/package.json +++ b/packages/logging-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/logging-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/logging-controller", diff --git a/packages/logging-controller/tsconfig.build.json b/packages/logging-controller/tsconfig.build.json index cb31c4f3ae..bbfe057a20 100644 --- a/packages/logging-controller/tsconfig.build.json +++ b/packages/logging-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/message-manager/package.json b/packages/message-manager/package.json index 31adb92e91..c2c21458fb 100644 --- a/packages/message-manager/package.json +++ b/packages/message-manager/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/message-manager", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/message-manager", diff --git a/packages/message-manager/tsconfig.build.json b/packages/message-manager/tsconfig.build.json index cb31c4f3ae..bbfe057a20 100644 --- a/packages/message-manager/tsconfig.build.json +++ b/packages/message-manager/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/name-controller/package.json b/packages/name-controller/package.json index 3ec400aca2..e90c464d30 100644 --- a/packages/name-controller/package.json +++ b/packages/name-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/name-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/name-controller", diff --git a/packages/name-controller/tsconfig.build.json b/packages/name-controller/tsconfig.build.json index e639919040..779d385a6a 100644 --- a/packages/name-controller/tsconfig.build.json +++ b/packages/name-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/network-controller/package.json b/packages/network-controller/package.json index 4fd810705e..f4f65d6eef 100644 --- a/packages/network-controller/package.json +++ b/packages/network-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/network-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/network-controller", diff --git a/packages/network-controller/tsconfig.build.json b/packages/network-controller/tsconfig.build.json index e3b511dac3..c054df5ef3 100644 --- a/packages/network-controller/tsconfig.build.json +++ b/packages/network-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/notification-controller/package.json b/packages/notification-controller/package.json index 47df07eb8b..acae0afade 100644 --- a/packages/notification-controller/package.json +++ b/packages/notification-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/notification-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/notification-controller", diff --git a/packages/notification-controller/tsconfig.build.json b/packages/notification-controller/tsconfig.build.json index 6782c18c44..e5fd7422b9 100644 --- a/packages/notification-controller/tsconfig.build.json +++ b/packages/notification-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [{ "path": "../base-controller/tsconfig.build.json" }], diff --git a/packages/notification-services-controller/package.json b/packages/notification-services-controller/package.json index c6e7d0b2ae..47521ffe04 100644 --- a/packages/notification-services-controller/package.json +++ b/packages/notification-services-controller/package.json @@ -18,9 +18,14 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./notification-services": { "import": "./dist/NotificationServicesController/index.mjs", @@ -49,15 +54,15 @@ }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/", "notification-services/", "push-services/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/notification-services-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/notification-services-controller", diff --git a/packages/notification-services-controller/tsconfig.build.json b/packages/notification-services-controller/tsconfig.build.json index 9fb62dca38..797f4a6831 100644 --- a/packages/notification-services-controller/tsconfig.build.json +++ b/packages/notification-services-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src", "skipLibCheck": true }, diff --git a/packages/permission-controller/package.json b/packages/permission-controller/package.json index 422a7d0260..3c462cc9d6 100644 --- a/packages/permission-controller/package.json +++ b/packages/permission-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/permission-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/permission-controller", diff --git a/packages/permission-controller/tsconfig.build.json b/packages/permission-controller/tsconfig.build.json index d1fe1b94a9..5034efd3f1 100644 --- a/packages/permission-controller/tsconfig.build.json +++ b/packages/permission-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/permission-log-controller/package.json b/packages/permission-log-controller/package.json index 9edccfb1fd..0b9e936ed0 100644 --- a/packages/permission-log-controller/package.json +++ b/packages/permission-log-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/permission-log-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/permission-log-controller", diff --git a/packages/permission-log-controller/tsconfig.build.json b/packages/permission-log-controller/tsconfig.build.json index df2ad7ee42..5c05375f6f 100644 --- a/packages/permission-log-controller/tsconfig.build.json +++ b/packages/permission-log-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/phishing-controller/package.json b/packages/phishing-controller/package.json index 71b7f64f84..28947ff1ec 100644 --- a/packages/phishing-controller/package.json +++ b/packages/phishing-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/phishing-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/phishing-controller", diff --git a/packages/phishing-controller/src/PhishingController.ts b/packages/phishing-controller/src/PhishingController.ts index 19a81f3863..6b46725515 100644 --- a/packages/phishing-controller/src/PhishingController.ts +++ b/packages/phishing-controller/src/PhishingController.ts @@ -5,7 +5,7 @@ import type { } from '@metamask/base-controller'; import { BaseController } from '@metamask/base-controller'; import { safelyExecute } from '@metamask/controller-utils'; -import { toASCII } from 'punycode/'; +import { toASCII } from 'punycode/punycode.js'; import { PhishingDetector } from './PhishingDetector'; import { diff --git a/packages/phishing-controller/tsconfig.build.json b/packages/phishing-controller/tsconfig.build.json index cb31c4f3ae..bbfe057a20 100644 --- a/packages/phishing-controller/tsconfig.build.json +++ b/packages/phishing-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/polling-controller/package.json b/packages/polling-controller/package.json index 05b67ef5ea..503bd198db 100644 --- a/packages/polling-controller/package.json +++ b/packages/polling-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/polling-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/polling-controller", diff --git a/packages/polling-controller/tsconfig.build.json b/packages/polling-controller/tsconfig.build.json index ebd72afc8e..ac0df4920c 100644 --- a/packages/polling-controller/tsconfig.build.json +++ b/packages/polling-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/preferences-controller/package.json b/packages/preferences-controller/package.json index 136a211440..a14cd0edbe 100644 --- a/packages/preferences-controller/package.json +++ b/packages/preferences-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/preferences-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/preferences-controller", diff --git a/packages/preferences-controller/tsconfig.build.json b/packages/preferences-controller/tsconfig.build.json index f59d499305..6a7f4f10ac 100644 --- a/packages/preferences-controller/tsconfig.build.json +++ b/packages/preferences-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/profile-sync-controller/package.json b/packages/profile-sync-controller/package.json index df50f5983d..c218ef2bea 100644 --- a/packages/profile-sync-controller/package.json +++ b/packages/profile-sync-controller/package.json @@ -18,9 +18,14 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./sdk": { "import": "./dist/sdk/index.mjs", @@ -49,15 +54,15 @@ }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/", "auth/", "user-storage/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/profile-sync-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/profile-sync-controller", diff --git a/packages/profile-sync-controller/tsconfig.build.json b/packages/profile-sync-controller/tsconfig.build.json index 14d9783526..392b190466 100644 --- a/packages/profile-sync-controller/tsconfig.build.json +++ b/packages/profile-sync-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src", "skipLibCheck": true }, diff --git a/packages/queued-request-controller/package.json b/packages/queued-request-controller/package.json index effd062ead..174e2a0830 100644 --- a/packages/queued-request-controller/package.json +++ b/packages/queued-request-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/queued-request-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/queued-request-controller", diff --git a/packages/queued-request-controller/tsconfig.build.json b/packages/queued-request-controller/tsconfig.build.json index 8f665a6ac3..8d2191dca8 100644 --- a/packages/queued-request-controller/tsconfig.build.json +++ b/packages/queued-request-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/rate-limit-controller/package.json b/packages/rate-limit-controller/package.json index fcd6932475..f653dc3f1d 100644 --- a/packages/rate-limit-controller/package.json +++ b/packages/rate-limit-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/rate-limit-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/rate-limit-controller", diff --git a/packages/rate-limit-controller/tsconfig.build.json b/packages/rate-limit-controller/tsconfig.build.json index 6782c18c44..e5fd7422b9 100644 --- a/packages/rate-limit-controller/tsconfig.build.json +++ b/packages/rate-limit-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [{ "path": "../base-controller/tsconfig.build.json" }], diff --git a/packages/selected-network-controller/package.json b/packages/selected-network-controller/package.json index 6c761ce3e5..cd344c8dc8 100644 --- a/packages/selected-network-controller/package.json +++ b/packages/selected-network-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/selected-network-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/selected-network-controller", diff --git a/packages/selected-network-controller/tsconfig.build.json b/packages/selected-network-controller/tsconfig.build.json index 12ee8dbefc..0113f47641 100644 --- a/packages/selected-network-controller/tsconfig.build.json +++ b/packages/selected-network-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/signature-controller/package.json b/packages/signature-controller/package.json index 24fc38ac63..1d4f96884d 100644 --- a/packages/signature-controller/package.json +++ b/packages/signature-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/signature-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/signature-controller", diff --git a/packages/signature-controller/tsconfig.build.json b/packages/signature-controller/tsconfig.build.json index 4134c92aa6..1c2dc43957 100644 --- a/packages/signature-controller/tsconfig.build.json +++ b/packages/signature-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/transaction-controller/package.json b/packages/transaction-controller/package.json index e97de4d80a..d7d06f6ed3 100644 --- a/packages/transaction-controller/package.json +++ b/packages/transaction-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/transaction-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/transaction-controller", diff --git a/packages/transaction-controller/tsconfig.build.json b/packages/transaction-controller/tsconfig.build.json index 648111f91b..97b770701d 100644 --- a/packages/transaction-controller/tsconfig.build.json +++ b/packages/transaction-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/packages/user-operation-controller/package.json b/packages/user-operation-controller/package.json index 74ac518005..ff16cb03bd 100644 --- a/packages/user-operation-controller/package.json +++ b/packages/user-operation-controller/package.json @@ -18,19 +18,24 @@ "sideEffects": false, "exports": { ".": { - "import": "./dist/index.mjs", - "require": "./dist/index.js", - "types": "./dist/types/index.d.ts" + "import": { + "types": "./dist/index.d.mts", + "default": "./dist/index.mjs" + }, + "require": { + "types": "./dist/index.d.cts", + "default": "./dist/index.cjs" + } }, "./package.json": "./package.json" }, - "main": "./dist/index.js", - "types": "./dist/types/index.d.ts", + "main": "./dist/index.cjs", + "types": "./dist/index.d.cts", "files": [ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:update": "../../scripts/update-changelog.sh @metamask/user-operation-controller", "changelog:validate": "../../scripts/validate-changelog.sh @metamask/user-operation-controller", diff --git a/packages/user-operation-controller/tsconfig.build.json b/packages/user-operation-controller/tsconfig.build.json index 7dc8d52096..4c886f75e4 100644 --- a/packages/user-operation-controller/tsconfig.build.json +++ b/packages/user-operation-controller/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [ diff --git a/scripts/create-package/package-template/package.json b/scripts/create-package/package-template/package.json index 002fbfb245..25964a0a28 100644 --- a/scripts/create-package/package-template/package.json +++ b/scripts/create-package/package-template/package.json @@ -30,7 +30,7 @@ "dist/" ], "scripts": { - "build": "tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean", + "build": "ts-bridge --project tsconfig.build.json --verbose --clean --no-references", "build:docs": "typedoc", "changelog:validate": "../../scripts/validate-changelog.sh PACKAGE_NAME", "publish:preview": "yarn npm publish --tag preview", diff --git a/scripts/create-package/package-template/tsconfig.build.json b/scripts/create-package/package-template/tsconfig.build.json index ff5a1ceaf8..02a0eea03f 100644 --- a/scripts/create-package/package-template/tsconfig.build.json +++ b/scripts/create-package/package-template/tsconfig.build.json @@ -2,7 +2,7 @@ "extends": "../../tsconfig.packages.build.json", "compilerOptions": { "baseUrl": "./", - "outDir": "./dist/types", + "outDir": "./dist", "rootDir": "./src" }, "references": [], diff --git a/tsup.config.ts b/tsup.config.ts deleted file mode 100644 index dc95a1baf1..0000000000 --- a/tsup.config.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { builtinModules } from 'module'; -import type { Options } from 'tsup'; - -const config: Options = { - // Clean the dist folder before bundling. - clean: true, - - // The entry to bundle. - entry: [ - 'src/**/*.ts', - '!src/**/__fixtures__/**/*', - '!src/**/__mocks__/**/*', - '!src/**/__test__/**/*', - '!src/**/__tests__/**/*', - '!src/**/__snapshots__/**/*', - '!src/**/test-utils/**/*', - '!src/**/*.test.ts', - '!src/**/*.test-d.ts', - '!src/**/*.test.*.ts', - ], - - // External modules that should not be processed by `tsup`. We want to - // exclude built-in Node.js modules from the bundle. - // https://tsup.egoist.dev/#excluding-packages - external: builtinModules, - - // The output formats. We want to generate both CommonJS and ESM bundles. - // https://tsup.egoist.dev/#bundle-formats - format: ['cjs', 'esm'], - - // The platform to target when generating the bundles. `neutral` means that - // the bundles will work in both Node.js and browsers. - platform: 'neutral', - - // Generate sourcemaps as separate files. - // https://tsup.egoist.dev/#generate-sourcemap-file - sourcemap: true, - - // Split the output into chunks. This is useful for tree-shaking. - // https://tsup.egoist.dev/#code-splitting - splitting: true, -}; - -export default config; diff --git a/yarn.config.cjs b/yarn.config.cjs index 6ca1b0ccfb..a2e0428f09 100644 --- a/yarn.config.cjs +++ b/yarn.config.cjs @@ -101,7 +101,7 @@ module.exports = defineConfig({ expectWorkspaceField( workspace, 'scripts.build', - 'tsup --config ../../tsup.config.ts --tsconfig ./tsconfig.build.json --clean', + 'ts-bridge --project tsconfig.build.json --verbose --clean --no-references', ); // All non-root packages must have the same "build:docs" script. @@ -379,9 +379,14 @@ async function workspaceFileExists(workspace, path) { function expectWorkspaceField(workspace, fieldName, expectedValue = undefined) { const fieldValue = get(workspace.manifest, fieldName); - if (expectedValue) { + if (expectedValue !== undefined && expectedValue !== null) { workspace.set(fieldName, expectedValue); - } else if (fieldValue === undefined || fieldValue === null) { + } else if (expectedValue === null) { + workspace.unset(fieldName); + } else if ( + expectedValue === undefined && + (fieldValue === undefined || fieldValue === null) + ) { workspace.error(`Missing required field "${fieldName}".`); } } @@ -488,20 +493,35 @@ async function expectWorkspaceLicense(workspace) { function expectCorrectWorkspaceExports(workspace) { // All non-root packages must provide the location of the ESM-compatible // JavaScript entrypoint and its matching type declaration file. - expectWorkspaceField(workspace, 'exports["."].import', './dist/index.mjs'); expectWorkspaceField( workspace, - 'exports["."].types', - './dist/types/index.d.ts', + 'exports["."].import.types', + './dist/index.d.mts', + ); + expectWorkspaceField( + workspace, + 'exports["."].import.default', + './dist/index.mjs', ); - // TODO: This was copied from the module template: enable when ready - // expectWorkspaceField(workspace, 'module', './dist/index.mjs'); // All non-root package must provide the location of the CommonJS-compatible // entrypoint and its matching type declaration file. - expectWorkspaceField(workspace, 'exports["."].require', './dist/index.js'); - expectWorkspaceField(workspace, 'main', './dist/index.js'); - expectWorkspaceField(workspace, 'types', './dist/types/index.d.ts'); + expectWorkspaceField( + workspace, + 'exports["."].require.types', + './dist/index.d.cts', + ); + expectWorkspaceField( + workspace, + 'exports["."].require.default', + './dist/index.cjs', + ); + expectWorkspaceField(workspace, 'main', './dist/index.cjs'); + expectWorkspaceField(workspace, 'types', './dist/index.d.cts'); + + // Types should not be set in the export object directly, but rather in the + // `import` and `require` subfields. + expectWorkspaceField(workspace, 'exports["."].types', null); // All non-root packages must export a `package.json` file. expectWorkspaceField( diff --git a/yarn.lock b/yarn.lock index f82406b1cc..718f28cb77 100644 --- a/yarn.lock +++ b/yarn.lock @@ -596,167 +596,6 @@ __metadata: languageName: node linkType: hard -"@esbuild/aix-ppc64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/aix-ppc64@npm:0.19.12" - conditions: os=aix & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/android-arm64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/android-arm64@npm:0.19.12" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/android-arm@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/android-arm@npm:0.19.12" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@esbuild/android-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/android-x64@npm:0.19.12" - conditions: os=android & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/darwin-arm64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/darwin-arm64@npm:0.19.12" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/darwin-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/darwin-x64@npm:0.19.12" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/freebsd-arm64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/freebsd-arm64@npm:0.19.12" - conditions: os=freebsd & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/freebsd-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/freebsd-x64@npm:0.19.12" - conditions: os=freebsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/linux-arm64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-arm64@npm:0.19.12" - conditions: os=linux & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/linux-arm@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-arm@npm:0.19.12" - conditions: os=linux & cpu=arm - languageName: node - linkType: hard - -"@esbuild/linux-ia32@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-ia32@npm:0.19.12" - conditions: os=linux & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/linux-loong64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-loong64@npm:0.19.12" - conditions: os=linux & cpu=loong64 - languageName: node - linkType: hard - -"@esbuild/linux-mips64el@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-mips64el@npm:0.19.12" - conditions: os=linux & cpu=mips64el - languageName: node - linkType: hard - -"@esbuild/linux-ppc64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-ppc64@npm:0.19.12" - conditions: os=linux & cpu=ppc64 - languageName: node - linkType: hard - -"@esbuild/linux-riscv64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-riscv64@npm:0.19.12" - conditions: os=linux & cpu=riscv64 - languageName: node - linkType: hard - -"@esbuild/linux-s390x@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-s390x@npm:0.19.12" - conditions: os=linux & cpu=s390x - languageName: node - linkType: hard - -"@esbuild/linux-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/linux-x64@npm:0.19.12" - conditions: os=linux & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/netbsd-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/netbsd-x64@npm:0.19.12" - conditions: os=netbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/openbsd-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/openbsd-x64@npm:0.19.12" - conditions: os=openbsd & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/sunos-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/sunos-x64@npm:0.19.12" - conditions: os=sunos & cpu=x64 - languageName: node - linkType: hard - -"@esbuild/win32-arm64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/win32-arm64@npm:0.19.12" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@esbuild/win32-ia32@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/win32-ia32@npm:0.19.12" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@esbuild/win32-x64@npm:0.19.12": - version: 0.19.12 - resolution: "@esbuild/win32-x64@npm:0.19.12" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@eslint-community/eslint-utils@npm:^4.2.0": version: 4.4.0 resolution: "@eslint-community/eslint-utils@npm:4.4.0" @@ -2033,7 +1872,7 @@ __metadata: languageName: node linkType: hard -"@jridgewell/gen-mapping@npm:^0.3.2, @jridgewell/gen-mapping@npm:^0.3.5": +"@jridgewell/gen-mapping@npm:^0.3.5": version: 0.3.5 resolution: "@jridgewell/gen-mapping@npm:0.3.5" dependencies: @@ -2530,6 +2369,7 @@ __metadata: "@metamask/eth-json-rpc-provider": "npm:^4.1.3" "@metamask/json-rpc-engine": "npm:^9.0.2" "@metamask/utils": "npm:^9.1.0" + "@ts-bridge/cli": "npm:^0.5.1" "@types/jest": "npm:^27.4.1" "@types/lodash": "npm:^4.14.191" "@types/node": "npm:^16.18.54" @@ -2561,7 +2401,6 @@ __metadata: semver: "npm:^7.6.3" simple-git-hooks: "npm:^2.8.0" ts-node: "npm:^10.9.1" - tsup: "npm:^8.0.2" typescript: "npm:~5.2.2" yargs: "npm:^17.7.2" languageName: unknown @@ -4177,118 +4016,6 @@ __metadata: languageName: node linkType: hard -"@rollup/rollup-android-arm-eabi@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-android-arm-eabi@npm:4.21.0" - conditions: os=android & cpu=arm - languageName: node - linkType: hard - -"@rollup/rollup-android-arm64@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-android-arm64@npm:4.21.0" - conditions: os=android & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-darwin-arm64@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-darwin-arm64@npm:4.21.0" - conditions: os=darwin & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-darwin-x64@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-darwin-x64@npm:4.21.0" - conditions: os=darwin & cpu=x64 - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm-gnueabihf@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-arm-gnueabihf@npm:4.21.0" - conditions: os=linux & cpu=arm & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm-musleabihf@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-arm-musleabihf@npm:4.21.0" - conditions: os=linux & cpu=arm & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm64-gnu@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-arm64-gnu@npm:4.21.0" - conditions: os=linux & cpu=arm64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-arm64-musl@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-arm64-musl@npm:4.21.0" - conditions: os=linux & cpu=arm64 & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-linux-powerpc64le-gnu@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-powerpc64le-gnu@npm:4.21.0" - conditions: os=linux & cpu=ppc64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-riscv64-gnu@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-riscv64-gnu@npm:4.21.0" - conditions: os=linux & cpu=riscv64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-s390x-gnu@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-s390x-gnu@npm:4.21.0" - conditions: os=linux & cpu=s390x & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-x64-gnu@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-x64-gnu@npm:4.21.0" - conditions: os=linux & cpu=x64 & libc=glibc - languageName: node - linkType: hard - -"@rollup/rollup-linux-x64-musl@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-linux-x64-musl@npm:4.21.0" - conditions: os=linux & cpu=x64 & libc=musl - languageName: node - linkType: hard - -"@rollup/rollup-win32-arm64-msvc@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-win32-arm64-msvc@npm:4.21.0" - conditions: os=win32 & cpu=arm64 - languageName: node - linkType: hard - -"@rollup/rollup-win32-ia32-msvc@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-win32-ia32-msvc@npm:4.21.0" - conditions: os=win32 & cpu=ia32 - languageName: node - linkType: hard - -"@rollup/rollup-win32-x64-msvc@npm:4.21.0": - version: 4.21.0 - resolution: "@rollup/rollup-win32-x64-msvc@npm:4.21.0" - conditions: os=win32 & cpu=x64 - languageName: node - linkType: hard - "@scure/base@npm:^1.0.0, @scure/base@npm:^1.1.1, @scure/base@npm:^1.1.3, @scure/base@npm:~1.1.3, @scure/base@npm:~1.1.6": version: 1.1.7 resolution: "@scure/base@npm:1.1.7" @@ -4433,6 +4160,30 @@ __metadata: languageName: node linkType: hard +"@ts-bridge/cli@npm:^0.5.1": + version: 0.5.1 + resolution: "@ts-bridge/cli@npm:0.5.1" + dependencies: + "@ts-bridge/resolver": "npm:^0.1.2" + chalk: "npm:^5.3.0" + cjs-module-lexer: "npm:^1.3.1" + yargs: "npm:^17.7.2" + peerDependencies: + typescript: ">=4.8.0" + bin: + ts-bridge: ./dist/index.js + tsbridge: ./dist/index.js + checksum: 10/691abe737617597c6ec0a296a67eedf47fc93cc2682658970326ad8f5c63376f987ee92502191ed3e81e917515d101bab7ca83f06b3b489449c3b674356cc306 + languageName: node + linkType: hard + +"@ts-bridge/resolver@npm:^0.1.2": + version: 0.1.2 + resolution: "@ts-bridge/resolver@npm:0.1.2" + checksum: 10/4126154e0344f4fdf35612f65d4459e993dcf914fe765ce95d8237a6ccb85e092bd31a6d31765cc24c0280a0e243ed2385f8b355d7fb13ba7c36e95e3caf1613 + languageName: node + linkType: hard + "@tsconfig/node10@npm:^1.0.7": version: 1.0.11 resolution: "@tsconfig/node10@npm:1.0.11" @@ -4537,7 +4288,7 @@ __metadata: languageName: node linkType: hard -"@types/estree@npm:*, @types/estree@npm:1.0.5": +"@types/estree@npm:*": version: 1.0.5 resolution: "@types/estree@npm:1.0.5" checksum: 10/7de6d928dd4010b0e20c6919e1a6c27b61f8d4567befa89252055fad503d587ecb9a1e3eab1b1901f923964d7019796db810b7fd6430acb26c32866d126fd408 @@ -5229,14 +4980,7 @@ __metadata: languageName: node linkType: hard -"any-promise@npm:^1.0.0": - version: 1.3.0 - resolution: "any-promise@npm:1.3.0" - checksum: 10/6737469ba353b5becf29e4dc3680736b9caa06d300bda6548812a8fee63ae7d336d756f88572fa6b5219aed36698d808fa55f62af3e7e6845c7a1dc77d240edb - languageName: node - linkType: hard - -"anymatch@npm:^3.0.3, anymatch@npm:~3.1.2": +"anymatch@npm:^3.0.3": version: 3.1.3 resolution: "anymatch@npm:3.1.3" dependencies: @@ -5581,13 +5325,6 @@ __metadata: languageName: node linkType: hard -"binary-extensions@npm:^2.0.0": - version: 2.3.0 - resolution: "binary-extensions@npm:2.3.0" - checksum: 10/bcad01494e8a9283abf18c1b967af65ee79b0c6a9e6fcfafebfe91dbe6e0fc7272bafb73389e198b310516ae04f7ad17d79aacf6cb4c0d5d5202a7e2e52c7d98 - languageName: node - linkType: hard - "bl@npm:^5.0.0": version: 5.1.0 resolution: "bl@npm:5.1.0" @@ -5662,7 +5399,7 @@ __metadata: languageName: node linkType: hard -"braces@npm:^3.0.3, braces@npm:~3.0.2": +"braces@npm:^3.0.3": version: 3.0.3 resolution: "braces@npm:3.0.3" dependencies: @@ -5803,24 +5540,6 @@ __metadata: languageName: node linkType: hard -"bundle-require@npm:^4.0.0": - version: 4.2.1 - resolution: "bundle-require@npm:4.2.1" - dependencies: - load-tsconfig: "npm:^0.2.3" - peerDependencies: - esbuild: ">=0.17" - checksum: 10/e49cb6528373d4e086723bc37fb037e05e9cd529e1b3aa1c4da6c495c4725a0f74ae9cc461de35163d65dd3a6c41a0474c6e52b74b8ded4fe829c951d0784ec1 - languageName: node - linkType: hard - -"cac@npm:^6.7.12": - version: 6.7.14 - resolution: "cac@npm:6.7.14" - checksum: 10/002769a0fbfc51c062acd2a59df465a2a947916b02ac50b56c69ec6c018ee99ac3e7f4dd7366334ea847f1ecacf4defaa61bcd2ac283db50156ce1f1d8c8ad42 - languageName: node - linkType: hard - "cacache@npm:^18.0.0": version: 18.0.4 resolution: "cacache@npm:18.0.4" @@ -5924,7 +5643,7 @@ __metadata: languageName: node linkType: hard -"chalk@npm:^5.0.0, chalk@npm:^5.0.1, chalk@npm:^5.2.0": +"chalk@npm:^5.0.0, chalk@npm:^5.0.1, chalk@npm:^5.2.0, chalk@npm:^5.3.0": version: 5.3.0 resolution: "chalk@npm:5.3.0" checksum: 10/6373caaab21bd64c405bfc4bd9672b145647fc9482657b5ea1d549b3b2765054e9d3d928870cdf764fb4aad67555f5061538ff247b8310f110c5c888d92397ea @@ -5938,25 +5657,6 @@ __metadata: languageName: node linkType: hard -"chokidar@npm:^3.5.1": - version: 3.6.0 - resolution: "chokidar@npm:3.6.0" - dependencies: - anymatch: "npm:~3.1.2" - braces: "npm:~3.0.2" - fsevents: "npm:~2.3.2" - glob-parent: "npm:~5.1.2" - is-binary-path: "npm:~2.1.0" - is-glob: "npm:~4.0.1" - normalize-path: "npm:~3.0.0" - readdirp: "npm:~3.6.0" - dependenciesMeta: - fsevents: - optional: true - checksum: 10/c327fb07704443f8d15f7b4a7ce93b2f0bc0e6cea07ec28a7570aa22cd51fcf0379df589403976ea956c369f25aa82d84561947e227cd925902e1751371658df - languageName: node - linkType: hard - "chownr@npm:^2.0.0": version: 2.0.0 resolution: "chownr@npm:2.0.0" @@ -5988,7 +5688,7 @@ __metadata: languageName: node linkType: hard -"cjs-module-lexer@npm:^1.0.0": +"cjs-module-lexer@npm:^1.0.0, cjs-module-lexer@npm:^1.3.1": version: 1.4.0 resolution: "cjs-module-lexer@npm:1.4.0" checksum: 10/b041096749792526120d8b8756929f8ef5dd4596502a0e1013f857e3027acd6091915fea77037921d70ee1a99988a100d994d3d3c2e323b04dd4c5ffd516cf13 @@ -6137,13 +5837,6 @@ __metadata: languageName: node linkType: hard -"commander@npm:^4.0.0": - version: 4.1.1 - resolution: "commander@npm:4.1.1" - checksum: 10/3b2dc4125f387dab73b3294dbcb0ab2a862f9c0ad748ee2b27e3544d25325b7a8cdfbcc228d103a98a716960b14478114a5206b5415bd48cdafa38797891562c - languageName: node - linkType: hard - "commander@npm:^9.0.0": version: 9.5.0 resolution: "commander@npm:9.5.0" @@ -6845,86 +6538,6 @@ __metadata: languageName: node linkType: hard -"esbuild@npm:^0.19.2": - version: 0.19.12 - resolution: "esbuild@npm:0.19.12" - dependencies: - "@esbuild/aix-ppc64": "npm:0.19.12" - "@esbuild/android-arm": "npm:0.19.12" - "@esbuild/android-arm64": "npm:0.19.12" - "@esbuild/android-x64": "npm:0.19.12" - "@esbuild/darwin-arm64": "npm:0.19.12" - "@esbuild/darwin-x64": "npm:0.19.12" - "@esbuild/freebsd-arm64": "npm:0.19.12" - "@esbuild/freebsd-x64": "npm:0.19.12" - "@esbuild/linux-arm": "npm:0.19.12" - "@esbuild/linux-arm64": "npm:0.19.12" - "@esbuild/linux-ia32": "npm:0.19.12" - "@esbuild/linux-loong64": "npm:0.19.12" - "@esbuild/linux-mips64el": "npm:0.19.12" - "@esbuild/linux-ppc64": "npm:0.19.12" - "@esbuild/linux-riscv64": "npm:0.19.12" - "@esbuild/linux-s390x": "npm:0.19.12" - "@esbuild/linux-x64": "npm:0.19.12" - "@esbuild/netbsd-x64": "npm:0.19.12" - "@esbuild/openbsd-x64": "npm:0.19.12" - "@esbuild/sunos-x64": "npm:0.19.12" - "@esbuild/win32-arm64": "npm:0.19.12" - "@esbuild/win32-ia32": "npm:0.19.12" - "@esbuild/win32-x64": "npm:0.19.12" - dependenciesMeta: - "@esbuild/aix-ppc64": - optional: true - "@esbuild/android-arm": - optional: true - "@esbuild/android-arm64": - optional: true - "@esbuild/android-x64": - optional: true - "@esbuild/darwin-arm64": - optional: true - "@esbuild/darwin-x64": - optional: true - "@esbuild/freebsd-arm64": - optional: true - "@esbuild/freebsd-x64": - optional: true - "@esbuild/linux-arm": - optional: true - "@esbuild/linux-arm64": - optional: true - "@esbuild/linux-ia32": - optional: true - "@esbuild/linux-loong64": - optional: true - "@esbuild/linux-mips64el": - optional: true - "@esbuild/linux-ppc64": - optional: true - "@esbuild/linux-riscv64": - optional: true - "@esbuild/linux-s390x": - optional: true - "@esbuild/linux-x64": - optional: true - "@esbuild/netbsd-x64": - optional: true - "@esbuild/openbsd-x64": - optional: true - "@esbuild/sunos-x64": - optional: true - "@esbuild/win32-arm64": - optional: true - "@esbuild/win32-ia32": - optional: true - "@esbuild/win32-x64": - optional: true - bin: - esbuild: bin/esbuild - checksum: 10/861fa8eb2428e8d6521a4b7c7930139e3f45e8d51a86985cc29408172a41f6b18df7b3401e7e5e2d528cdf83742da601ddfdc77043ddc4f1c715a8ddb2d8a255 - languageName: node - linkType: hard - "escalade@npm:^3.1.1, escalade@npm:^3.1.2": version: 3.1.2 resolution: "escalade@npm:3.1.2" @@ -7934,7 +7547,7 @@ __metadata: languageName: node linkType: hard -"fsevents@npm:^2.3.2, fsevents@npm:~2.3.2": +"fsevents@npm:^2.3.2": version: 2.3.3 resolution: "fsevents@npm:2.3.3" dependencies: @@ -7944,7 +7557,7 @@ __metadata: languageName: node linkType: hard -"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin, fsevents@patch:fsevents@npm%3A~2.3.2#optional!builtin": +"fsevents@patch:fsevents@npm%3A^2.3.2#optional!builtin": version: 2.3.3 resolution: "fsevents@patch:fsevents@npm%3A2.3.3#optional!builtin::version=2.3.3&hash=df0bf1" dependencies: @@ -8059,7 +7672,7 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": +"glob-parent@npm:^5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" dependencies: @@ -8166,7 +7779,7 @@ __metadata: languageName: node linkType: hard -"globby@npm:^11.0.3, globby@npm:^11.1.0": +"globby@npm:^11.1.0": version: 11.1.0 resolution: "globby@npm:11.1.0" dependencies: @@ -8618,15 +8231,6 @@ __metadata: languageName: node linkType: hard -"is-binary-path@npm:~2.1.0": - version: 2.1.0 - resolution: "is-binary-path@npm:2.1.0" - dependencies: - binary-extensions: "npm:^2.0.0" - checksum: 10/078e51b4f956c2c5fd2b26bb2672c3ccf7e1faff38e0ebdba45612265f4e3d9fc3127a1fa8370bbf09eab61339203c3d3b7af5662cbf8be4030f8fac37745b0e - languageName: node - linkType: hard - "is-boolean-object@npm:^1.1.0": version: 1.1.2 resolution: "is-boolean-object@npm:1.1.2" @@ -8719,7 +8323,7 @@ __metadata: languageName: node linkType: hard -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3": version: 4.0.3 resolution: "is-glob@npm:4.0.3" dependencies: @@ -9603,13 +9207,6 @@ __metadata: languageName: node linkType: hard -"joycon@npm:^3.0.1": - version: 3.1.1 - resolution: "joycon@npm:3.1.1" - checksum: 10/4b36e3479144ec196425f46b3618f8a96ce7e1b658f091a309cd4906215f5b7a402d7df331a3e0a09681381a658d0c5f039cb3cf6907e0a1e17ed847f5d37775 - languageName: node - linkType: hard - "js-sha3@npm:0.5.5": version: 0.5.5 resolution: "js-sha3@npm:0.5.5" @@ -9896,13 +9493,6 @@ __metadata: languageName: node linkType: hard -"lilconfig@npm:^3.0.0": - version: 3.1.2 - resolution: "lilconfig@npm:3.1.2" - checksum: 10/8058403850cfad76d6041b23db23f730e52b6c17a8c28d87b90766639ca0ee40c748a3e85c2d7bd133d572efabff166c4b015e5d25e01fd666cb4b13cfada7f0 - languageName: node - linkType: hard - "lines-and-columns@npm:^1.1.6": version: 1.2.4 resolution: "lines-and-columns@npm:1.2.4" @@ -9910,13 +9500,6 @@ __metadata: languageName: node linkType: hard -"load-tsconfig@npm:^0.2.3": - version: 0.2.5 - resolution: "load-tsconfig@npm:0.2.5" - checksum: 10/b3176f6f0c86dbdbbc7e337440a803b0b4407c55e2e1cfc53bd3db68e0211448f36428a6075ecf5e286db5d1bf791da756fc0ac4d2447717140fb6a5218ecfb4 - languageName: node - linkType: hard - "locate-path@npm:^5.0.0": version: 5.0.0 resolution: "locate-path@npm:5.0.0" @@ -9986,13 +9569,6 @@ __metadata: languageName: node linkType: hard -"lodash.sortby@npm:^4.7.0": - version: 4.7.0 - resolution: "lodash.sortby@npm:4.7.0" - checksum: 10/38df19ae28608af2c50ac342fc1f414508309d53e1d58ed9adfb2c3cd17c3af290058c0a0478028d932c5404df3d53349d19fa364ef6bed6145a6bc21320399e - languageName: node - linkType: hard - "lodash.truncate@npm:^4.4.2": version: 4.4.2 resolution: "lodash.truncate@npm:4.4.2" @@ -10394,17 +9970,6 @@ __metadata: languageName: node linkType: hard -"mz@npm:^2.7.0": - version: 2.7.0 - resolution: "mz@npm:2.7.0" - dependencies: - any-promise: "npm:^1.0.0" - object-assign: "npm:^4.0.1" - thenify-all: "npm:^1.0.0" - checksum: 10/8427de0ece99a07e9faed3c0c6778820d7543e3776f9a84d22cf0ec0a8eb65f6e9aee9c9d353ff9a105ff62d33a9463c6ca638974cc652ee8140cd1e35951c87 - languageName: node - linkType: hard - "nanoid@npm:^3.1.31, nanoid@npm:^3.3.7": version: 3.3.7 resolution: "nanoid@npm:3.3.7" @@ -10549,7 +10114,7 @@ __metadata: languageName: node linkType: hard -"normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": +"normalize-path@npm:^3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" checksum: 10/88eeb4da891e10b1318c4b2476b6e2ecbeb5ff97d946815ffea7794c31a89017c70d7f34b3c2ebf23ef4e9fc9fb99f7dffe36da22011b5b5c6ffa34f4873ec20 @@ -10631,13 +10196,6 @@ __metadata: languageName: node linkType: hard -"object-assign@npm:^4.0.1": - version: 4.1.1 - resolution: "object-assign@npm:4.1.1" - checksum: 10/fcc6e4ea8c7fe48abfbb552578b1c53e0d194086e2e6bbbf59e0a536381a292f39943c6e9628af05b5528aa5e3318bb30d6b2e53cadaf5b8fe9e12c4b69af23f - languageName: node - linkType: hard - "object-inspect@npm:^1.13.1": version: 1.13.2 resolution: "object-inspect@npm:1.13.2" @@ -10971,7 +10529,7 @@ __metadata: languageName: node linkType: hard -"pirates@npm:^4.0.1, pirates@npm:^4.0.4": +"pirates@npm:^4.0.4": version: 4.0.6 resolution: "pirates@npm:4.0.6" checksum: 10/d02dda76f4fec1cbdf395c36c11cf26f76a644f9f9a1bfa84d3167d0d3154d5289aacc72677aa20d599bb4a6937a471de1b65c995e2aea2d8687cbcd7e43ea5f @@ -11019,24 +10577,6 @@ __metadata: languageName: node linkType: hard -"postcss-load-config@npm:^4.0.1": - version: 4.0.2 - resolution: "postcss-load-config@npm:4.0.2" - dependencies: - lilconfig: "npm:^3.0.0" - yaml: "npm:^2.3.4" - peerDependencies: - postcss: ">=8.0.9" - ts-node: ">=9.0.0" - peerDependenciesMeta: - postcss: - optional: true - ts-node: - optional: true - checksum: 10/e2c2ed9b7998a5b123e1ce0c124daf6504b1454c67dcc1c8fdbcc5ffb2597b7de245e3ac34f63afc928d3fd3260b1e36492ebbdb01a9ff63f16b3c8b7b925d1b - languageName: node - linkType: hard - "postcss@npm:^8.4.40": version: 8.4.41 resolution: "postcss@npm:8.4.41" @@ -11309,7 +10849,7 @@ __metadata: languageName: node linkType: hard -"readdirp@npm:^3.6.0, readdirp@npm:~3.6.0": +"readdirp@npm:^3.6.0": version: 3.6.0 resolution: "readdirp@npm:3.6.0" dependencies: @@ -11535,69 +11075,6 @@ __metadata: languageName: node linkType: hard -"rollup@npm:^4.0.2": - version: 4.21.0 - resolution: "rollup@npm:4.21.0" - dependencies: - "@rollup/rollup-android-arm-eabi": "npm:4.21.0" - "@rollup/rollup-android-arm64": "npm:4.21.0" - "@rollup/rollup-darwin-arm64": "npm:4.21.0" - "@rollup/rollup-darwin-x64": "npm:4.21.0" - "@rollup/rollup-linux-arm-gnueabihf": "npm:4.21.0" - "@rollup/rollup-linux-arm-musleabihf": "npm:4.21.0" - "@rollup/rollup-linux-arm64-gnu": "npm:4.21.0" - "@rollup/rollup-linux-arm64-musl": "npm:4.21.0" - "@rollup/rollup-linux-powerpc64le-gnu": "npm:4.21.0" - "@rollup/rollup-linux-riscv64-gnu": "npm:4.21.0" - "@rollup/rollup-linux-s390x-gnu": "npm:4.21.0" - "@rollup/rollup-linux-x64-gnu": "npm:4.21.0" - "@rollup/rollup-linux-x64-musl": "npm:4.21.0" - "@rollup/rollup-win32-arm64-msvc": "npm:4.21.0" - "@rollup/rollup-win32-ia32-msvc": "npm:4.21.0" - "@rollup/rollup-win32-x64-msvc": "npm:4.21.0" - "@types/estree": "npm:1.0.5" - fsevents: "npm:~2.3.2" - dependenciesMeta: - "@rollup/rollup-android-arm-eabi": - optional: true - "@rollup/rollup-android-arm64": - optional: true - "@rollup/rollup-darwin-arm64": - optional: true - "@rollup/rollup-darwin-x64": - optional: true - "@rollup/rollup-linux-arm-gnueabihf": - optional: true - "@rollup/rollup-linux-arm-musleabihf": - optional: true - "@rollup/rollup-linux-arm64-gnu": - optional: true - "@rollup/rollup-linux-arm64-musl": - optional: true - "@rollup/rollup-linux-powerpc64le-gnu": - optional: true - "@rollup/rollup-linux-riscv64-gnu": - optional: true - "@rollup/rollup-linux-s390x-gnu": - optional: true - "@rollup/rollup-linux-x64-gnu": - optional: true - "@rollup/rollup-linux-x64-musl": - optional: true - "@rollup/rollup-win32-arm64-msvc": - optional: true - "@rollup/rollup-win32-ia32-msvc": - optional: true - "@rollup/rollup-win32-x64-msvc": - optional: true - fsevents: - optional: true - bin: - rollup: dist/bin/rollup - checksum: 10/27ac47d5049719249d2a44982e31f01423158a3625cabff2f2362219aee64bdc14c32572b669169c22c324c3a965044ce8f06e27eee00fd8802861cd13697f87 - languageName: node - linkType: hard - "run-async@npm:^2.3.0": version: 2.4.1 resolution: "run-async@npm:2.4.1" @@ -11979,15 +11456,6 @@ __metadata: languageName: node linkType: hard -"source-map@npm:0.8.0-beta.0": - version: 0.8.0-beta.0 - resolution: "source-map@npm:0.8.0-beta.0" - dependencies: - whatwg-url: "npm:^7.0.0" - checksum: 10/c02e22ab9f8b8e38655ba1e9abae9fe1f8ba216cbbea922718d5e2ea45821606a74f10edec1db9055e7f7cfd1e6a62e5eade67ec30c017a02f4c8e990accbc1c - languageName: node - linkType: hard - "source-map@npm:^0.6.0, source-map@npm:^0.6.1, source-map@npm:~0.6.1": version: 0.6.1 resolution: "source-map@npm:0.6.1" @@ -12236,24 +11704,6 @@ __metadata: languageName: node linkType: hard -"sucrase@npm:^3.20.3": - version: 3.35.0 - resolution: "sucrase@npm:3.35.0" - dependencies: - "@jridgewell/gen-mapping": "npm:^0.3.2" - commander: "npm:^4.0.0" - glob: "npm:^10.3.10" - lines-and-columns: "npm:^1.1.6" - mz: "npm:^2.7.0" - pirates: "npm:^4.0.1" - ts-interface-checker: "npm:^0.1.9" - bin: - sucrase: bin/sucrase - sucrase-node: bin/sucrase-node - checksum: 10/bc601558a62826f1c32287d4fdfa4f2c09fe0fec4c4d39d0e257fd9116d7d6227a18309721d4185ec84c9dc1af0d5ec0e05a42a337fbb74fc293e068549aacbe - languageName: node - linkType: hard - "supports-color@npm:^5.3.0": version: 5.5.0 resolution: "supports-color@npm:5.5.0" @@ -12400,24 +11850,6 @@ __metadata: languageName: node linkType: hard -"thenify-all@npm:^1.0.0": - version: 1.6.0 - resolution: "thenify-all@npm:1.6.0" - dependencies: - thenify: "npm:>= 3.1.0 < 4" - checksum: 10/dba7cc8a23a154cdcb6acb7f51d61511c37a6b077ec5ab5da6e8b874272015937788402fd271fdfc5f187f8cb0948e38d0a42dcc89d554d731652ab458f5343e - languageName: node - linkType: hard - -"thenify@npm:>= 3.1.0 < 4": - version: 3.3.1 - resolution: "thenify@npm:3.3.1" - dependencies: - any-promise: "npm:^1.0.0" - checksum: 10/486e1283a867440a904e36741ff1a177faa827cf94d69506f7e3ae4187b9afdf9ec368b3d8da225c192bfe2eb943f3f0080594156bf39f21b57cd1411e2e7f6d - languageName: node - linkType: hard - "throat@npm:^6.0.1": version: 6.0.2 resolution: "throat@npm:6.0.2" @@ -12460,15 +11892,6 @@ __metadata: languageName: node linkType: hard -"tr46@npm:^1.0.1": - version: 1.0.1 - resolution: "tr46@npm:1.0.1" - dependencies: - punycode: "npm:^2.1.0" - checksum: 10/6e80d75480cb6658f7f283c15f5f41c2d4dfa243ca99a0e1baf3de6cc823fc4c829f89782a7a11e029905781fccfea42d08d8a6674ba7948c7dbc595b6f27dd3 - languageName: node - linkType: hard - "tr46@npm:^2.1.0": version: 2.1.0 resolution: "tr46@npm:2.1.0" @@ -12485,22 +11908,6 @@ __metadata: languageName: node linkType: hard -"tree-kill@npm:^1.2.2": - version: 1.2.2 - resolution: "tree-kill@npm:1.2.2" - bin: - tree-kill: cli.js - checksum: 10/49117f5f410d19c84b0464d29afb9642c863bc5ba40fcb9a245d474c6d5cc64d1b177a6e6713129eb346b40aebb9d4631d967517f9fbe8251c35b21b13cd96c7 - languageName: node - linkType: hard - -"ts-interface-checker@npm:^0.1.9": - version: 0.1.13 - resolution: "ts-interface-checker@npm:0.1.13" - checksum: 10/9f7346b9e25bade7a1050c001ec5a4f7023909c0e1644c5a96ae20703a131627f081479e6622a4ecee2177283d0069e651e507bedadd3904fc4010ab28ffce00 - languageName: node - linkType: hard - "ts-jest@npm:^27.1.4": version: 27.1.5 resolution: "ts-jest@npm:27.1.5" @@ -12605,84 +12012,6 @@ __metadata: languageName: node linkType: hard -"tsup@npm:8.0.2": - version: 8.0.2 - resolution: "tsup@npm:8.0.2" - dependencies: - bundle-require: "npm:^4.0.0" - cac: "npm:^6.7.12" - chokidar: "npm:^3.5.1" - debug: "npm:^4.3.1" - esbuild: "npm:^0.19.2" - execa: "npm:^5.0.0" - globby: "npm:^11.0.3" - joycon: "npm:^3.0.1" - postcss-load-config: "npm:^4.0.1" - resolve-from: "npm:^5.0.0" - rollup: "npm:^4.0.2" - source-map: "npm:0.8.0-beta.0" - sucrase: "npm:^3.20.3" - tree-kill: "npm:^1.2.2" - peerDependencies: - "@microsoft/api-extractor": ^7.36.0 - "@swc/core": ^1 - postcss: ^8.4.12 - typescript: ">=4.5.0" - peerDependenciesMeta: - "@microsoft/api-extractor": - optional: true - "@swc/core": - optional: true - postcss: - optional: true - typescript: - optional: true - bin: - tsup: dist/cli-default.js - tsup-node: dist/cli-node.js - checksum: 10/dd8c375181a748cdeb86aa3d779d6d755596881f47fe38b7c4b810ff1ef6424d485b23065fda0f6e32d9988bae19cd64e49f6e2f11295d5184485ab7528a37d1 - languageName: node - linkType: hard - -"tsup@patch:tsup@npm%3A8.0.2#./.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch::locator=%40metamask%2Fcore-monorepo%40workspace%3A.": - version: 8.0.2 - resolution: "tsup@patch:tsup@npm%3A8.0.2#./.yarn/patches/tsup-npm-8.0.2-86e40f68a7.patch::version=8.0.2&hash=ce4dd6&locator=%40metamask%2Fcore-monorepo%40workspace%3A." - dependencies: - bundle-require: "npm:^4.0.0" - cac: "npm:^6.7.12" - chokidar: "npm:^3.5.1" - debug: "npm:^4.3.1" - esbuild: "npm:^0.19.2" - execa: "npm:^5.0.0" - globby: "npm:^11.0.3" - joycon: "npm:^3.0.1" - postcss-load-config: "npm:^4.0.1" - resolve-from: "npm:^5.0.0" - rollup: "npm:^4.0.2" - source-map: "npm:0.8.0-beta.0" - sucrase: "npm:^3.20.3" - tree-kill: "npm:^1.2.2" - peerDependencies: - "@microsoft/api-extractor": ^7.36.0 - "@swc/core": ^1 - postcss: ^8.4.12 - typescript: ">=4.5.0" - peerDependenciesMeta: - "@microsoft/api-extractor": - optional: true - "@swc/core": - optional: true - postcss: - optional: true - typescript: - optional: true - bin: - tsup: dist/cli-default.js - tsup-node: dist/cli-node.js - checksum: 10/4f011dee02adb00970189b34642e0d3c6824d6db874c1e72fbfb800d2367d2f78852f559059a059ee9088215363d061aa5ef37ab286a64027ea7214c8a580fb8 - languageName: node - linkType: hard - "tsutils@npm:^3.21.0": version: 3.21.0 resolution: "tsutils@npm:3.21.0" @@ -13125,13 +12454,6 @@ __metadata: languageName: node linkType: hard -"webidl-conversions@npm:^4.0.2": - version: 4.0.2 - resolution: "webidl-conversions@npm:4.0.2" - checksum: 10/594187c36f2d7898f89c0ed3b9248a095fa549ecc1befb10a97bc884b5680dc96677f58df5579334d8e0d1018e5ef075689cfa2a6c459f45a61a9deb512cb59e - languageName: node - linkType: hard - "webidl-conversions@npm:^5.0.0": version: 5.0.0 resolution: "webidl-conversions@npm:5.0.0" @@ -13197,17 +12519,6 @@ __metadata: languageName: node linkType: hard -"whatwg-url@npm:^7.0.0": - version: 7.1.0 - resolution: "whatwg-url@npm:7.1.0" - dependencies: - lodash.sortby: "npm:^4.7.0" - tr46: "npm:^1.0.1" - webidl-conversions: "npm:^4.0.2" - checksum: 10/769fd35838b4e50536ae08d836472e86adbedda1d5493ea34353c55468147e7868b91d2535b59e01a9e7331ab7e4cdfdf5490c279c045da23c327cf33e32f755 - languageName: node - linkType: hard - "whatwg-url@npm:^8.0.0, whatwg-url@npm:^8.5.0": version: 8.7.0 resolution: "whatwg-url@npm:8.7.0" @@ -13442,7 +12753,7 @@ __metadata: languageName: node linkType: hard -"yaml@npm:^2.2.2, yaml@npm:^2.3.4": +"yaml@npm:^2.2.2": version: 2.5.0 resolution: "yaml@npm:2.5.0" bin: From 87cd86341a5a9711f9ee7e36d9c5ab0a874be901 Mon Sep 17 00:00:00 2001 From: Dovydas Stankevicius Date: Mon, 16 Sep 2024 12:36:51 +0100 Subject: [PATCH 3/7] fix: waiting for encrypted string (#4705) ## Explanation This PR solves the bug of not awaiting for encrypted string in the user storage ## References ## Changelog ### @metamask/profile-sync-controller - fixed awaiting for encryption to complete ## 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 --- packages/profile-sync-controller/src/sdk/user-storage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/profile-sync-controller/src/sdk/user-storage.ts b/packages/profile-sync-controller/src/sdk/user-storage.ts index a263aaade7..43695763d2 100644 --- a/packages/profile-sync-controller/src/sdk/user-storage.ts +++ b/packages/profile-sync-controller/src/sdk/user-storage.ts @@ -84,7 +84,7 @@ export class UserStorage { try { const headers = await this.#getAuthorizationHeader(); const storageKey = await this.getStorageKey(); - const encryptedData = encryption.encryptString(data, storageKey); + const encryptedData = await encryption.encryptString(data, storageKey); const encryptedPath = createEntryPath(path, storageKey); const url = new URL(STORAGE_URL(this.env, encryptedPath)); From d6be9f01a6a0364e92578ca24622e7fcf8459b3b Mon Sep 17 00:00:00 2001 From: Mathieu Artu Date: Mon, 16 Sep 2024 14:42:13 +0200 Subject: [PATCH 4/7] feat(NOTIFY-1102): add account sync analytics callbacks (#4707) ## Explanation This PR adds callbacks that will be used for analytics in the account sync context. ## References [Notify-1102](https://consensyssoftware.atlassian.net/jira/software/projects/NOTIFY/boards/616?assignee=712020%3A5843b7e2-a7fe-4c45-9fbd-e1f2b2eb58c2&selectedIssue=NOTIFY-1102) ## Changelog ### `@metamask/profile-sync-controller` - **ADDED**: `onAccountAdded` and `onAccountNameUpdated` account syncing big sync callbacks ## 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 --- .../UserStorageController.test.ts | 95 +++++++++++++++++++ .../user-storage/UserStorageController.ts | 29 ++++++ 2 files changed, 124 insertions(+) diff --git a/packages/profile-sync-controller/src/controllers/user-storage/UserStorageController.test.ts b/packages/profile-sync-controller/src/controllers/user-storage/UserStorageController.test.ts index 164ab168b4..c6e40da885 100644 --- a/packages/profile-sync-controller/src/controllers/user-storage/UserStorageController.test.ts +++ b/packages/profile-sync-controller/src/controllers/user-storage/UserStorageController.test.ts @@ -580,6 +580,59 @@ describe('user-storage/user-storage-controller - syncInternalAccountsWithUserSto ); }); + it('fires the onAccountAdded callback when adding an account', async () => { + const mockUserStorageAccountsResponse = async () => { + return { + status: 200, + body: await createMockUserStorageEntries( + MOCK_USER_STORAGE_ACCOUNTS.SAME_AS_INTERNAL_ALL, + ), + }; + }; + + const arrangeMocksForAccounts = async () => { + return { + messengerMocks: mockUserStorageMessenger({ + accounts: { + accountsList: MOCK_INTERNAL_ACCOUNTS.ONE as InternalAccount[], + }, + }), + mockAPI: { + mockEndpointGetUserStorage: + await mockEndpointGetUserStorageAllFeatureEntries( + 'accounts', + await mockUserStorageAccountsResponse(), + ), + }, + }; + }; + + const onAccountAdded = jest.fn(); + + const { messengerMocks, mockAPI } = await arrangeMocksForAccounts(); + const controller = new UserStorageController({ + messenger: messengerMocks.messenger, + config: { + accountSyncing: { + onAccountAdded, + }, + }, + env: { + isAccountSyncingEnabled: true, + }, + getMetaMetricsState: () => true, + }); + + await controller.syncInternalAccountsWithUserStorage(); + + mockAPI.mockEndpointGetUserStorage.done(); + + expect(onAccountAdded).toHaveBeenCalledTimes( + MOCK_USER_STORAGE_ACCOUNTS.SAME_AS_INTERNAL_ALL.length - + MOCK_INTERNAL_ACCOUNTS.ONE.length, + ); + }); + it('does not create internal accounts if user storage has less accounts', async () => { const mockUserStorageAccountsResponse = async () => { return { @@ -893,6 +946,48 @@ describe('user-storage/user-storage-controller - syncInternalAccountsWithUserSto messengerMocks.mockAccountsUpdateAccountMetadata, ).not.toHaveBeenCalled(); }); + + it('fires the onAccountNameUpdated callback when renaming an internal account', async () => { + const arrangeMocksForAccounts = async () => { + return { + messengerMocks: mockUserStorageMessenger({ + accounts: { + accountsList: + MOCK_INTERNAL_ACCOUNTS.ONE_DEFAULT_NAME as InternalAccount[], + }, + }), + mockAPI: { + mockEndpointGetUserStorage: + await mockEndpointGetUserStorageAllFeatureEntries( + 'accounts', + await mockUserStorageAccountsResponse(), + ), + }, + }; + }; + + const onAccountNameUpdated = jest.fn(); + + const { messengerMocks, mockAPI } = await arrangeMocksForAccounts(); + const controller = new UserStorageController({ + messenger: messengerMocks.messenger, + config: { + accountSyncing: { + onAccountNameUpdated, + }, + }, + env: { + isAccountSyncingEnabled: true, + }, + getMetaMetricsState: () => true, + }); + + await controller.syncInternalAccountsWithUserStorage(); + + mockAPI.mockEndpointGetUserStorage.done(); + + expect(onAccountNameUpdated).toHaveBeenCalledTimes(1); + }); }); describe('User storage name is a custom name with last updated', () => { diff --git a/packages/profile-sync-controller/src/controllers/user-storage/UserStorageController.ts b/packages/profile-sync-controller/src/controllers/user-storage/UserStorageController.ts index 5af28ab924..c7de6cedf0 100644 --- a/packages/profile-sync-controller/src/controllers/user-storage/UserStorageController.ts +++ b/packages/profile-sync-controller/src/controllers/user-storage/UserStorageController.ts @@ -119,6 +119,22 @@ const metadata: StateMetadata = { }, }; +type ControllerConfig = { + accountSyncing?: { + /** + * Callback that fires when account sync adds an account. + * This is used for analytics. + */ + onAccountAdded?: (profileId: string) => void; + + /** + * Callback that fires when account sync updates the name of an account. + * This is used for analytics. + */ + onAccountNameUpdated?: (profileId: string) => void; + }; +}; + // Messenger Actions type CreateActionsObj = { [K in Controller]: { @@ -347,6 +363,8 @@ export default class UserStorageController extends BaseController< }, }; + #config?: ControllerConfig; + #notificationServices = { disableNotificationServices: async () => { return await this.messagingSystem.call( @@ -387,11 +405,13 @@ export default class UserStorageController extends BaseController< messenger, state, env, + config, getMetaMetricsState, nativeScryptCrypto, }: { messenger: UserStorageControllerMessenger; state?: UserStorageControllerState; + config?: ControllerConfig; env?: { isAccountSyncingEnabled?: boolean; isNetworkSyncingEnabled?: boolean; @@ -406,6 +426,8 @@ export default class UserStorageController extends BaseController< state: { ...defaultState, ...state }, }); + this.#config = config; + this.#accounts.isAccountSyncingEnabled = Boolean( env?.isAccountSyncingEnabled, ); @@ -722,6 +744,8 @@ export default class UserStorageController extends BaseController< try { this.#accounts.isAccountSyncingInProgress = true; + const profileId = await this.#auth.getProfileId(); + const userStorageAccountsList = await this.#accounts.getUserStorageAccountsList(); @@ -752,6 +776,7 @@ export default class UserStorageController extends BaseController< length: numberOfAccountsToAdd, }).map(async () => { await this.messagingSystem.call('KeyringController:addNewAccount'); + this.#config?.accountSyncing?.onAccountAdded?.(profileId); }); await Promise.all(addNewAccountsPromises); @@ -791,6 +816,8 @@ export default class UserStorageController extends BaseController< name: userStorageAccount.n, }, ); + + this.#config?.accountSyncing?.onAccountNameUpdated?.(profileId); } continue; } @@ -830,6 +857,8 @@ export default class UserStorageController extends BaseController< }, ); + this.#config?.accountSyncing?.onAccountNameUpdated?.(profileId); + continue; } else if (internalAccount.metadata.nameLastUpdatedAt !== undefined) { await this.#accounts.saveInternalAccountToUserStorage( From 4d30dda4fbe7ad71d92fd465d125462665577da4 Mon Sep 17 00:00:00 2001 From: Maarten Zuidhoorn Date: Mon, 16 Sep 2024 15:33:31 +0200 Subject: [PATCH 5/7] Release 202.0.0 (#4704) ## Explanation This is the release candidate for version `202.0.0`. See the changelogs for more details. ## 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 --------- Co-authored-by: OGPoyraz --- package.json | 6 +- packages/accounts-controller/CHANGELOG.md | 28 ++- packages/accounts-controller/package.json | 6 +- packages/address-book-controller/CHANGELOG.md | 21 +- packages/address-book-controller/package.json | 6 +- packages/announcement-controller/CHANGELOG.md | 25 +- packages/announcement-controller/package.json | 4 +- packages/approval-controller/CHANGELOG.md | 21 +- packages/approval-controller/package.json | 4 +- packages/assets-controllers/CHANGELOG.md | 28 ++- packages/assets-controllers/package.json | 18 +- packages/base-controller/CHANGELOG.md | 21 +- packages/base-controller/package.json | 4 +- packages/build-utils/CHANGELOG.md | 27 ++- packages/build-utils/package.json | 2 +- packages/chain-controller/CHANGELOG.md | 26 +- packages/chain-controller/package.json | 4 +- packages/composable-controller/CHANGELOG.md | 21 +- packages/composable-controller/package.json | 6 +- packages/controller-utils/CHANGELOG.md | 26 +- packages/controller-utils/package.json | 2 +- packages/ens-controller/CHANGELOG.md | 21 +- packages/ens-controller/package.json | 8 +- packages/eth-json-rpc-provider/CHANGELOG.md | 21 +- packages/eth-json-rpc-provider/package.json | 4 +- packages/gas-fee-controller/CHANGELOG.md | 21 +- packages/gas-fee-controller/package.json | 10 +- packages/json-rpc-engine/CHANGELOG.md | 25 +- packages/json-rpc-engine/package.json | 2 +- .../json-rpc-middleware-stream/CHANGELOG.md | 25 +- .../json-rpc-middleware-stream/package.json | 4 +- packages/keyring-controller/CHANGELOG.md | 21 +- packages/keyring-controller/package.json | 6 +- packages/logging-controller/CHANGELOG.md | 21 +- packages/logging-controller/package.json | 6 +- packages/message-manager/CHANGELOG.md | 21 +- packages/message-manager/package.json | 6 +- packages/name-controller/CHANGELOG.md | 27 ++- packages/name-controller/package.json | 6 +- packages/network-controller/CHANGELOG.md | 21 +- packages/network-controller/package.json | 10 +- packages/notification-controller/CHANGELOG.md | 27 ++- packages/notification-controller/package.json | 4 +- .../CHANGELOG.md | 21 +- .../package.json | 12 +- packages/permission-controller/CHANGELOG.md | 21 +- packages/permission-controller/package.json | 10 +- .../permission-log-controller/CHANGELOG.md | 27 ++- .../permission-log-controller/package.json | 6 +- packages/phishing-controller/CHANGELOG.md | 21 +- packages/phishing-controller/package.json | 6 +- packages/polling-controller/CHANGELOG.md | 21 +- packages/polling-controller/package.json | 8 +- packages/preferences-controller/CHANGELOG.md | 21 +- packages/preferences-controller/package.json | 8 +- packages/profile-sync-controller/CHANGELOG.md | 39 ++- packages/profile-sync-controller/package.json | 10 +- .../queued-request-controller/CHANGELOG.md | 22 +- .../queued-request-controller/package.json | 12 +- packages/rate-limit-controller/CHANGELOG.md | 27 ++- packages/rate-limit-controller/package.json | 4 +- .../selected-network-controller/CHANGELOG.md | 28 ++- .../selected-network-controller/package.json | 10 +- packages/signature-controller/CHANGELOG.md | 28 ++- packages/signature-controller/package.json | 14 +- packages/transaction-controller/CHANGELOG.md | 33 ++- packages/transaction-controller/package.json | 16 +- .../user-operation-controller/CHANGELOG.md | 21 +- .../user-operation-controller/package.json | 20 +- yarn.lock | 228 +++++++++--------- 70 files changed, 1037 insertions(+), 280 deletions(-) diff --git a/package.json b/package.json index 1204adc78e..bd803bf703 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/core-monorepo", - "version": "201.0.0", + "version": "202.0.0", "private": true, "description": "Monorepo for packages shared between MetaMask clients", "repository": { @@ -56,8 +56,8 @@ "@metamask/eslint-config-nodejs": "^12.1.0", "@metamask/eslint-config-typescript": "^12.1.0", "@metamask/eth-block-tracker": "^10.0.0", - "@metamask/eth-json-rpc-provider": "^4.1.3", - "@metamask/json-rpc-engine": "^9.0.2", + "@metamask/eth-json-rpc-provider": "^4.1.4", + "@metamask/json-rpc-engine": "^9.0.3", "@metamask/utils": "^9.1.0", "@ts-bridge/cli": "^0.5.1", "@types/jest": "^27.4.1", diff --git a/packages/accounts-controller/CHANGELOG.md b/packages/accounts-controller/CHANGELOG.md index 12e01f6054..3eb15dd8b2 100644 --- a/packages/accounts-controller/CHANGELOG.md +++ b/packages/accounts-controller/CHANGELOG.md @@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [18.2.1] + +### Changed + +- Bump `@metamask/eth-snap-keyring` from `^4.3.1` to `^4.3.3` ([#4689](https://github.com/MetaMask/core/pull/4689)) +- Bump `@metamask/snaps-sdk` from `^6.1.1` to `^6.5.0` ([#4689](https://github.com/MetaMask/core/pull/4689)) +- Bump `@metamask/snaps-utils` from `^7.8.1` to `^8.1.1` ([#4689](https://github.com/MetaMask/core/pull/4689)) +- Bump peer dependency `@metamask/snaps-controllers` from `^9.3.0` to `^9.7.0` ([#4689](https://github.com/MetaMask/core/pull/4689)) + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [18.2.0] ### Added @@ -295,7 +320,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release ([#1637](https://github.com/MetaMask/core/pull/1637)) -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.1...HEAD +[18.2.1]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.2.0...@metamask/accounts-controller@18.2.1 [18.2.0]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.1.1...@metamask/accounts-controller@18.2.0 [18.1.1]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.1.0...@metamask/accounts-controller@18.1.1 [18.1.0]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@18.0.0...@metamask/accounts-controller@18.1.0 diff --git a/packages/accounts-controller/package.json b/packages/accounts-controller/package.json index 055d0c4350..61f249a2e9 100644 --- a/packages/accounts-controller/package.json +++ b/packages/accounts-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/accounts-controller", - "version": "18.2.0", + "version": "18.2.1", "description": "Manages internal accounts", "keywords": [ "MetaMask", @@ -48,7 +48,7 @@ }, "dependencies": { "@ethereumjs/util": "^8.1.0", - "@metamask/base-controller": "^7.0.0", + "@metamask/base-controller": "^7.0.1", "@metamask/eth-snap-keyring": "^4.3.3", "@metamask/keyring-api": "^8.1.0", "@metamask/snaps-sdk": "^6.5.0", @@ -61,7 +61,7 @@ }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", - "@metamask/keyring-controller": "^17.2.0", + "@metamask/keyring-controller": "^17.2.1", "@metamask/snaps-controllers": "^9.7.0", "@types/jest": "^27.4.1", "@types/readable-stream": "^2.3.0", diff --git a/packages/address-book-controller/CHANGELOG.md b/packages/address-book-controller/CHANGELOG.md index 558e352f20..6a377e0577 100644 --- a/packages/address-book-controller/CHANGELOG.md +++ b/packages/address-book-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [6.0.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [6.0.0] ### Added @@ -168,7 +186,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/address-book-controller@6.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/address-book-controller@6.0.1...HEAD +[6.0.1]: https://github.com/MetaMask/core/compare/@metamask/address-book-controller@6.0.0...@metamask/address-book-controller@6.0.1 [6.0.0]: https://github.com/MetaMask/core/compare/@metamask/address-book-controller@5.0.0...@metamask/address-book-controller@6.0.0 [5.0.0]: https://github.com/MetaMask/core/compare/@metamask/address-book-controller@4.0.2...@metamask/address-book-controller@5.0.0 [4.0.2]: https://github.com/MetaMask/core/compare/@metamask/address-book-controller@4.0.1...@metamask/address-book-controller@4.0.2 diff --git a/packages/address-book-controller/package.json b/packages/address-book-controller/package.json index 2f713ae047..61a461b10b 100644 --- a/packages/address-book-controller/package.json +++ b/packages/address-book-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/address-book-controller", - "version": "6.0.0", + "version": "6.0.1", "description": "Manages a list of recipient addresses associated with nicknames", "keywords": [ "MetaMask", @@ -47,8 +47,8 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", "@metamask/utils": "^9.1.0" }, "devDependencies": { diff --git a/packages/announcement-controller/CHANGELOG.md b/packages/announcement-controller/CHANGELOG.md index 7f4779d944..a58b95ace7 100644 --- a/packages/announcement-controller/CHANGELOG.md +++ b/packages/announcement-controller/CHANGELOG.md @@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [7.0.1] + +### Changed + +- Bump TypeScript from `~4.9.5` to `~5.2.2` and set `moduleResolution` option to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645), [#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584)) + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [7.0.0] ### Changed @@ -142,7 +164,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/announcement-controller@7.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/announcement-controller@7.0.1...HEAD +[7.0.1]: https://github.com/MetaMask/core/compare/@metamask/announcement-controller@7.0.0...@metamask/announcement-controller@7.0.1 [7.0.0]: https://github.com/MetaMask/core/compare/@metamask/announcement-controller@6.1.1...@metamask/announcement-controller@7.0.0 [6.1.1]: https://github.com/MetaMask/core/compare/@metamask/announcement-controller@6.1.0...@metamask/announcement-controller@6.1.1 [6.1.0]: https://github.com/MetaMask/core/compare/@metamask/announcement-controller@6.0.1...@metamask/announcement-controller@6.1.0 diff --git a/packages/announcement-controller/package.json b/packages/announcement-controller/package.json index 375fe172be..1d7eb8be80 100644 --- a/packages/announcement-controller/package.json +++ b/packages/announcement-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/announcement-controller", - "version": "7.0.0", + "version": "7.0.1", "description": "Manages in-app announcements", "keywords": [ "MetaMask", @@ -47,7 +47,7 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0" + "@metamask/base-controller": "^7.0.1" }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", diff --git a/packages/approval-controller/CHANGELOG.md b/packages/approval-controller/CHANGELOG.md index ad088bb75c..66a0956531 100644 --- a/packages/approval-controller/CHANGELOG.md +++ b/packages/approval-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [7.0.4] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [7.0.3] ### Changed @@ -223,7 +241,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@7.0.3...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@7.0.4...HEAD +[7.0.4]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@7.0.3...@metamask/approval-controller@7.0.4 [7.0.3]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@7.0.2...@metamask/approval-controller@7.0.3 [7.0.2]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@7.0.1...@metamask/approval-controller@7.0.2 [7.0.1]: https://github.com/MetaMask/core/compare/@metamask/approval-controller@7.0.0...@metamask/approval-controller@7.0.1 diff --git a/packages/approval-controller/package.json b/packages/approval-controller/package.json index 6e32df7289..1ad079e9ea 100644 --- a/packages/approval-controller/package.json +++ b/packages/approval-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/approval-controller", - "version": "7.0.3", + "version": "7.0.4", "description": "Manages requests that require user approval", "keywords": [ "MetaMask", @@ -47,7 +47,7 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", + "@metamask/base-controller": "^7.0.1", "@metamask/rpc-errors": "^6.3.1", "@metamask/utils": "^9.1.0", "nanoid": "^3.1.31" diff --git a/packages/assets-controllers/CHANGELOG.md b/packages/assets-controllers/CHANGELOG.md index 73608c6d89..cff33baff6 100644 --- a/packages/assets-controllers/CHANGELOG.md +++ b/packages/assets-controllers/CHANGELOG.md @@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [38.0.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. +- Don't update currency rates on transient errors ([#4662](https://github.com/MetaMask/core/pull/4662)) + - In `CurrencyRateController` if unexpected errors occur during requests to + crypto compare, the conversion rate in state will remain unchanged instead + of being set to null. +- Fix fallback conversion rate for token market data ([#4615](https://github.com/MetaMask/core/pull/4615)) + - On networks where the native currency is not ETH, token market data is now + correctly priced in the native currency. + ## [38.0.0] ### Added @@ -1096,7 +1121,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Use Ethers for AssetsContractController ([#845](https://github.com/MetaMask/core/pull/845)) -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@38.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@38.0.1...HEAD +[38.0.1]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@38.0.0...@metamask/assets-controllers@38.0.1 [38.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@37.0.0...@metamask/assets-controllers@38.0.0 [37.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@36.0.0...@metamask/assets-controllers@37.0.0 [36.0.0]: https://github.com/MetaMask/core/compare/@metamask/assets-controllers@35.0.0...@metamask/assets-controllers@36.0.0 diff --git a/packages/assets-controllers/package.json b/packages/assets-controllers/package.json index ca577634df..80f918bb84 100644 --- a/packages/assets-controllers/package.json +++ b/packages/assets-controllers/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/assets-controllers", - "version": "38.0.0", + "version": "38.0.1", "description": "Controllers which manage interactions involving ERC-20, ERC-721, and ERC-1155 tokens (including NFTs)", "keywords": [ "MetaMask", @@ -53,12 +53,12 @@ "@ethersproject/contracts": "^5.7.0", "@ethersproject/providers": "^5.7.0", "@metamask/abi-utils": "^2.0.3", - "@metamask/base-controller": "^7.0.0", + "@metamask/base-controller": "^7.0.1", "@metamask/contract-metadata": "^2.4.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/controller-utils": "^11.3.0", "@metamask/eth-query": "^4.0.0", "@metamask/metamask-eth-abis": "^3.1.1", - "@metamask/polling-controller": "^10.0.0", + "@metamask/polling-controller": "^10.0.1", "@metamask/rpc-errors": "^6.3.1", "@metamask/utils": "^9.1.0", "@types/bn.js": "^5.1.5", @@ -73,14 +73,14 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@metamask/accounts-controller": "^18.2.0", - "@metamask/approval-controller": "^7.0.3", + "@metamask/accounts-controller": "^18.2.1", + "@metamask/approval-controller": "^7.0.4", "@metamask/auto-changelog": "^3.4.4", "@metamask/ethjs-provider-http": "^0.3.0", "@metamask/keyring-api": "^8.1.0", - "@metamask/keyring-controller": "^17.2.0", - "@metamask/network-controller": "^21.0.0", - "@metamask/preferences-controller": "^13.0.2", + "@metamask/keyring-controller": "^17.2.1", + "@metamask/network-controller": "^21.0.1", + "@metamask/preferences-controller": "^13.0.3", "@types/jest": "^27.4.1", "@types/lodash": "^4.14.191", "@types/node": "^16.18.54", diff --git a/packages/base-controller/CHANGELOG.md b/packages/base-controller/CHANGELOG.md index a342f4fbfe..a13d6d7994 100644 --- a/packages/base-controller/CHANGELOG.md +++ b/packages/base-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [7.0.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [7.0.0] ### Added @@ -245,7 +263,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/base-controller@7.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/base-controller@7.0.1...HEAD +[7.0.1]: https://github.com/MetaMask/core/compare/@metamask/base-controller@7.0.0...@metamask/base-controller@7.0.1 [7.0.0]: https://github.com/MetaMask/core/compare/@metamask/base-controller@6.0.3...@metamask/base-controller@7.0.0 [6.0.3]: https://github.com/MetaMask/core/compare/@metamask/base-controller@6.0.2...@metamask/base-controller@6.0.3 [6.0.2]: https://github.com/MetaMask/core/compare/@metamask/base-controller@6.0.1...@metamask/base-controller@6.0.2 diff --git a/packages/base-controller/package.json b/packages/base-controller/package.json index 0ea34b6c7f..81b114a095 100644 --- a/packages/base-controller/package.json +++ b/packages/base-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/base-controller", - "version": "7.0.0", + "version": "7.0.1", "description": "Provides scaffolding for controllers as well a communication system for all controllers", "keywords": [ "MetaMask", @@ -51,7 +51,7 @@ }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", - "@metamask/json-rpc-engine": "^9.0.2", + "@metamask/json-rpc-engine": "^9.0.3", "@types/jest": "^27.4.1", "@types/sinon": "^9.0.10", "deepmerge": "^4.2.2", diff --git a/packages/build-utils/CHANGELOG.md b/packages/build-utils/CHANGELOG.md index 2979089780..14f780c8f6 100644 --- a/packages/build-utils/CHANGELOG.md +++ b/packages/build-utils/CHANGELOG.md @@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.0.1] + +### Changed + +- Bump `@metamask/utils` from `^8.3.0` to `^9.1.0` ([#4516](https://github.com/MetaMask/core/pull/4516), [#4529](https://github.com/MetaMask/core/pull/4529)) +- Bump `@metamask/rpc-errors` from `^6.2.1` to `^6.3.1` ([#4516](https://github.com/MetaMask/core/pull/4516)) +- Bump TypeScript from `~4.9.5` to `~5.2.2` and set `moduleResolution` option to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645), [#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584)) + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [3.0.0] ### Changed @@ -45,7 +69,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release ([#3577](https://github.com/MetaMask/core/pull/3577) [#3588](https://github.com/MetaMask/core/pull/3588)) -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/build-utils@3.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/build-utils@3.0.1...HEAD +[3.0.1]: https://github.com/MetaMask/core/compare/@metamask/build-utils@3.0.0...@metamask/build-utils@3.0.1 [3.0.0]: https://github.com/MetaMask/core/compare/@metamask/build-utils@2.0.1...@metamask/build-utils@3.0.0 [2.0.1]: https://github.com/MetaMask/core/compare/@metamask/build-utils@2.0.0...@metamask/build-utils@2.0.1 [2.0.0]: https://github.com/MetaMask/core/compare/@metamask/build-utils@1.0.2...@metamask/build-utils@2.0.0 diff --git a/packages/build-utils/package.json b/packages/build-utils/package.json index 16c96448bc..25b5beacc0 100644 --- a/packages/build-utils/package.json +++ b/packages/build-utils/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/build-utils", - "version": "3.0.0", + "version": "3.0.1", "description": "Utilities for building MetaMask applications", "keywords": [ "MetaMask", diff --git a/packages/chain-controller/CHANGELOG.md b/packages/chain-controller/CHANGELOG.md index b34c828f27..34dbe22507 100644 --- a/packages/chain-controller/CHANGELOG.md +++ b/packages/chain-controller/CHANGELOG.md @@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.2] + +### Changed + +- Bump `@metamask/keyring-api` from `^8.0.1` to `^8.1.0` ([#4594](https://github.com/MetaMask/core/pull/4594)) +- Bump TypeScript from `~4.9.5` to `~5.2.2` and set `moduleResolution` option to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645), [#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584)) + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [0.1.1] ### Changed @@ -26,6 +49,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/chain-controller@0.1.1...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/chain-controller@0.1.2...HEAD +[0.1.2]: https://github.com/MetaMask/core/compare/@metamask/chain-controller@0.1.1...@metamask/chain-controller@0.1.2 [0.1.1]: https://github.com/MetaMask/core/compare/@metamask/chain-controller@0.1.0...@metamask/chain-controller@0.1.1 [0.1.0]: https://github.com/MetaMask/core/releases/tag/@metamask/chain-controller@0.1.0 diff --git a/packages/chain-controller/package.json b/packages/chain-controller/package.json index 7fc3ce8b1f..fa792eabb4 100644 --- a/packages/chain-controller/package.json +++ b/packages/chain-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/chain-controller", - "version": "0.1.1", + "version": "0.1.2", "description": "Manages chain-agnostic providers", "keywords": [ "MetaMask", @@ -47,7 +47,7 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", + "@metamask/base-controller": "^7.0.1", "@metamask/chain-api": "^0.1.0", "@metamask/keyring-api": "^8.1.0", "@metamask/snaps-controllers": "^9.7.0", diff --git a/packages/composable-controller/CHANGELOG.md b/packages/composable-controller/CHANGELOG.md index f23d01fb77..68d5afd5b7 100644 --- a/packages/composable-controller/CHANGELOG.md +++ b/packages/composable-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [9.0.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [9.0.0] ### Changed @@ -181,7 +199,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/composable-controller@9.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/composable-controller@9.0.1...HEAD +[9.0.1]: https://github.com/MetaMask/core/compare/@metamask/composable-controller@9.0.0...@metamask/composable-controller@9.0.1 [9.0.0]: https://github.com/MetaMask/core/compare/@metamask/composable-controller@8.0.0...@metamask/composable-controller@9.0.0 [8.0.0]: https://github.com/MetaMask/core/compare/@metamask/composable-controller@7.0.0...@metamask/composable-controller@8.0.0 [7.0.0]: https://github.com/MetaMask/core/compare/@metamask/composable-controller@6.0.2...@metamask/composable-controller@7.0.0 diff --git a/packages/composable-controller/package.json b/packages/composable-controller/package.json index 38b7d4e6a1..d700a42e01 100644 --- a/packages/composable-controller/package.json +++ b/packages/composable-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/composable-controller", - "version": "9.0.0", + "version": "9.0.1", "description": "Consolidates the state from multiple controllers into one", "keywords": [ "MetaMask", @@ -47,11 +47,11 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0" + "@metamask/base-controller": "^7.0.1" }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", - "@metamask/json-rpc-engine": "^9.0.2", + "@metamask/json-rpc-engine": "^9.0.3", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "immer": "^9.0.6", diff --git a/packages/controller-utils/CHANGELOG.md b/packages/controller-utils/CHANGELOG.md index 443dd80d4a..6b89c6f357 100644 --- a/packages/controller-utils/CHANGELOG.md +++ b/packages/controller-utils/CHANGELOG.md @@ -7,6 +7,29 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [11.3.0] + +### Added + +- Add types `TraceContext`, `TraceRequest`, `TraceCallback` ([#4655](https://github.com/MetaMask/core/pull/4655)) + - Migrated from `@metamask/transaction-controller@36.2.0`. + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [11.2.0] ### Added @@ -377,7 +400,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@11.2.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@11.3.0...HEAD +[11.3.0]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@11.2.0...@metamask/controller-utils@11.3.0 [11.2.0]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@11.1.0...@metamask/controller-utils@11.2.0 [11.1.0]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@11.0.2...@metamask/controller-utils@11.1.0 [11.0.2]: https://github.com/MetaMask/core/compare/@metamask/controller-utils@11.0.1...@metamask/controller-utils@11.0.2 diff --git a/packages/controller-utils/package.json b/packages/controller-utils/package.json index 8a49973a2b..5a9ea4b503 100644 --- a/packages/controller-utils/package.json +++ b/packages/controller-utils/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/controller-utils", - "version": "11.2.0", + "version": "11.3.0", "description": "Data and convenience functions shared by multiple packages", "keywords": [ "MetaMask", diff --git a/packages/ens-controller/CHANGELOG.md b/packages/ens-controller/CHANGELOG.md index 183b698827..39de208683 100644 --- a/packages/ens-controller/CHANGELOG.md +++ b/packages/ens-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [14.0.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [14.0.0] ### Changed @@ -229,7 +247,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/ens-controller@14.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/ens-controller@14.0.1...HEAD +[14.0.1]: https://github.com/MetaMask/core/compare/@metamask/ens-controller@14.0.0...@metamask/ens-controller@14.0.1 [14.0.0]: https://github.com/MetaMask/core/compare/@metamask/ens-controller@13.0.1...@metamask/ens-controller@14.0.0 [13.0.1]: https://github.com/MetaMask/core/compare/@metamask/ens-controller@13.0.0...@metamask/ens-controller@13.0.1 [13.0.0]: https://github.com/MetaMask/core/compare/@metamask/ens-controller@12.0.0...@metamask/ens-controller@13.0.0 diff --git a/packages/ens-controller/package.json b/packages/ens-controller/package.json index c16c5e7878..d13cf927a2 100644 --- a/packages/ens-controller/package.json +++ b/packages/ens-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/ens-controller", - "version": "14.0.0", + "version": "14.0.1", "description": "Maps ENS names to their resolved addresses by chain id", "keywords": [ "MetaMask", @@ -48,14 +48,14 @@ }, "dependencies": { "@ethersproject/providers": "^5.7.0", - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", "@metamask/utils": "^9.1.0", "punycode": "^2.1.1" }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", - "@metamask/network-controller": "^21.0.0", + "@metamask/network-controller": "^21.0.1", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "jest": "^27.5.1", diff --git a/packages/eth-json-rpc-provider/CHANGELOG.md b/packages/eth-json-rpc-provider/CHANGELOG.md index d49c618009..dc4040d848 100644 --- a/packages/eth-json-rpc-provider/CHANGELOG.md +++ b/packages/eth-json-rpc-provider/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [4.1.4] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [4.1.3] ### Changed @@ -144,7 +162,8 @@ Release `v2.0.0` is identical to `v1.0.1` aside from Node.js version requirement - Initial release, including `providerFromEngine` and `providerFromMiddleware`. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/eth-json-rpc-provider@4.1.3...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/eth-json-rpc-provider@4.1.4...HEAD +[4.1.4]: https://github.com/MetaMask/core/compare/@metamask/eth-json-rpc-provider@4.1.3...@metamask/eth-json-rpc-provider@4.1.4 [4.1.3]: https://github.com/MetaMask/core/compare/@metamask/eth-json-rpc-provider@4.1.2...@metamask/eth-json-rpc-provider@4.1.3 [4.1.2]: https://github.com/MetaMask/core/compare/@metamask/eth-json-rpc-provider@4.1.1...@metamask/eth-json-rpc-provider@4.1.2 [4.1.1]: https://github.com/MetaMask/core/compare/@metamask/eth-json-rpc-provider@4.1.0...@metamask/eth-json-rpc-provider@4.1.1 diff --git a/packages/eth-json-rpc-provider/package.json b/packages/eth-json-rpc-provider/package.json index fb771cc2f9..da014e3516 100644 --- a/packages/eth-json-rpc-provider/package.json +++ b/packages/eth-json-rpc-provider/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/eth-json-rpc-provider", - "version": "4.1.3", + "version": "4.1.4", "description": "Create an Ethereum provider using a JSON-RPC engine or middleware", "keywords": [ "MetaMask", @@ -52,7 +52,7 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/json-rpc-engine": "^9.0.2", + "@metamask/json-rpc-engine": "^9.0.3", "@metamask/rpc-errors": "^6.3.1", "@metamask/safe-event-emitter": "^3.0.0", "@metamask/utils": "^9.1.0", diff --git a/packages/gas-fee-controller/CHANGELOG.md b/packages/gas-fee-controller/CHANGELOG.md index 1b2d922ff1..a46a168658 100644 --- a/packages/gas-fee-controller/CHANGELOG.md +++ b/packages/gas-fee-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [20.0.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [20.0.0] ### Changed @@ -333,7 +351,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/gas-fee-controller@20.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/gas-fee-controller@20.0.1...HEAD +[20.0.1]: https://github.com/MetaMask/core/compare/@metamask/gas-fee-controller@20.0.0...@metamask/gas-fee-controller@20.0.1 [20.0.0]: https://github.com/MetaMask/core/compare/@metamask/gas-fee-controller@19.0.1...@metamask/gas-fee-controller@20.0.0 [19.0.1]: https://github.com/MetaMask/core/compare/@metamask/gas-fee-controller@19.0.0...@metamask/gas-fee-controller@19.0.1 [19.0.0]: https://github.com/MetaMask/core/compare/@metamask/gas-fee-controller@18.0.0...@metamask/gas-fee-controller@19.0.0 diff --git a/packages/gas-fee-controller/package.json b/packages/gas-fee-controller/package.json index f7187b2128..e5800df718 100644 --- a/packages/gas-fee-controller/package.json +++ b/packages/gas-fee-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/gas-fee-controller", - "version": "20.0.0", + "version": "20.0.1", "description": "Periodically calculates gas fee estimates based on various gas limits as well as other data displayed on transaction confirm screens", "keywords": [ "MetaMask", @@ -47,11 +47,11 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", "@metamask/eth-query": "^4.0.0", "@metamask/ethjs-unit": "^0.3.0", - "@metamask/polling-controller": "^10.0.0", + "@metamask/polling-controller": "^10.0.1", "@metamask/utils": "^9.1.0", "@types/bn.js": "^5.1.5", "@types/uuid": "^8.3.0", @@ -60,7 +60,7 @@ }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", - "@metamask/network-controller": "^21.0.0", + "@metamask/network-controller": "^21.0.1", "@types/jest": "^27.4.1", "@types/jest-when": "^2.7.3", "deepmerge": "^4.2.2", diff --git a/packages/json-rpc-engine/CHANGELOG.md b/packages/json-rpc-engine/CHANGELOG.md index 1c56fb1947..7875b53925 100644 --- a/packages/json-rpc-engine/CHANGELOG.md +++ b/packages/json-rpc-engine/CHANGELOG.md @@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [9.0.3] + +### Changed + +- Bump TypeScript from `~5.0.4` to `~5.2.2` ([#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584)) + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [9.0.2] ### Changed @@ -181,7 +203,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 This change may affect consumers that depend on the eager execution of middleware _during_ request processing, _outside of_ middleware functions and request handlers. - In general, it is a bad practice to work with state that depends on middleware execution, while the middleware are executing. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@9.0.2...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@9.0.3...HEAD +[9.0.3]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@9.0.2...@metamask/json-rpc-engine@9.0.3 [9.0.2]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@9.0.1...@metamask/json-rpc-engine@9.0.2 [9.0.1]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@9.0.0...@metamask/json-rpc-engine@9.0.1 [9.0.0]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-engine@8.0.2...@metamask/json-rpc-engine@9.0.0 diff --git a/packages/json-rpc-engine/package.json b/packages/json-rpc-engine/package.json index 121dbd099c..93b4e77c92 100644 --- a/packages/json-rpc-engine/package.json +++ b/packages/json-rpc-engine/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/json-rpc-engine", - "version": "9.0.2", + "version": "9.0.3", "description": "A tool for processing JSON-RPC messages", "keywords": [ "MetaMask", diff --git a/packages/json-rpc-middleware-stream/CHANGELOG.md b/packages/json-rpc-middleware-stream/CHANGELOG.md index f785b6119c..12881b5b25 100644 --- a/packages/json-rpc-middleware-stream/CHANGELOG.md +++ b/packages/json-rpc-middleware-stream/CHANGELOG.md @@ -7,6 +7,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [8.0.3] + +### Changed + +- Bump TypeScript from `~5.0.4` to `~5.2.2` ([#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584)) + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [8.0.2] ### Uncategorized @@ -149,7 +171,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - TypeScript typings ([#11](https://github.com/MetaMask/json-rpc-middleware-stream/pull/11)) -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-middleware-stream@8.0.2...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-middleware-stream@8.0.3...HEAD +[8.0.3]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-middleware-stream@8.0.2...@metamask/json-rpc-middleware-stream@8.0.3 [8.0.2]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-middleware-stream@8.0.1...@metamask/json-rpc-middleware-stream@8.0.2 [8.0.1]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-middleware-stream@8.0.0...@metamask/json-rpc-middleware-stream@8.0.1 [8.0.0]: https://github.com/MetaMask/core/compare/@metamask/json-rpc-middleware-stream@7.0.2...@metamask/json-rpc-middleware-stream@8.0.0 diff --git a/packages/json-rpc-middleware-stream/package.json b/packages/json-rpc-middleware-stream/package.json index 5c6a127d72..6efe02fa67 100644 --- a/packages/json-rpc-middleware-stream/package.json +++ b/packages/json-rpc-middleware-stream/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/json-rpc-middleware-stream", - "version": "8.0.2", + "version": "8.0.3", "description": "A small toolset for streaming JSON-RPC data and matching requests and responses", "keywords": [ "MetaMask", @@ -47,7 +47,7 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/json-rpc-engine": "^9.0.2", + "@metamask/json-rpc-engine": "^9.0.3", "@metamask/safe-event-emitter": "^3.0.0", "@metamask/utils": "^9.1.0", "readable-stream": "^3.6.2" diff --git a/packages/keyring-controller/CHANGELOG.md b/packages/keyring-controller/CHANGELOG.md index 41f035bfc3..c5f1fa16ba 100644 --- a/packages/keyring-controller/CHANGELOG.md +++ b/packages/keyring-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [17.2.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [17.2.0] ### Added @@ -533,7 +551,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@17.2.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@17.2.1...HEAD +[17.2.1]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@17.2.0...@metamask/keyring-controller@17.2.1 [17.2.0]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@17.1.2...@metamask/keyring-controller@17.2.0 [17.1.2]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@17.1.1...@metamask/keyring-controller@17.1.2 [17.1.1]: https://github.com/MetaMask/core/compare/@metamask/keyring-controller@17.1.0...@metamask/keyring-controller@17.1.1 diff --git a/packages/keyring-controller/package.json b/packages/keyring-controller/package.json index a58a90b87e..5d875e5761 100644 --- a/packages/keyring-controller/package.json +++ b/packages/keyring-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/keyring-controller", - "version": "17.2.0", + "version": "17.2.1", "description": "Stores identities seen in the wallet and manages interactions such as signing", "keywords": [ "MetaMask", @@ -49,13 +49,13 @@ "dependencies": { "@ethereumjs/util": "^8.1.0", "@keystonehq/metamask-airgapped-keyring": "^0.14.1", - "@metamask/base-controller": "^7.0.0", + "@metamask/base-controller": "^7.0.1", "@metamask/browser-passworder": "^4.3.0", "@metamask/eth-hd-keyring": "^7.0.1", "@metamask/eth-sig-util": "^7.0.1", "@metamask/eth-simple-keyring": "^6.0.1", "@metamask/keyring-api": "^8.1.0", - "@metamask/message-manager": "^10.1.0", + "@metamask/message-manager": "^10.1.1", "@metamask/utils": "^9.1.0", "async-mutex": "^0.5.0", "ethereumjs-wallet": "^1.0.1", diff --git a/packages/logging-controller/CHANGELOG.md b/packages/logging-controller/CHANGELOG.md index 1637584baa..82cca1e14f 100644 --- a/packages/logging-controller/CHANGELOG.md +++ b/packages/logging-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [6.0.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [6.0.0] ### Added @@ -120,7 +138,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial Release - Add logging controller ([#1089](https://github.com/MetaMask/core.git/pull/1089)) -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/logging-controller@6.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/logging-controller@6.0.1...HEAD +[6.0.1]: https://github.com/MetaMask/core/compare/@metamask/logging-controller@6.0.0...@metamask/logging-controller@6.0.1 [6.0.0]: https://github.com/MetaMask/core/compare/@metamask/logging-controller@5.0.0...@metamask/logging-controller@6.0.0 [5.0.0]: https://github.com/MetaMask/core/compare/@metamask/logging-controller@4.0.0...@metamask/logging-controller@5.0.0 [4.0.0]: https://github.com/MetaMask/core/compare/@metamask/logging-controller@3.0.1...@metamask/logging-controller@4.0.0 diff --git a/packages/logging-controller/package.json b/packages/logging-controller/package.json index d0c500cd24..2ee5a020fd 100644 --- a/packages/logging-controller/package.json +++ b/packages/logging-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/logging-controller", - "version": "6.0.0", + "version": "6.0.1", "description": "Manages logging data to assist users and support staff", "keywords": [ "MetaMask", @@ -47,8 +47,8 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", "uuid": "^8.3.2" }, "devDependencies": { diff --git a/packages/message-manager/CHANGELOG.md b/packages/message-manager/CHANGELOG.md index 2f75e8b740..c84190639a 100644 --- a/packages/message-manager/CHANGELOG.md +++ b/packages/message-manager/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [10.1.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [10.1.0] ### Added @@ -295,7 +313,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/message-manager@10.1.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/message-manager@10.1.1...HEAD +[10.1.1]: https://github.com/MetaMask/core/compare/@metamask/message-manager@10.1.0...@metamask/message-manager@10.1.1 [10.1.0]: https://github.com/MetaMask/core/compare/@metamask/message-manager@10.0.3...@metamask/message-manager@10.1.0 [10.0.3]: https://github.com/MetaMask/core/compare/@metamask/message-manager@10.0.2...@metamask/message-manager@10.0.3 [10.0.2]: https://github.com/MetaMask/core/compare/@metamask/message-manager@10.0.1...@metamask/message-manager@10.0.2 diff --git a/packages/message-manager/package.json b/packages/message-manager/package.json index c2c21458fb..564a69047f 100644 --- a/packages/message-manager/package.json +++ b/packages/message-manager/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/message-manager", - "version": "10.1.0", + "version": "10.1.1", "description": "Stores and manages interactions with signing requests", "keywords": [ "MetaMask", @@ -47,8 +47,8 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", "@metamask/eth-sig-util": "^7.0.1", "@metamask/utils": "^9.1.0", "@types/uuid": "^8.3.0", diff --git a/packages/name-controller/CHANGELOG.md b/packages/name-controller/CHANGELOG.md index 1d76978d49..8356aaac5e 100644 --- a/packages/name-controller/CHANGELOG.md +++ b/packages/name-controller/CHANGELOG.md @@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [8.0.1] + +### Changed + +- Bump `@metamask/utils` from `^8.3.0` to `^9.1.0` ([#4516](https://github.com/MetaMask/core/pull/4516), [#4529](https://github.com/MetaMask/core/pull/4529)) +- Bump `@metamask/rpc-errors` from `^6.2.1` to `^6.3.1` ([#4516](https://github.com/MetaMask/core/pull/4516)) +- Bump TypeScript from `~4.9.5` to `~5.2.2` and set `moduleResolution` option to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645), [#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584)) + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [8.0.0] ### Changed @@ -121,7 +145,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial Release ([#1647](https://github.com/MetaMask/core/pull/1647)) -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/name-controller@8.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/name-controller@8.0.1...HEAD +[8.0.1]: https://github.com/MetaMask/core/compare/@metamask/name-controller@8.0.0...@metamask/name-controller@8.0.1 [8.0.0]: https://github.com/MetaMask/core/compare/@metamask/name-controller@7.0.0...@metamask/name-controller@8.0.0 [7.0.0]: https://github.com/MetaMask/core/compare/@metamask/name-controller@6.0.1...@metamask/name-controller@7.0.0 [6.0.1]: https://github.com/MetaMask/core/compare/@metamask/name-controller@6.0.0...@metamask/name-controller@6.0.1 diff --git a/packages/name-controller/package.json b/packages/name-controller/package.json index e90c464d30..0645926d3d 100644 --- a/packages/name-controller/package.json +++ b/packages/name-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/name-controller", - "version": "8.0.0", + "version": "8.0.1", "description": "Stores and suggests names for values such as Ethereum addresses", "keywords": [ "MetaMask", @@ -48,8 +48,8 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", "@metamask/utils": "^9.1.0", "async-mutex": "^0.5.0" }, diff --git a/packages/network-controller/CHANGELOG.md b/packages/network-controller/CHANGELOG.md index a30968e8ce..fab88656ba 100644 --- a/packages/network-controller/CHANGELOG.md +++ b/packages/network-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [21.0.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [21.0.0] ### Added @@ -605,7 +623,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@21.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/network-controller@21.0.1...HEAD +[21.0.1]: https://github.com/MetaMask/core/compare/@metamask/network-controller@21.0.0...@metamask/network-controller@21.0.1 [21.0.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@20.2.0...@metamask/network-controller@21.0.0 [20.2.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@20.1.0...@metamask/network-controller@20.2.0 [20.1.0]: https://github.com/MetaMask/core/compare/@metamask/network-controller@20.0.0...@metamask/network-controller@20.1.0 diff --git a/packages/network-controller/package.json b/packages/network-controller/package.json index f4f65d6eef..60a792c675 100644 --- a/packages/network-controller/package.json +++ b/packages/network-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/network-controller", - "version": "21.0.0", + "version": "21.0.1", "description": "Provides an interface to the currently selected network via a MetaMask-compatible provider object", "keywords": [ "MetaMask", @@ -47,14 +47,14 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", "@metamask/eth-block-tracker": "^10.0.0", "@metamask/eth-json-rpc-infura": "^9.1.0", "@metamask/eth-json-rpc-middleware": "^13.0.0", - "@metamask/eth-json-rpc-provider": "^4.1.3", + "@metamask/eth-json-rpc-provider": "^4.1.4", "@metamask/eth-query": "^4.0.0", - "@metamask/json-rpc-engine": "^9.0.2", + "@metamask/json-rpc-engine": "^9.0.3", "@metamask/rpc-errors": "^6.3.1", "@metamask/swappable-obj-proxy": "^2.2.0", "@metamask/utils": "^9.1.0", diff --git a/packages/notification-controller/CHANGELOG.md b/packages/notification-controller/CHANGELOG.md index 182d9021cc..98ef1cb498 100644 --- a/packages/notification-controller/CHANGELOG.md +++ b/packages/notification-controller/CHANGELOG.md @@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [6.0.1] + +### Changed + +- Bump `@metamask/utils` from `^8.3.0` to `^9.1.0` ([#4516](https://github.com/MetaMask/core/pull/4516), [#4529](https://github.com/MetaMask/core/pull/4529)) +- Bump `@metamask/rpc-errors` from `^6.2.1` to `^6.3.1` ([#4516](https://github.com/MetaMask/core/pull/4516)) +- Bump TypeScript from `~4.9.5` to `~5.2.2` and set `moduleResolution` option to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645), [#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584)) + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [6.0.0] ### Changed @@ -123,7 +147,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/notification-controller@6.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/notification-controller@6.0.1...HEAD +[6.0.1]: https://github.com/MetaMask/core/compare/@metamask/notification-controller@6.0.0...@metamask/notification-controller@6.0.1 [6.0.0]: https://github.com/MetaMask/core/compare/@metamask/notification-controller@5.0.2...@metamask/notification-controller@6.0.0 [5.0.2]: https://github.com/MetaMask/core/compare/@metamask/notification-controller@5.0.1...@metamask/notification-controller@5.0.2 [5.0.1]: https://github.com/MetaMask/core/compare/@metamask/notification-controller@5.0.0...@metamask/notification-controller@5.0.1 diff --git a/packages/notification-controller/package.json b/packages/notification-controller/package.json index acae0afade..380a8e3ba7 100644 --- a/packages/notification-controller/package.json +++ b/packages/notification-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/notification-controller", - "version": "6.0.0", + "version": "6.0.1", "description": "Manages display of notifications within MetaMask", "keywords": [ "MetaMask", @@ -47,7 +47,7 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", + "@metamask/base-controller": "^7.0.1", "@metamask/utils": "^9.1.0", "nanoid": "^3.1.31" }, diff --git a/packages/notification-services-controller/CHANGELOG.md b/packages/notification-services-controller/CHANGELOG.md index c4057c52e8..9a543a44f1 100644 --- a/packages/notification-services-controller/CHANGELOG.md +++ b/packages/notification-services-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.5.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [0.5.0] ### Changed @@ -123,7 +141,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/notification-services-controller@0.5.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/notification-services-controller@0.5.1...HEAD +[0.5.1]: https://github.com/MetaMask/core/compare/@metamask/notification-services-controller@0.5.0...@metamask/notification-services-controller@0.5.1 [0.5.0]: https://github.com/MetaMask/core/compare/@metamask/notification-services-controller@0.4.1...@metamask/notification-services-controller@0.5.0 [0.4.1]: https://github.com/MetaMask/core/compare/@metamask/notification-services-controller@0.4.0...@metamask/notification-services-controller@0.4.1 [0.4.0]: https://github.com/MetaMask/core/compare/@metamask/notification-services-controller@0.3.0...@metamask/notification-services-controller@0.4.0 diff --git a/packages/notification-services-controller/package.json b/packages/notification-services-controller/package.json index 47521ffe04..2586e0d84e 100644 --- a/packages/notification-services-controller/package.json +++ b/packages/notification-services-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/notification-services-controller", - "version": "0.5.0", + "version": "0.5.1", "description": "Manages New MetaMask decentralized Notification system", "keywords": [ "MetaMask", @@ -75,8 +75,8 @@ }, "dependencies": { "@contentful/rich-text-html-renderer": "^16.5.2", - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", "bignumber.js": "^4.1.0", "firebase": "^10.11.0", "loglevel": "^1.8.1", @@ -85,8 +85,8 @@ "devDependencies": { "@lavamoat/allow-scripts": "^3.0.4", "@metamask/auto-changelog": "^3.4.4", - "@metamask/keyring-controller": "^17.2.0", - "@metamask/profile-sync-controller": "^0.5.0", + "@metamask/keyring-controller": "^17.2.1", + "@metamask/profile-sync-controller": "^0.6.0", "@types/jest": "^27.4.1", "@types/readable-stream": "^2.3.0", "contentful": "^10.15.0", @@ -101,7 +101,7 @@ }, "peerDependencies": { "@metamask/keyring-controller": "^17.0.0", - "@metamask/profile-sync-controller": "^0.5.0" + "@metamask/profile-sync-controller": "^0.0.0" }, "engines": { "node": "^18.18 || >=20" diff --git a/packages/permission-controller/CHANGELOG.md b/packages/permission-controller/CHANGELOG.md index 40593f0b67..0547eae7a3 100644 --- a/packages/permission-controller/CHANGELOG.md +++ b/packages/permission-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [11.0.2] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [11.0.1] ### Changed @@ -272,7 +290,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/permission-controller@11.0.1...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/permission-controller@11.0.2...HEAD +[11.0.2]: https://github.com/MetaMask/core/compare/@metamask/permission-controller@11.0.1...@metamask/permission-controller@11.0.2 [11.0.1]: https://github.com/MetaMask/core/compare/@metamask/permission-controller@11.0.0...@metamask/permission-controller@11.0.1 [11.0.0]: https://github.com/MetaMask/core/compare/@metamask/permission-controller@10.0.1...@metamask/permission-controller@11.0.0 [10.0.1]: https://github.com/MetaMask/core/compare/@metamask/permission-controller@10.0.0...@metamask/permission-controller@10.0.1 diff --git a/packages/permission-controller/package.json b/packages/permission-controller/package.json index 3c462cc9d6..9616de8809 100644 --- a/packages/permission-controller/package.json +++ b/packages/permission-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/permission-controller", - "version": "11.0.1", + "version": "11.0.2", "description": "Mediates access to JSON-RPC methods, used to interact with pieces of the MetaMask stack, via middleware for json-rpc-engine", "keywords": [ "MetaMask", @@ -47,9 +47,9 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", - "@metamask/json-rpc-engine": "^9.0.2", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", + "@metamask/json-rpc-engine": "^9.0.3", "@metamask/rpc-errors": "^6.3.1", "@metamask/utils": "^9.1.0", "@types/deep-freeze-strict": "^1.1.0", @@ -58,7 +58,7 @@ "nanoid": "^3.1.31" }, "devDependencies": { - "@metamask/approval-controller": "^7.0.3", + "@metamask/approval-controller": "^7.0.4", "@metamask/auto-changelog": "^3.4.4", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", diff --git a/packages/permission-log-controller/CHANGELOG.md b/packages/permission-log-controller/CHANGELOG.md index ad1ff6dd12..8b56667958 100644 --- a/packages/permission-log-controller/CHANGELOG.md +++ b/packages/permission-log-controller/CHANGELOG.md @@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [3.0.1] + +### Changed + +- Bump `@metamask/utils` from `^8.3.0` to `^9.1.0` ([#4516](https://github.com/MetaMask/core/pull/4516), [#4529](https://github.com/MetaMask/core/pull/4529)) +- Bump `@metamask/rpc-errors` from `^6.2.1` to `^6.3.1` ([#4516](https://github.com/MetaMask/core/pull/4516)) +- Bump TypeScript from `~4.9.5` to `~5.2.2` and set `moduleResolution` option to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645), [#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584)) + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [3.0.0] ### Changed @@ -47,7 +71,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/permission-log-controller@3.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/permission-log-controller@3.0.1...HEAD +[3.0.1]: https://github.com/MetaMask/core/compare/@metamask/permission-log-controller@3.0.0...@metamask/permission-log-controller@3.0.1 [3.0.0]: https://github.com/MetaMask/core/compare/@metamask/permission-log-controller@2.0.2...@metamask/permission-log-controller@3.0.0 [2.0.2]: https://github.com/MetaMask/core/compare/@metamask/permission-log-controller@2.0.1...@metamask/permission-log-controller@2.0.2 [2.0.1]: https://github.com/MetaMask/core/compare/@metamask/permission-log-controller@2.0.0...@metamask/permission-log-controller@2.0.1 diff --git a/packages/permission-log-controller/package.json b/packages/permission-log-controller/package.json index 0b9e936ed0..5ec47ea005 100644 --- a/packages/permission-log-controller/package.json +++ b/packages/permission-log-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/permission-log-controller", - "version": "3.0.0", + "version": "3.0.1", "description": "Controller with middleware for logging requests and responses to restricted and permissions-related methods", "keywords": [ "MetaMask", @@ -47,8 +47,8 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/json-rpc-engine": "^9.0.2", + "@metamask/base-controller": "^7.0.1", + "@metamask/json-rpc-engine": "^9.0.3", "@metamask/utils": "^9.1.0" }, "devDependencies": { diff --git a/packages/phishing-controller/CHANGELOG.md b/packages/phishing-controller/CHANGELOG.md index 2166a7d81e..aa90accb32 100644 --- a/packages/phishing-controller/CHANGELOG.md +++ b/packages/phishing-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [12.0.3] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [12.0.2] ### Fixed @@ -269,7 +287,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@12.0.2...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@12.0.3...HEAD +[12.0.3]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@12.0.2...@metamask/phishing-controller@12.0.3 [12.0.2]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@12.0.1...@metamask/phishing-controller@12.0.2 [12.0.1]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@12.0.0...@metamask/phishing-controller@12.0.1 [12.0.0]: https://github.com/MetaMask/core/compare/@metamask/phishing-controller@11.0.0...@metamask/phishing-controller@12.0.0 diff --git a/packages/phishing-controller/package.json b/packages/phishing-controller/package.json index 28947ff1ec..04af46d7db 100644 --- a/packages/phishing-controller/package.json +++ b/packages/phishing-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/phishing-controller", - "version": "12.0.2", + "version": "12.0.3", "description": "Maintains a periodically updated list of approved and unapproved website origins", "keywords": [ "MetaMask", @@ -47,8 +47,8 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", "@noble/hashes": "^1.4.0", "@types/punycode": "^2.1.0", "eth-phishing-detect": "^1.2.0", diff --git a/packages/polling-controller/CHANGELOG.md b/packages/polling-controller/CHANGELOG.md index d176caccbc..5242e9352a 100644 --- a/packages/polling-controller/CHANGELOG.md +++ b/packages/polling-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [10.0.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [10.0.0] ### Changed @@ -169,7 +187,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@10.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@10.0.1...HEAD +[10.0.1]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@10.0.0...@metamask/polling-controller@10.0.1 [10.0.0]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@9.0.1...@metamask/polling-controller@10.0.0 [9.0.1]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@9.0.0...@metamask/polling-controller@9.0.1 [9.0.0]: https://github.com/MetaMask/core/compare/@metamask/polling-controller@8.0.0...@metamask/polling-controller@9.0.0 diff --git a/packages/polling-controller/package.json b/packages/polling-controller/package.json index 503bd198db..92d828e83d 100644 --- a/packages/polling-controller/package.json +++ b/packages/polling-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/polling-controller", - "version": "10.0.0", + "version": "10.0.1", "description": "Polling Controller is the base for controllers that polling by networkClientId", "keywords": [ "MetaMask", @@ -47,8 +47,8 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", "@metamask/utils": "^9.1.0", "@types/uuid": "^8.3.0", "fast-json-stable-stringify": "^2.1.0", @@ -56,7 +56,7 @@ }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", - "@metamask/network-controller": "^21.0.0", + "@metamask/network-controller": "^21.0.1", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "jest": "^27.5.1", diff --git a/packages/preferences-controller/CHANGELOG.md b/packages/preferences-controller/CHANGELOG.md index 5737eb2625..b00fe6a3ae 100644 --- a/packages/preferences-controller/CHANGELOG.md +++ b/packages/preferences-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [13.0.3] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [13.0.2] ### Changed @@ -264,7 +282,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/preferences-controller@13.0.2...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/preferences-controller@13.0.3...HEAD +[13.0.3]: https://github.com/MetaMask/core/compare/@metamask/preferences-controller@13.0.2...@metamask/preferences-controller@13.0.3 [13.0.2]: https://github.com/MetaMask/core/compare/@metamask/preferences-controller@13.0.1...@metamask/preferences-controller@13.0.2 [13.0.1]: https://github.com/MetaMask/core/compare/@metamask/preferences-controller@13.0.0...@metamask/preferences-controller@13.0.1 [13.0.0]: https://github.com/MetaMask/core/compare/@metamask/preferences-controller@12.0.0...@metamask/preferences-controller@13.0.0 diff --git a/packages/preferences-controller/package.json b/packages/preferences-controller/package.json index a14cd0edbe..ab33d46aff 100644 --- a/packages/preferences-controller/package.json +++ b/packages/preferences-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/preferences-controller", - "version": "13.0.2", + "version": "13.0.3", "description": "Manages user-configurable settings for MetaMask", "keywords": [ "MetaMask", @@ -47,12 +47,12 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0" + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0" }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", - "@metamask/keyring-controller": "^17.2.0", + "@metamask/keyring-controller": "^17.2.1", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "jest": "^27.5.1", diff --git a/packages/profile-sync-controller/CHANGELOG.md b/packages/profile-sync-controller/CHANGELOG.md index 4fa073df1f..95acfab30f 100644 --- a/packages/profile-sync-controller/CHANGELOG.md +++ b/packages/profile-sync-controller/CHANGELOG.md @@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.6.0] + +### Added + +- Add network synchronisation logic ([#4694](https://github.com/MetaMask/core/pull/4694), [#4687](https://github.com/MetaMask/core/pull/4687), [#4685](https://github.com/MetaMask/core/pull/4685), [#4684](https://github.com/MetaMask/core/pull/4684)) +- Add a `canSync` check for account synchronisation ([#4690](https://github.com/MetaMask/core/pull/4690)) +- Add `onAccountAdded` and `onAccountNameUpdated` events to `UserStorageController` ([#4707](https://github.com/MetaMask/core/pull/4707)) + +### Changed + +- Bump `@metamask/snaps-sdk` from `^6.1.1` to `^6.5.0` ([#4689](https://github.com/MetaMask/core/pull/4689)) +- Bump `@metamask/snaps-utils` from `^7.8.1` to `^8.1.1` ([#4689](https://github.com/MetaMask/core/pull/4689)) +- Bump peer dependency `@metamask/snaps-controllers` from `^9.3.0` to `^9.7.0` ([#4689](https://github.com/MetaMask/core/pull/4689)) + +### Removed + +- **BREAKING:** Remove `getAccountByAddress` action ([#4693](https://github.com/MetaMask/core/pull/4693)) + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. +- Remove extra slash when constructing user storage url ([#4702](https://github.com/MetaMask/core/pull/4702)) +- Await encryption promise ([#4705](https://github.com/MetaMask/core/pull/4705)) + ## [0.5.0] ### Added @@ -149,7 +185,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/profile-sync-controller@0.5.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/profile-sync-controller@0.6.0...HEAD +[0.6.0]: https://github.com/MetaMask/core/compare/@metamask/profile-sync-controller@0.5.0...@metamask/profile-sync-controller@0.6.0 [0.5.0]: https://github.com/MetaMask/core/compare/@metamask/profile-sync-controller@0.4.0...@metamask/profile-sync-controller@0.5.0 [0.4.0]: https://github.com/MetaMask/core/compare/@metamask/profile-sync-controller@0.3.0...@metamask/profile-sync-controller@0.4.0 [0.3.0]: https://github.com/MetaMask/core/compare/@metamask/profile-sync-controller@0.2.1...@metamask/profile-sync-controller@0.3.0 diff --git a/packages/profile-sync-controller/package.json b/packages/profile-sync-controller/package.json index c218ef2bea..aeca017f97 100644 --- a/packages/profile-sync-controller/package.json +++ b/packages/profile-sync-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/profile-sync-controller", - "version": "0.5.0", + "version": "0.6.0", "description": "The profile sync helps developers synchronize data across multiple clients and devices in a privacy-preserving way. All data saved in the user storage database is encrypted client-side to preserve privacy. The user storage provides a modular design, giving developers the flexibility to construct and manage their storage spaces in a way that best suits their needs", "keywords": [ "MetaMask", @@ -74,7 +74,7 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", + "@metamask/base-controller": "^7.0.1", "@metamask/snaps-sdk": "^6.5.0", "@metamask/snaps-utils": "^8.1.1", "@noble/ciphers": "^0.5.2", @@ -85,11 +85,11 @@ }, "devDependencies": { "@lavamoat/allow-scripts": "^3.0.4", - "@metamask/accounts-controller": "^18.2.0", + "@metamask/accounts-controller": "^18.2.1", "@metamask/auto-changelog": "^3.4.4", "@metamask/keyring-api": "^8.1.0", - "@metamask/keyring-controller": "^17.2.0", - "@metamask/network-controller": "^21.0.0", + "@metamask/keyring-controller": "^17.2.1", + "@metamask/network-controller": "^21.0.1", "@metamask/snaps-controllers": "^9.7.0", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", diff --git a/packages/queued-request-controller/CHANGELOG.md b/packages/queued-request-controller/CHANGELOG.md index b1a8bd2c58..80b4e206e8 100644 --- a/packages/queued-request-controller/CHANGELOG.md +++ b/packages/queued-request-controller/CHANGELOG.md @@ -7,6 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [5.0.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. +- Remove extra slash when constructing user storage url ([#4702](https://github.com/MetaMask/core/pull/4702)) + ## [5.0.0] ### Changed @@ -242,7 +261,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/queued-request-controller@5.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/queued-request-controller@5.0.1...HEAD +[5.0.1]: https://github.com/MetaMask/core/compare/@metamask/queued-request-controller@5.0.0...@metamask/queued-request-controller@5.0.1 [5.0.0]: https://github.com/MetaMask/core/compare/@metamask/queued-request-controller@4.0.0...@metamask/queued-request-controller@5.0.0 [4.0.0]: https://github.com/MetaMask/core/compare/@metamask/queued-request-controller@3.0.0...@metamask/queued-request-controller@4.0.0 [3.0.0]: https://github.com/MetaMask/core/compare/@metamask/queued-request-controller@2.0.0...@metamask/queued-request-controller@3.0.0 diff --git a/packages/queued-request-controller/package.json b/packages/queued-request-controller/package.json index 174e2a0830..c944b16449 100644 --- a/packages/queued-request-controller/package.json +++ b/packages/queued-request-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/queued-request-controller", - "version": "5.0.0", + "version": "5.0.1", "description": "Includes a controller and middleware that implements a request queue", "keywords": [ "MetaMask", @@ -47,17 +47,17 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", - "@metamask/json-rpc-engine": "^9.0.2", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", + "@metamask/json-rpc-engine": "^9.0.3", "@metamask/rpc-errors": "^6.3.1", "@metamask/swappable-obj-proxy": "^2.2.0", "@metamask/utils": "^9.1.0" }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", - "@metamask/network-controller": "^21.0.0", - "@metamask/selected-network-controller": "^18.0.0", + "@metamask/network-controller": "^21.0.1", + "@metamask/selected-network-controller": "^18.0.1", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "immer": "^9.0.6", diff --git a/packages/rate-limit-controller/CHANGELOG.md b/packages/rate-limit-controller/CHANGELOG.md index 91da273a4d..423b9699f8 100644 --- a/packages/rate-limit-controller/CHANGELOG.md +++ b/packages/rate-limit-controller/CHANGELOG.md @@ -7,6 +7,30 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [6.0.1] + +### Changed + +- Bump `@metamask/utils` from `^8.3.0` to `^9.1.0` ([#4516](https://github.com/MetaMask/core/pull/4516), [#4529](https://github.com/MetaMask/core/pull/4529)) +- Bump `@metamask/rpc-errors` from `^6.2.1` to `^6.3.1` ([#4516](https://github.com/MetaMask/core/pull/4516)) +- Bump TypeScript from `~4.9.5` to `~5.2.2` and set `moduleResolution` option to `Node16` ([#3645](https://github.com/MetaMask/core/pull/3645), [#4576](https://github.com/MetaMask/core/pull/4576), [#4584](https://github.com/MetaMask/core/pull/4584)) + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [6.0.0] ### Changed @@ -137,7 +161,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/rate-limit-controller@6.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/rate-limit-controller@6.0.1...HEAD +[6.0.1]: https://github.com/MetaMask/core/compare/@metamask/rate-limit-controller@6.0.0...@metamask/rate-limit-controller@6.0.1 [6.0.0]: https://github.com/MetaMask/core/compare/@metamask/rate-limit-controller@5.0.2...@metamask/rate-limit-controller@6.0.0 [5.0.2]: https://github.com/MetaMask/core/compare/@metamask/rate-limit-controller@5.0.1...@metamask/rate-limit-controller@5.0.2 [5.0.1]: https://github.com/MetaMask/core/compare/@metamask/rate-limit-controller@5.0.0...@metamask/rate-limit-controller@5.0.1 diff --git a/packages/rate-limit-controller/package.json b/packages/rate-limit-controller/package.json index f653dc3f1d..c663734490 100644 --- a/packages/rate-limit-controller/package.json +++ b/packages/rate-limit-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/rate-limit-controller", - "version": "6.0.0", + "version": "6.0.1", "description": "Contains logic for rate-limiting API endpoints by requesting origin", "keywords": [ "MetaMask", @@ -47,7 +47,7 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", + "@metamask/base-controller": "^7.0.1", "@metamask/rpc-errors": "^6.3.1", "@metamask/utils": "^9.1.0" }, diff --git a/packages/selected-network-controller/CHANGELOG.md b/packages/selected-network-controller/CHANGELOG.md index c1a0b92684..334e302493 100644 --- a/packages/selected-network-controller/CHANGELOG.md +++ b/packages/selected-network-controller/CHANGELOG.md @@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [18.0.1] + +### Changed + +- Redirect domains to default endpoint ([#4679](https://github.com/MetaMask/core/pull/4679)) + - When the default RPC endpoint changes for a network, domains that were + referencing a network client id on that network are redirected to the new + default RPC endpoint. + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [18.0.0] ### Changed @@ -261,7 +286,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial Release ([#1643](https://github.com/MetaMask/core/pull/1643)) -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@18.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@18.0.1...HEAD +[18.0.1]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@18.0.0...@metamask/selected-network-controller@18.0.1 [18.0.0]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@17.0.0...@metamask/selected-network-controller@18.0.0 [17.0.0]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@16.0.0...@metamask/selected-network-controller@17.0.0 [16.0.0]: https://github.com/MetaMask/core/compare/@metamask/selected-network-controller@15.0.2...@metamask/selected-network-controller@16.0.0 diff --git a/packages/selected-network-controller/package.json b/packages/selected-network-controller/package.json index cd344c8dc8..900e9d19a8 100644 --- a/packages/selected-network-controller/package.json +++ b/packages/selected-network-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/selected-network-controller", - "version": "18.0.0", + "version": "18.0.1", "description": "Provides an interface to the currently selected networkClientId for a given domain", "keywords": [ "MetaMask", @@ -47,15 +47,15 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/json-rpc-engine": "^9.0.2", + "@metamask/base-controller": "^7.0.1", + "@metamask/json-rpc-engine": "^9.0.3", "@metamask/swappable-obj-proxy": "^2.2.0", "@metamask/utils": "^9.1.0" }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", - "@metamask/network-controller": "^21.0.0", - "@metamask/permission-controller": "^11.0.1", + "@metamask/network-controller": "^21.0.1", + "@metamask/permission-controller": "^11.0.2", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "immer": "^9.0.6", diff --git a/packages/signature-controller/CHANGELOG.md b/packages/signature-controller/CHANGELOG.md index 15528a0342..599431ff22 100644 --- a/packages/signature-controller/CHANGELOG.md +++ b/packages/signature-controller/CHANGELOG.md @@ -7,6 +7,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [19.1.0] + +### Added + +- Add initial tracing to `SignatureController` ([#4655](https://github.com/MetaMask/core/pull/4655)) + - Adds an optional `trace` callback to the constructor, and an optional + `traceContext` option to the `newUnsignedTypedMessage` and + `newUnsignedPersonalMessage` methods. + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [19.0.0] ### Changed @@ -304,7 +329,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release ([#1214](https://github.com/MetaMask/core/pull/1214)) -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/signature-controller@19.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/signature-controller@19.1.0...HEAD +[19.1.0]: https://github.com/MetaMask/core/compare/@metamask/signature-controller@19.0.0...@metamask/signature-controller@19.1.0 [19.0.0]: https://github.com/MetaMask/core/compare/@metamask/signature-controller@18.1.0...@metamask/signature-controller@19.0.0 [18.1.0]: https://github.com/MetaMask/core/compare/@metamask/signature-controller@18.0.1...@metamask/signature-controller@18.1.0 [18.0.1]: https://github.com/MetaMask/core/compare/@metamask/signature-controller@18.0.0...@metamask/signature-controller@18.0.1 diff --git a/packages/signature-controller/package.json b/packages/signature-controller/package.json index 1d4f96884d..2289eb7637 100644 --- a/packages/signature-controller/package.json +++ b/packages/signature-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/signature-controller", - "version": "19.0.0", + "version": "19.1.0", "description": "Processes signing requests in order to sign arbitrary and typed data", "keywords": [ "MetaMask", @@ -47,17 +47,17 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", - "@metamask/message-manager": "^10.1.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", + "@metamask/message-manager": "^10.1.1", "@metamask/utils": "^9.1.0", "lodash": "^4.17.21" }, "devDependencies": { - "@metamask/approval-controller": "^7.0.3", + "@metamask/approval-controller": "^7.0.4", "@metamask/auto-changelog": "^3.4.4", - "@metamask/keyring-controller": "^17.2.0", - "@metamask/logging-controller": "^6.0.0", + "@metamask/keyring-controller": "^17.2.1", + "@metamask/logging-controller": "^6.0.1", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "jest": "^27.5.1", diff --git a/packages/transaction-controller/CHANGELOG.md b/packages/transaction-controller/CHANGELOG.md index dae1281d67..978abffdc0 100644 --- a/packages/transaction-controller/CHANGELOG.md +++ b/packages/transaction-controller/CHANGELOG.md @@ -7,6 +7,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [37.0.0] + +### Changed + +- Remove unapproved transactions during initialisation ([#4658](https://github.com/MetaMask/core/pull/4658)) +- Fail approved and signed transactions during initialisation ([#4658](https://github.com/MetaMask/core/pull/4658)) +- Remove `TraceContext`, `TraceRequest`, and `TraceCallback` types ([#4655](https://github.com/MetaMask/core/pull/4655)) + - These were moved to `@metamask/controller-utils`. + +### Removed + +- **BREAKING:** Remove `initApprovals` method ([#4658](https://github.com/MetaMask/core/pull/4658)) +- **BREAKING:** Remove `beforeApproveOnInit` hook ([#4658](https://github.com/MetaMask/core/pull/4658)) + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [36.1.0] ### Added @@ -993,7 +1023,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@36.1.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@37.0.0...HEAD +[37.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@36.1.0...@metamask/transaction-controller@37.0.0 [36.1.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@36.0.0...@metamask/transaction-controller@36.1.0 [36.0.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@35.2.0...@metamask/transaction-controller@36.0.0 [35.2.0]: https://github.com/MetaMask/core/compare/@metamask/transaction-controller@35.1.1...@metamask/transaction-controller@35.2.0 diff --git a/packages/transaction-controller/package.json b/packages/transaction-controller/package.json index d7d06f6ed3..ea906950b6 100644 --- a/packages/transaction-controller/package.json +++ b/packages/transaction-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/transaction-controller", - "version": "36.1.0", + "version": "37.0.0", "description": "Stores transactions alongside their periodically updated statuses and manages interactions such as approval and cancellation", "keywords": [ "MetaMask", @@ -53,8 +53,8 @@ "@ethersproject/abi": "^5.7.0", "@ethersproject/contracts": "^5.7.0", "@ethersproject/providers": "^5.7.0", - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", "@metamask/eth-query": "^4.0.0", "@metamask/metamask-eth-abis": "^3.1.1", "@metamask/nonce-tracker": "^6.0.0", @@ -69,14 +69,14 @@ }, "devDependencies": { "@babel/runtime": "^7.23.9", - "@metamask/accounts-controller": "^18.2.0", - "@metamask/approval-controller": "^7.0.3", + "@metamask/accounts-controller": "^18.2.1", + "@metamask/approval-controller": "^7.0.4", "@metamask/auto-changelog": "^3.4.4", - "@metamask/eth-json-rpc-provider": "^4.1.3", + "@metamask/eth-json-rpc-provider": "^4.1.4", "@metamask/ethjs-provider-http": "^0.3.0", - "@metamask/gas-fee-controller": "^20.0.0", + "@metamask/gas-fee-controller": "^20.0.1", "@metamask/keyring-api": "^8.1.0", - "@metamask/network-controller": "^21.0.0", + "@metamask/network-controller": "^21.0.1", "@types/bn.js": "^5.1.5", "@types/jest": "^27.4.1", "@types/node": "^16.18.54", diff --git a/packages/user-operation-controller/CHANGELOG.md b/packages/user-operation-controller/CHANGELOG.md index bab38635d5..df3273346d 100644 --- a/packages/user-operation-controller/CHANGELOG.md +++ b/packages/user-operation-controller/CHANGELOG.md @@ -7,6 +7,24 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [15.0.1] + +### Fixed + +- Produce and export ESM-compatible TypeScript type declaration files in addition to CommonJS-compatible declaration files ([#4648](https://github.com/MetaMask/core/pull/4648)) + - Previously, this package shipped with only one variant of type declaration + files, and these files were only CommonJS-compatible, and the `exports` + field in `package.json` linked to these files. This is an anti-pattern and + was rightfully flagged by the + ["Are the Types Wrong?"](https://arethetypeswrong.github.io/) tool as + ["masquerading as CJS"](https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/FalseCJS.md). + All of the ATTW checks now pass. +- Remove chunk files ([#4648](https://github.com/MetaMask/core/pull/4648)). + - Previously, the build tool we used to generate JavaScript files extracted + common code to "chunk" files. While this was intended to make this package + more tree-shakeable, it also made debugging more difficult for our + development teams. These chunk files are no longer present. + ## [15.0.0] ### Changed @@ -215,7 +233,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial Release ([#3749](https://github.com/MetaMask/core/pull/3749)) -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/user-operation-controller@15.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/user-operation-controller@15.0.1...HEAD +[15.0.1]: https://github.com/MetaMask/core/compare/@metamask/user-operation-controller@15.0.0...@metamask/user-operation-controller@15.0.1 [15.0.0]: https://github.com/MetaMask/core/compare/@metamask/user-operation-controller@14.0.1...@metamask/user-operation-controller@15.0.0 [14.0.1]: https://github.com/MetaMask/core/compare/@metamask/user-operation-controller@14.0.0...@metamask/user-operation-controller@14.0.1 [14.0.0]: https://github.com/MetaMask/core/compare/@metamask/user-operation-controller@13.0.0...@metamask/user-operation-controller@14.0.0 diff --git a/packages/user-operation-controller/package.json b/packages/user-operation-controller/package.json index ff16cb03bd..cbd61208ae 100644 --- a/packages/user-operation-controller/package.json +++ b/packages/user-operation-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/user-operation-controller", - "version": "15.0.0", + "version": "15.0.1", "description": "Creates user operations and manages their life cycle", "keywords": [ "MetaMask", @@ -48,10 +48,10 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/base-controller": "^7.0.0", - "@metamask/controller-utils": "^11.2.0", + "@metamask/base-controller": "^7.0.1", + "@metamask/controller-utils": "^11.3.0", "@metamask/eth-query": "^4.0.0", - "@metamask/polling-controller": "^10.0.0", + "@metamask/polling-controller": "^10.0.1", "@metamask/rpc-errors": "^6.3.1", "@metamask/superstruct": "^3.1.0", "@metamask/utils": "^9.1.0", @@ -61,12 +61,12 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@metamask/approval-controller": "^7.0.3", + "@metamask/approval-controller": "^7.0.4", "@metamask/auto-changelog": "^3.4.4", - "@metamask/gas-fee-controller": "^20.0.0", - "@metamask/keyring-controller": "^17.2.0", - "@metamask/network-controller": "^21.0.0", - "@metamask/transaction-controller": "^36.1.0", + "@metamask/gas-fee-controller": "^20.0.1", + "@metamask/keyring-controller": "^17.2.1", + "@metamask/network-controller": "^21.0.1", + "@metamask/transaction-controller": "^37.0.0", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "jest": "^27.5.1", @@ -80,7 +80,7 @@ "@metamask/gas-fee-controller": "^20.0.0", "@metamask/keyring-controller": "^17.0.0", "@metamask/network-controller": "^21.0.0", - "@metamask/transaction-controller": "^36.1.0" + "@metamask/transaction-controller": "^37.0.0" }, "engines": { "node": "^18.18 || >=20" diff --git a/yarn.lock b/yarn.lock index 718f28cb77..d64a1bd0b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2027,16 +2027,16 @@ __metadata: languageName: node linkType: hard -"@metamask/accounts-controller@npm:^18.2.0, @metamask/accounts-controller@workspace:packages/accounts-controller": +"@metamask/accounts-controller@npm:^18.2.1, @metamask/accounts-controller@workspace:packages/accounts-controller": version: 0.0.0-use.local resolution: "@metamask/accounts-controller@workspace:packages/accounts-controller" dependencies: "@ethereumjs/util": "npm:^8.1.0" "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" + "@metamask/base-controller": "npm:^7.0.1" "@metamask/eth-snap-keyring": "npm:^4.3.3" "@metamask/keyring-api": "npm:^8.1.0" - "@metamask/keyring-controller": "npm:^17.2.0" + "@metamask/keyring-controller": "npm:^17.2.1" "@metamask/snaps-controllers": "npm:^9.7.0" "@metamask/snaps-sdk": "npm:^6.5.0" "@metamask/snaps-utils": "npm:^8.1.1" @@ -2074,8 +2074,8 @@ __metadata: resolution: "@metamask/address-book-controller@workspace:packages/address-book-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" deepmerge: "npm:^4.2.2" @@ -2092,7 +2092,7 @@ __metadata: resolution: "@metamask/announcement-controller@workspace:packages/announcement-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" + "@metamask/base-controller": "npm:^7.0.1" "@types/jest": "npm:^27.4.1" deepmerge: "npm:^4.2.2" jest: "npm:^27.5.1" @@ -2103,12 +2103,12 @@ __metadata: languageName: unknown linkType: soft -"@metamask/approval-controller@npm:^7.0.2, @metamask/approval-controller@npm:^7.0.3, @metamask/approval-controller@workspace:packages/approval-controller": +"@metamask/approval-controller@npm:^7.0.2, @metamask/approval-controller@npm:^7.0.4, @metamask/approval-controller@workspace:packages/approval-controller": version: 0.0.0-use.local resolution: "@metamask/approval-controller@workspace:packages/approval-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" + "@metamask/base-controller": "npm:^7.0.1" "@metamask/rpc-errors": "npm:^6.3.1" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" @@ -2133,20 +2133,20 @@ __metadata: "@ethersproject/contracts": "npm:^5.7.0" "@ethersproject/providers": "npm:^5.7.0" "@metamask/abi-utils": "npm:^2.0.3" - "@metamask/accounts-controller": "npm:^18.2.0" - "@metamask/approval-controller": "npm:^7.0.3" + "@metamask/accounts-controller": "npm:^18.2.1" + "@metamask/approval-controller": "npm:^7.0.4" "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" + "@metamask/base-controller": "npm:^7.0.1" "@metamask/contract-metadata": "npm:^2.4.0" - "@metamask/controller-utils": "npm:^11.2.0" + "@metamask/controller-utils": "npm:^11.3.0" "@metamask/eth-query": "npm:^4.0.0" "@metamask/ethjs-provider-http": "npm:^0.3.0" "@metamask/keyring-api": "npm:^8.1.0" - "@metamask/keyring-controller": "npm:^17.2.0" + "@metamask/keyring-controller": "npm:^17.2.1" "@metamask/metamask-eth-abis": "npm:^3.1.1" - "@metamask/network-controller": "npm:^21.0.0" - "@metamask/polling-controller": "npm:^10.0.0" - "@metamask/preferences-controller": "npm:^13.0.2" + "@metamask/network-controller": "npm:^21.0.1" + "@metamask/polling-controller": "npm:^10.0.1" + "@metamask/preferences-controller": "npm:^13.0.3" "@metamask/rpc-errors": "npm:^6.3.1" "@metamask/utils": "npm:^9.1.0" "@types/bn.js": "npm:^5.1.5" @@ -2220,12 +2220,12 @@ __metadata: languageName: node linkType: hard -"@metamask/base-controller@npm:^7.0.0, @metamask/base-controller@workspace:packages/base-controller": +"@metamask/base-controller@npm:^7.0.1, @metamask/base-controller@workspace:packages/base-controller": version: 0.0.0-use.local resolution: "@metamask/base-controller@workspace:packages/base-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/json-rpc-engine": "npm:^9.0.2" + "@metamask/json-rpc-engine": "npm:^9.0.3" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" "@types/sinon": "npm:^9.0.10" @@ -2282,7 +2282,7 @@ __metadata: resolution: "@metamask/chain-controller@workspace:packages/chain-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" + "@metamask/base-controller": "npm:^7.0.1" "@metamask/chain-api": "npm:^0.1.0" "@metamask/keyring-api": "npm:^8.1.0" "@metamask/snaps-controllers": "npm:^9.7.0" @@ -2306,8 +2306,8 @@ __metadata: resolution: "@metamask/composable-controller@workspace:packages/composable-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/json-rpc-engine": "npm:^9.0.2" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/json-rpc-engine": "npm:^9.0.3" "@types/jest": "npm:^27.4.1" deepmerge: "npm:^4.2.2" immer: "npm:^9.0.6" @@ -2327,7 +2327,7 @@ __metadata: languageName: node linkType: hard -"@metamask/controller-utils@npm:^11.2.0, @metamask/controller-utils@workspace:packages/controller-utils": +"@metamask/controller-utils@npm:^11.3.0, @metamask/controller-utils@workspace:packages/controller-utils": version: 0.0.0-use.local resolution: "@metamask/controller-utils@workspace:packages/controller-utils" dependencies: @@ -2366,8 +2366,8 @@ __metadata: "@metamask/eslint-config-nodejs": "npm:^12.1.0" "@metamask/eslint-config-typescript": "npm:^12.1.0" "@metamask/eth-block-tracker": "npm:^10.0.0" - "@metamask/eth-json-rpc-provider": "npm:^4.1.3" - "@metamask/json-rpc-engine": "npm:^9.0.2" + "@metamask/eth-json-rpc-provider": "npm:^4.1.4" + "@metamask/json-rpc-engine": "npm:^9.0.3" "@metamask/utils": "npm:^9.1.0" "@ts-bridge/cli": "npm:^0.5.1" "@types/jest": "npm:^27.4.1" @@ -2434,9 +2434,9 @@ __metadata: dependencies: "@ethersproject/providers": "npm:^5.7.0" "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" - "@metamask/network-controller": "npm:^21.0.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" + "@metamask/network-controller": "npm:^21.0.1" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" deepmerge: "npm:^4.2.2" @@ -2570,7 +2570,7 @@ __metadata: languageName: node linkType: hard -"@metamask/eth-json-rpc-provider@npm:^4.0.0, @metamask/eth-json-rpc-provider@npm:^4.1.3, @metamask/eth-json-rpc-provider@workspace:packages/eth-json-rpc-provider": +"@metamask/eth-json-rpc-provider@npm:^4.0.0, @metamask/eth-json-rpc-provider@npm:^4.1.4, @metamask/eth-json-rpc-provider@workspace:packages/eth-json-rpc-provider": version: 0.0.0-use.local resolution: "@metamask/eth-json-rpc-provider@workspace:packages/eth-json-rpc-provider" dependencies: @@ -2578,7 +2578,7 @@ __metadata: "@metamask/auto-changelog": "npm:^3.4.4" "@metamask/eth-query": "npm:^4.0.0" "@metamask/ethjs-query": "npm:^0.5.3" - "@metamask/json-rpc-engine": "npm:^9.0.2" + "@metamask/json-rpc-engine": "npm:^9.0.3" "@metamask/rpc-errors": "npm:^6.3.1" "@metamask/safe-event-emitter": "npm:^3.0.0" "@metamask/utils": "npm:^9.1.0" @@ -2793,17 +2793,17 @@ __metadata: languageName: node linkType: hard -"@metamask/gas-fee-controller@npm:^20.0.0, @metamask/gas-fee-controller@workspace:packages/gas-fee-controller": +"@metamask/gas-fee-controller@npm:^20.0.1, @metamask/gas-fee-controller@workspace:packages/gas-fee-controller": version: 0.0.0-use.local resolution: "@metamask/gas-fee-controller@workspace:packages/gas-fee-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" "@metamask/eth-query": "npm:^4.0.0" "@metamask/ethjs-unit": "npm:^0.3.0" - "@metamask/network-controller": "npm:^21.0.0" - "@metamask/polling-controller": "npm:^10.0.0" + "@metamask/network-controller": "npm:^21.0.1" + "@metamask/polling-controller": "npm:^10.0.1" "@metamask/utils": "npm:^9.1.0" "@types/bn.js": "npm:^5.1.5" "@types/jest": "npm:^27.4.1" @@ -2836,7 +2836,7 @@ __metadata: languageName: node linkType: hard -"@metamask/json-rpc-engine@npm:^9.0.0, @metamask/json-rpc-engine@npm:^9.0.1, @metamask/json-rpc-engine@npm:^9.0.2, @metamask/json-rpc-engine@workspace:packages/json-rpc-engine": +"@metamask/json-rpc-engine@npm:^9.0.0, @metamask/json-rpc-engine@npm:^9.0.1, @metamask/json-rpc-engine@npm:^9.0.2, @metamask/json-rpc-engine@npm:^9.0.3, @metamask/json-rpc-engine@workspace:packages/json-rpc-engine": version: 0.0.0-use.local resolution: "@metamask/json-rpc-engine@workspace:packages/json-rpc-engine" dependencies: @@ -2860,7 +2860,7 @@ __metadata: resolution: "@metamask/json-rpc-middleware-stream@workspace:packages/json-rpc-middleware-stream" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/json-rpc-engine": "npm:^9.0.2" + "@metamask/json-rpc-engine": "npm:^9.0.3" "@metamask/safe-event-emitter": "npm:^3.0.0" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" @@ -2907,7 +2907,7 @@ __metadata: languageName: node linkType: hard -"@metamask/keyring-controller@npm:^17.2.0, @metamask/keyring-controller@workspace:packages/keyring-controller": +"@metamask/keyring-controller@npm:^17.2.1, @metamask/keyring-controller@workspace:packages/keyring-controller": version: 0.0.0-use.local resolution: "@metamask/keyring-controller@workspace:packages/keyring-controller" dependencies: @@ -2918,13 +2918,13 @@ __metadata: "@keystonehq/metamask-airgapped-keyring": "npm:^0.14.1" "@lavamoat/allow-scripts": "npm:^3.0.4" "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" + "@metamask/base-controller": "npm:^7.0.1" "@metamask/browser-passworder": "npm:^4.3.0" "@metamask/eth-hd-keyring": "npm:^7.0.1" "@metamask/eth-sig-util": "npm:^7.0.1" "@metamask/eth-simple-keyring": "npm:^6.0.1" "@metamask/keyring-api": "npm:^8.1.0" - "@metamask/message-manager": "npm:^10.1.0" + "@metamask/message-manager": "npm:^10.1.1" "@metamask/scure-bip39": "npm:^2.1.1" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" @@ -2943,13 +2943,13 @@ __metadata: languageName: unknown linkType: soft -"@metamask/logging-controller@npm:^6.0.0, @metamask/logging-controller@workspace:packages/logging-controller": +"@metamask/logging-controller@npm:^6.0.1, @metamask/logging-controller@workspace:packages/logging-controller": version: 0.0.0-use.local resolution: "@metamask/logging-controller@workspace:packages/logging-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" "@types/jest": "npm:^27.4.1" deepmerge: "npm:^4.2.2" jest: "npm:^27.5.1" @@ -2961,13 +2961,13 @@ __metadata: languageName: unknown linkType: soft -"@metamask/message-manager@npm:^10.1.0, @metamask/message-manager@workspace:packages/message-manager": +"@metamask/message-manager@npm:^10.1.1, @metamask/message-manager@workspace:packages/message-manager": version: 0.0.0-use.local resolution: "@metamask/message-manager@workspace:packages/message-manager" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" "@metamask/eth-sig-util": "npm:^7.0.1" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" @@ -2995,8 +2995,8 @@ __metadata: resolution: "@metamask/name-controller@workspace:packages/name-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" async-mutex: "npm:^0.5.0" @@ -3009,20 +3009,20 @@ __metadata: languageName: unknown linkType: soft -"@metamask/network-controller@npm:^21.0.0, @metamask/network-controller@workspace:packages/network-controller": +"@metamask/network-controller@npm:^21.0.1, @metamask/network-controller@workspace:packages/network-controller": version: 0.0.0-use.local resolution: "@metamask/network-controller@workspace:packages/network-controller" dependencies: "@json-rpc-specification/meta-schema": "npm:^1.0.6" "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" "@metamask/eth-block-tracker": "npm:^10.0.0" "@metamask/eth-json-rpc-infura": "npm:^9.1.0" "@metamask/eth-json-rpc-middleware": "npm:^13.0.0" - "@metamask/eth-json-rpc-provider": "npm:^4.1.3" + "@metamask/eth-json-rpc-provider": "npm:^4.1.4" "@metamask/eth-query": "npm:^4.0.0" - "@metamask/json-rpc-engine": "npm:^9.0.2" + "@metamask/json-rpc-engine": "npm:^9.0.3" "@metamask/rpc-errors": "npm:^6.3.1" "@metamask/swappable-obj-proxy": "npm:^2.2.0" "@metamask/utils": "npm:^9.1.0" @@ -3065,7 +3065,7 @@ __metadata: resolution: "@metamask/notification-controller@workspace:packages/notification-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" + "@metamask/base-controller": "npm:^7.0.1" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" deepmerge: "npm:^4.2.2" @@ -3085,10 +3085,10 @@ __metadata: "@contentful/rich-text-html-renderer": "npm:^16.5.2" "@lavamoat/allow-scripts": "npm:^3.0.4" "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" - "@metamask/keyring-controller": "npm:^17.2.0" - "@metamask/profile-sync-controller": "npm:^0.5.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" + "@metamask/keyring-controller": "npm:^17.2.1" + "@metamask/profile-sync-controller": "npm:^0.6.0" "@types/jest": "npm:^27.4.1" "@types/readable-stream": "npm:^2.3.0" bignumber.js: "npm:^4.1.0" @@ -3106,7 +3106,7 @@ __metadata: uuid: "npm:^8.3.2" peerDependencies: "@metamask/keyring-controller": ^17.0.0 - "@metamask/profile-sync-controller": ^0.5.0 + "@metamask/profile-sync-controller": ^0.0.0 languageName: unknown linkType: soft @@ -3140,15 +3140,15 @@ __metadata: languageName: node linkType: hard -"@metamask/permission-controller@npm:^11.0.0, @metamask/permission-controller@npm:^11.0.1, @metamask/permission-controller@workspace:packages/permission-controller": +"@metamask/permission-controller@npm:^11.0.0, @metamask/permission-controller@npm:^11.0.2, @metamask/permission-controller@workspace:packages/permission-controller": version: 0.0.0-use.local resolution: "@metamask/permission-controller@workspace:packages/permission-controller" dependencies: - "@metamask/approval-controller": "npm:^7.0.3" + "@metamask/approval-controller": "npm:^7.0.4" "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" - "@metamask/json-rpc-engine": "npm:^9.0.2" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" + "@metamask/json-rpc-engine": "npm:^9.0.3" "@metamask/rpc-errors": "npm:^6.3.1" "@metamask/utils": "npm:^9.1.0" "@types/deep-freeze-strict": "npm:^1.1.0" @@ -3172,8 +3172,8 @@ __metadata: resolution: "@metamask/permission-log-controller@workspace:packages/permission-log-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/json-rpc-engine": "npm:^9.0.2" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/json-rpc-engine": "npm:^9.0.3" "@metamask/utils": "npm:^9.1.0" "@types/deep-freeze-strict": "npm:^1.1.0" "@types/jest": "npm:^27.4.1" @@ -3193,8 +3193,8 @@ __metadata: resolution: "@metamask/phishing-controller@workspace:packages/phishing-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" "@noble/hashes": "npm:^1.4.0" "@types/jest": "npm:^27.4.1" "@types/punycode": "npm:^2.1.0" @@ -3213,14 +3213,14 @@ __metadata: languageName: unknown linkType: soft -"@metamask/polling-controller@npm:^10.0.0, @metamask/polling-controller@workspace:packages/polling-controller": +"@metamask/polling-controller@npm:^10.0.1, @metamask/polling-controller@workspace:packages/polling-controller": version: 0.0.0-use.local resolution: "@metamask/polling-controller@workspace:packages/polling-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" - "@metamask/network-controller": "npm:^21.0.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" + "@metamask/network-controller": "npm:^21.0.1" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" "@types/uuid": "npm:^8.3.0" @@ -3248,14 +3248,14 @@ __metadata: languageName: node linkType: hard -"@metamask/preferences-controller@npm:^13.0.2, @metamask/preferences-controller@workspace:packages/preferences-controller": +"@metamask/preferences-controller@npm:^13.0.3, @metamask/preferences-controller@workspace:packages/preferences-controller": version: 0.0.0-use.local resolution: "@metamask/preferences-controller@workspace:packages/preferences-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" - "@metamask/keyring-controller": "npm:^17.2.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" + "@metamask/keyring-controller": "npm:^17.2.1" "@types/jest": "npm:^27.4.1" deepmerge: "npm:^4.2.2" jest: "npm:^27.5.1" @@ -3269,17 +3269,17 @@ __metadata: languageName: unknown linkType: soft -"@metamask/profile-sync-controller@npm:^0.5.0, @metamask/profile-sync-controller@workspace:packages/profile-sync-controller": +"@metamask/profile-sync-controller@npm:^0.6.0, @metamask/profile-sync-controller@workspace:packages/profile-sync-controller": version: 0.0.0-use.local resolution: "@metamask/profile-sync-controller@workspace:packages/profile-sync-controller" dependencies: "@lavamoat/allow-scripts": "npm:^3.0.4" - "@metamask/accounts-controller": "npm:^18.2.0" + "@metamask/accounts-controller": "npm:^18.2.1" "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" + "@metamask/base-controller": "npm:^7.0.1" "@metamask/keyring-api": "npm:^8.1.0" - "@metamask/keyring-controller": "npm:^17.2.0" - "@metamask/network-controller": "npm:^21.0.0" + "@metamask/keyring-controller": "npm:^17.2.1" + "@metamask/network-controller": "npm:^21.0.1" "@metamask/snaps-controllers": "npm:^9.7.0" "@metamask/snaps-sdk": "npm:^6.5.0" "@metamask/snaps-utils": "npm:^8.1.1" @@ -3331,12 +3331,12 @@ __metadata: resolution: "@metamask/queued-request-controller@workspace:packages/queued-request-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" - "@metamask/json-rpc-engine": "npm:^9.0.2" - "@metamask/network-controller": "npm:^21.0.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" + "@metamask/json-rpc-engine": "npm:^9.0.3" + "@metamask/network-controller": "npm:^21.0.1" "@metamask/rpc-errors": "npm:^6.3.1" - "@metamask/selected-network-controller": "npm:^18.0.0" + "@metamask/selected-network-controller": "npm:^18.0.1" "@metamask/swappable-obj-proxy": "npm:^2.2.0" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" @@ -3361,7 +3361,7 @@ __metadata: resolution: "@metamask/rate-limit-controller@workspace:packages/rate-limit-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" + "@metamask/base-controller": "npm:^7.0.1" "@metamask/rpc-errors": "npm:^6.3.1" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" @@ -3401,15 +3401,15 @@ __metadata: languageName: node linkType: hard -"@metamask/selected-network-controller@npm:^18.0.0, @metamask/selected-network-controller@workspace:packages/selected-network-controller": +"@metamask/selected-network-controller@npm:^18.0.1, @metamask/selected-network-controller@workspace:packages/selected-network-controller": version: 0.0.0-use.local resolution: "@metamask/selected-network-controller@workspace:packages/selected-network-controller" dependencies: "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/json-rpc-engine": "npm:^9.0.2" - "@metamask/network-controller": "npm:^21.0.0" - "@metamask/permission-controller": "npm:^11.0.1" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/json-rpc-engine": "npm:^9.0.3" + "@metamask/network-controller": "npm:^21.0.1" + "@metamask/permission-controller": "npm:^11.0.2" "@metamask/swappable-obj-proxy": "npm:^2.2.0" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" @@ -3433,13 +3433,13 @@ __metadata: version: 0.0.0-use.local resolution: "@metamask/signature-controller@workspace:packages/signature-controller" dependencies: - "@metamask/approval-controller": "npm:^7.0.3" + "@metamask/approval-controller": "npm:^7.0.4" "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" - "@metamask/keyring-controller": "npm:^17.2.0" - "@metamask/logging-controller": "npm:^6.0.0" - "@metamask/message-manager": "npm:^10.1.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" + "@metamask/keyring-controller": "npm:^17.2.1" + "@metamask/logging-controller": "npm:^6.0.1" + "@metamask/message-manager": "npm:^10.1.1" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" deepmerge: "npm:^4.2.2" @@ -3624,7 +3624,7 @@ __metadata: languageName: node linkType: hard -"@metamask/transaction-controller@npm:^36.1.0, @metamask/transaction-controller@workspace:packages/transaction-controller": +"@metamask/transaction-controller@npm:^37.0.0, @metamask/transaction-controller@workspace:packages/transaction-controller": version: 0.0.0-use.local resolution: "@metamask/transaction-controller@workspace:packages/transaction-controller" dependencies: @@ -3635,18 +3635,18 @@ __metadata: "@ethersproject/abi": "npm:^5.7.0" "@ethersproject/contracts": "npm:^5.7.0" "@ethersproject/providers": "npm:^5.7.0" - "@metamask/accounts-controller": "npm:^18.2.0" - "@metamask/approval-controller": "npm:^7.0.3" + "@metamask/accounts-controller": "npm:^18.2.1" + "@metamask/approval-controller": "npm:^7.0.4" "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" - "@metamask/eth-json-rpc-provider": "npm:^4.1.3" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" + "@metamask/eth-json-rpc-provider": "npm:^4.1.4" "@metamask/eth-query": "npm:^4.0.0" "@metamask/ethjs-provider-http": "npm:^0.3.0" - "@metamask/gas-fee-controller": "npm:^20.0.0" + "@metamask/gas-fee-controller": "npm:^20.0.1" "@metamask/keyring-api": "npm:^8.1.0" "@metamask/metamask-eth-abis": "npm:^3.1.1" - "@metamask/network-controller": "npm:^21.0.0" + "@metamask/network-controller": "npm:^21.0.1" "@metamask/nonce-tracker": "npm:^6.0.0" "@metamask/rpc-errors": "npm:^6.3.1" "@metamask/utils": "npm:^9.1.0" @@ -3681,18 +3681,18 @@ __metadata: version: 0.0.0-use.local resolution: "@metamask/user-operation-controller@workspace:packages/user-operation-controller" dependencies: - "@metamask/approval-controller": "npm:^7.0.3" + "@metamask/approval-controller": "npm:^7.0.4" "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/base-controller": "npm:^7.0.0" - "@metamask/controller-utils": "npm:^11.2.0" + "@metamask/base-controller": "npm:^7.0.1" + "@metamask/controller-utils": "npm:^11.3.0" "@metamask/eth-query": "npm:^4.0.0" - "@metamask/gas-fee-controller": "npm:^20.0.0" - "@metamask/keyring-controller": "npm:^17.2.0" - "@metamask/network-controller": "npm:^21.0.0" - "@metamask/polling-controller": "npm:^10.0.0" + "@metamask/gas-fee-controller": "npm:^20.0.1" + "@metamask/keyring-controller": "npm:^17.2.1" + "@metamask/network-controller": "npm:^21.0.1" + "@metamask/polling-controller": "npm:^10.0.1" "@metamask/rpc-errors": "npm:^6.3.1" "@metamask/superstruct": "npm:^3.1.0" - "@metamask/transaction-controller": "npm:^36.1.0" + "@metamask/transaction-controller": "npm:^37.0.0" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" bn.js: "npm:^5.2.1" @@ -3710,7 +3710,7 @@ __metadata: "@metamask/gas-fee-controller": ^20.0.0 "@metamask/keyring-controller": ^17.0.0 "@metamask/network-controller": ^21.0.0 - "@metamask/transaction-controller": ^36.1.0 + "@metamask/transaction-controller": ^37.0.0 languageName: unknown linkType: soft From 2fe4b0b96447c05eed4effb4946c6f41228e8d1b Mon Sep 17 00:00:00 2001 From: Prithpal Sooriya Date: Mon, 16 Sep 2024 16:06:01 +0100 Subject: [PATCH 6/7] test: remove unused test (#4703) ## Explanation We have a mock and a test that is not used anymore. It still passed the CI, but actually doesn't test anything. ## References ## Changelog ### `@metamask/profile-sync-controller` - **REMOVED**: unused mock function. ## 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 --- .../UserStorageController.test.ts | 29 +++++++------------ 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/packages/profile-sync-controller/src/controllers/user-storage/UserStorageController.test.ts b/packages/profile-sync-controller/src/controllers/user-storage/UserStorageController.test.ts index c6e40da885..9942c72138 100644 --- a/packages/profile-sync-controller/src/controllers/user-storage/UserStorageController.test.ts +++ b/packages/profile-sync-controller/src/controllers/user-storage/UserStorageController.test.ts @@ -22,6 +22,7 @@ import { MOCK_STORAGE_KEY, MOCK_STORAGE_KEY_SIGNATURE, } from './__fixtures__/mockStorage'; +import * as AccountsUserStorageModule from './accounts/user-storage'; import encryption from './encryption/encryption'; import type { GetUserStorageAllFeatureEntriesResponse, @@ -1185,6 +1186,11 @@ describe('user-storage/user-storage-controller - saveInternalAccountToUserStorag }; }; + const mapInternalAccountToUserStorageAccountMock = jest.spyOn( + AccountsUserStorageModule, + 'mapInternalAccountToUserStorageAccount', + ); + const { messengerMocks } = await arrangeMocks(); const controller = new UserStorageController({ messenger: messengerMocks.messenger, @@ -1202,9 +1208,7 @@ describe('user-storage/user-storage-controller - saveInternalAccountToUserStorag MOCK_INTERNAL_ACCOUNTS.ONE[0] as InternalAccount, ); - expect( - messengerMocks.mockAccountsGetAccountByAddress, - ).not.toHaveBeenCalled(); + expect(mapInternalAccountToUserStorageAccountMock).not.toHaveBeenCalled(); }); it('returns void if account syncing feature flag is disabled', async () => { @@ -1431,10 +1435,6 @@ function mockUserStorageMessenger(options?: { const mockAccountsUpdateAccountMetadata = jest.fn().mockResolvedValue(true); - const mockAccountsGetAccountByAddress = jest - .fn() - .mockResolvedValue(MOCK_INTERNAL_ACCOUNTS.ONE[0]); - jest.spyOn(messenger, 'call').mockImplementation((...args) => { // Creates the correct typed call params for mocks type CallParams = { @@ -1512,17 +1512,9 @@ function mockUserStorageMessenger(options?: { return mockAccountsUpdateAccountMetadata(args.slice(1)); } - if (actionType === 'AccountsController:getAccountByAddress') { - return mockAccountsGetAccountByAddress(); - } - - const exhaustedMessengerMocks = (action: never) => { - throw new Error( - `MOCK_FAIL - unsupported messenger call: ${action as string}`, - ); - }; - - return exhaustedMessengerMocks(actionType); + throw new Error( + `MOCK_FAIL - unsupported messenger call: ${actionType as string}`, + ); }); return { @@ -1539,7 +1531,6 @@ function mockUserStorageMessenger(options?: { mockAuthPerformSignOut, mockKeyringAddNewAccount, mockAccountsUpdateAccountMetadata, - mockAccountsGetAccountByAddress, mockAccountsListAccounts, }; } From 29e75c39dd3679e58af69671c7df5f1094f07488 Mon Sep 17 00:00:00 2001 From: Prithpal Sooriya Date: Mon, 16 Sep 2024 17:48:12 +0100 Subject: [PATCH 7/7] refactor: profile-sync-sdk move snap methods to snap auth class (#4708) ## Explanation This is so we can keep some separation of concerns and prevent SIWE auth SDK from using these public snap methods. ## References ## Changelog ### `@metamask/profile-sync-controller` - **ADDED**: `assertSRP` private method to ensure that only SRP auth can call the snap methods. - **CHANGED**: Moved the snap methods: `isSnapConnected` and `connectSnap` to the Snap Auth SDK. - **REMOVED**: `getSnap` exported method ## 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 --- .../sdk/authentication-jwt-bearer/flow-srp.ts | 40 ++++++++++++++----- .../src/sdk/authentication.ts | 39 +++++++++--------- .../messaging-signing-snap-requests.test.ts | 39 ------------------ .../utils/messaging-signing-snap-requests.ts | 18 --------- 4 files changed, 50 insertions(+), 86 deletions(-) diff --git a/packages/profile-sync-controller/src/sdk/authentication-jwt-bearer/flow-srp.ts b/packages/profile-sync-controller/src/sdk/authentication-jwt-bearer/flow-srp.ts index c8763aae0b..8d766e75f3 100644 --- a/packages/profile-sync-controller/src/sdk/authentication-jwt-bearer/flow-srp.ts +++ b/packages/profile-sync-controller/src/sdk/authentication-jwt-bearer/flow-srp.ts @@ -1,6 +1,10 @@ import { ValidationError } from '../errors'; import { getMetaMaskProviderEIP6963 } from '../utils/eip-6963-metamask-provider'; -import { MESSAGE_SIGNING_SNAP } from '../utils/messaging-signing-snap-requests'; +import { + MESSAGE_SIGNING_SNAP, + connectSnap, + isSnapConnected, +} from '../utils/messaging-signing-snap-requests'; import { validateLoginResponse } from '../utils/validate-login-response'; import { authenticate, authorizeOIDC, getNonce } from './services'; import type { @@ -20,19 +24,21 @@ type JwtBearerAuth_SRP_Options = { signing?: AuthSigningOptions; }; +const getDefaultEIP6963Provider = async () => { + const provider = await getMetaMaskProviderEIP6963(); + if (!provider) { + throw new ValidationError('No MetaMask wallet connected'); + } + return provider; +}; + const defaultEIP6963SigningOptions: AuthSigningOptions = { getIdentifier: async (): Promise => { - const provider = await getMetaMaskProviderEIP6963(); - if (!provider) { - throw new ValidationError('No MetaMask wallet connected'); - } + const provider = await getDefaultEIP6963Provider(); return await MESSAGE_SIGNING_SNAP.getPublicKey(provider); }, signMessage: async (message: string): Promise => { - const provider = await getMetaMaskProviderEIP6963(); - if (!provider) { - throw new ValidationError('No MetaMask wallet connected'); - } + const provider = await getDefaultEIP6963Provider(); if (!message.startsWith('metamask:')) { throw new ValidationError('message must start with "metamask:"'); } @@ -85,6 +91,22 @@ export class SRPJwtBearerAuth implements IBaseAuth { return await this.#options.signing.signMessage(message); } + async isSnapConnected(): Promise { + const provider = await getMetaMaskProviderEIP6963(); + if (!provider) { + return false; + } + + const isConnected = await isSnapConnected(provider); + return isConnected; + } + + async connectSnap(): Promise { + const provider = await getDefaultEIP6963Provider(); + const res = await connectSnap(provider); + return res; + } + // convert expiresIn from seconds to milliseconds and use 90% of expiresIn async #getAuthSession(): Promise { const auth = await this.#options.storage.getLoginResponse(); diff --git a/packages/profile-sync-controller/src/sdk/authentication.ts b/packages/profile-sync-controller/src/sdk/authentication.ts index f8f5e966a8..6d321f8c7d 100644 --- a/packages/profile-sync-controller/src/sdk/authentication.ts +++ b/packages/profile-sync-controller/src/sdk/authentication.ts @@ -8,11 +8,6 @@ import type { UserProfile, Pair } from './authentication-jwt-bearer/types'; import { AuthType } from './authentication-jwt-bearer/types'; import type { Env } from './env'; import { PairError, UnsupportedAuthTypeError } from './errors'; -import { getMetaMaskProviderEIP6963 } from './utils/eip-6963-metamask-provider'; -import { - connectSnap, - isSnapConnected, -} from './utils/messaging-signing-snap-requests'; // Computing the Classes, so we only get back the public methods for the interface. // TODO: Either fix this lint violation or explain why it's necessary to ignore. @@ -54,22 +49,13 @@ export class JwtBearerAuth implements SIWEInterface, SRPInterface { } async connectSnap(): Promise { - const provider = await getMetaMaskProviderEIP6963(); - if (!provider) { - throw new Error('failed to get MetaMaskProviderEIP6963 provider'); - } - const res = await connectSnap(provider); - return res; + this.#assertSRP(this.#type, this.#sdk); + return this.#sdk.connectSnap(); } async isSnapConnected(): Promise { - const provider = await getMetaMaskProviderEIP6963(); - if (!provider) { - return false; - } - - const isConnected = await isSnapConnected(provider); - return isConnected; + this.#assertSRP(this.#type, this.#sdk); + return this.#sdk.isSnapConnected(); } async getUserProfile(): Promise { @@ -132,8 +118,8 @@ export class JwtBearerAuth implements SIWEInterface, SRPInterface { #assertSIWE( type: AuthType, - sdk: SIWEJwtBearerAuth | SRPJwtBearerAuth, - ): asserts sdk is SIWEJwtBearerAuth { + _sdk: SIWEJwtBearerAuth | SRPJwtBearerAuth, + ): asserts _sdk is SIWEJwtBearerAuth { if (type === AuthType.SiWE) { return; } @@ -142,6 +128,19 @@ export class JwtBearerAuth implements SIWEInterface, SRPInterface { 'This method is only available via SIWE auth type', ); } + + #assertSRP( + type: AuthType, + _sdk: SIWEJwtBearerAuth | SRPJwtBearerAuth, + ): asserts _sdk is SRPJwtBearerAuth { + if (type === AuthType.SRP) { + return; + } + + throw new UnsupportedAuthTypeError( + 'This method is only available via SRP auth type', + ); + } } export { SIWEJwtBearerAuth } from './authentication-jwt-bearer/flow-siwe'; diff --git a/packages/profile-sync-controller/src/sdk/utils/messaging-signing-snap-requests.test.ts b/packages/profile-sync-controller/src/sdk/utils/messaging-signing-snap-requests.test.ts index 24f24f0e77..b7db331ce8 100644 --- a/packages/profile-sync-controller/src/sdk/utils/messaging-signing-snap-requests.test.ts +++ b/packages/profile-sync-controller/src/sdk/utils/messaging-signing-snap-requests.test.ts @@ -6,7 +6,6 @@ import { MESSAGE_SIGNING_SNAP, SNAP_ORIGIN, connectSnap, - getSnap, getSnaps, isSnapConnected, } from './messaging-signing-snap-requests'; @@ -66,44 +65,6 @@ describe('isSnapConnected() tests', () => { }); }); -describe('getSnap() tests', () => { - it('tests invocation', async () => { - const { mockProvider, mockRequest } = arrangeMockProvider(); - - const mockSnap: Snap = { id: SNAP_ORIGIN } as MockVariable; - mockRequest.mockResolvedValue({ [SNAP_ORIGIN]: mockSnap }); - - const result = await getSnap(mockProvider); - expect(mockRequest).toHaveBeenCalled(); - expect(result).toBeDefined(); - }); - - it('returns undefined if unable to find snap', async () => { - const { mockProvider, mockRequest } = arrangeMockProvider(); - - const mockSnap: Snap = { id: 'A differentSnap' } as MockVariable; - mockRequest.mockResolvedValue({ diffSnap: mockSnap }); - - const result1 = await getSnap(mockProvider); - expect(mockRequest).toHaveBeenCalled(); - expect(result1).toBeUndefined(); - - // Another test in case the wallet request returns null - mockRequest.mockResolvedValue(null); - const result2 = await getSnap(mockProvider); - expect(result2).toBeUndefined(); - }); - - it('returns undefined if an error is thrown when making provider request', async () => { - const { mockProvider, mockRequest } = arrangeMockProvider(); - mockRequest.mockRejectedValue(new Error('MOCK ERROR')); - - const result = await getSnap(mockProvider); - expect(mockRequest).toHaveBeenCalled(); - expect(result).toBeUndefined(); - }); -}); - describe('MESSAGE_SIGNING_SNAP.getPublicKey() tests', () => { it('tests invocation', async () => { const { mockProvider, mockRequest } = arrangeMockProvider(); diff --git a/packages/profile-sync-controller/src/sdk/utils/messaging-signing-snap-requests.ts b/packages/profile-sync-controller/src/sdk/utils/messaging-signing-snap-requests.ts index 24d8396f12..8945b501fa 100644 --- a/packages/profile-sync-controller/src/sdk/utils/messaging-signing-snap-requests.ts +++ b/packages/profile-sync-controller/src/sdk/utils/messaging-signing-snap-requests.ts @@ -10,8 +10,6 @@ export type GetSnapsResponse = Record; export const SNAP_ORIGIN = 'npm:@metamask/message-signing-snap'; -const foundSnap = (snap: Snap) => snap.id === SNAP_ORIGIN; - /** * Requests Connection to the Message Signing Snap * @@ -66,22 +64,6 @@ export async function isSnapConnected( } } -/** - * Will return the message signing snap if installed - * @param provider - MetaMask Wallet Provider - */ -export async function getSnap( - provider: Eip1193Provider, -): Promise { - try { - const snaps = await getSnaps(provider); - return Object.values(snaps ?? {}).find((snap) => foundSnap(snap)); - } catch (e) { - console.error('Failed to obtain installed snap', e); - return undefined; - } -} - export const MESSAGE_SIGNING_SNAP = { async getPublicKey(provider: Eip1193Provider) { const publicKey: string = await provider.request({