diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 97fe489a07f..875d48d2f21 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -117,6 +117,7 @@ /packages/react-data-query @MetaMask/core-platform /packages/sample-controllers @MetaMask/core-platform /packages/selected-network-controller @MetaMask/core-platform +/packages/utils @MetaMask/core-platform /packages/wallet @MetaMask/core-platform /packages/wallet-cli @MetaMask/core-platform /packages/wallet-framework-docs @MetaMask/core-platform diff --git a/README.md b/README.md index c68b300cb33..572dfc940e8 100644 --- a/README.md +++ b/README.md @@ -136,6 +136,7 @@ yarn skills --reset # clear saved local selection - [`@metamask/transaction-controller`](packages/transaction-controller) - [`@metamask/transaction-pay-controller`](packages/transaction-pay-controller) - [`@metamask/user-operation-controller`](packages/user-operation-controller) +- [`@metamask/utils`](packages/utils) - [`@metamask/wallet`](packages/wallet) - [`@metamask/wallet-cli`](packages/wallet-cli) @@ -243,6 +244,7 @@ linkStyle default opacity:0.5 transaction_controller(["@metamask/transaction-controller"]); transaction_pay_controller(["@metamask/transaction-pay-controller"]); user_operation_controller(["@metamask/user-operation-controller"]); + utils(["@metamask/utils"]); wallet(["@metamask/wallet"]); wallet_cli(["@metamask/wallet-cli"]); account_tree_controller --> accounts_controller; diff --git a/codeowners.ts b/codeowners.ts index 63c4ff0be63..3a272baf06f 100644 --- a/codeowners.ts +++ b/codeowners.ts @@ -384,6 +384,9 @@ const PACKAGES: Record = { 'user-operation-controller': { teams: ['@MetaMask/confirmations'], }, + utils: { + teams: ['@MetaMask/core-platform'], + }, wallet: { teams: ['@MetaMask/core-platform'], }, @@ -569,6 +572,7 @@ function buildTeamSections(): CodeownersSection[] { buildRuleForPackage('react-data-query'), buildRuleForPackage('sample-controllers'), buildRuleForPackage('selected-network-controller'), + buildRuleForPackage('utils'), buildRuleForPackage('wallet'), buildRuleForPackage('wallet-cli'), buildRuleForPackage('wallet-framework-docs'), diff --git a/eslint-suppressions.json b/eslint-suppressions.json index 253b9a7f00b..49a28c0feeb 100644 --- a/eslint-suppressions.json +++ b/eslint-suppressions.json @@ -2007,5 +2007,95 @@ "@typescript-eslint/naming-convention": { "count": 1 } + }, + "packages/utils/src/assert.ts": { + "@typescript-eslint/no-explicit-any": { + "count": 1 + } + }, + "packages/utils/src/caip-types.test.ts": { + "@typescript-eslint/no-explicit-any": { + "count": 4 + } + }, + "packages/utils/src/collections.test.ts": { + "@typescript-eslint/no-explicit-any": { + "count": 2 + } + }, + "packages/utils/src/collections.ts": { + "@typescript-eslint/no-explicit-any": { + "count": 2 + } + }, + "packages/utils/src/errors.test.ts": { + "@typescript-eslint/no-explicit-any": { + "count": 3 + } + }, + "packages/utils/src/errors.ts": { + "no-restricted-syntax": { + "count": 3 + } + }, + "packages/utils/src/fs.test.ts": { + "@typescript-eslint/no-explicit-any": { + "count": 20 + } + }, + "packages/utils/src/fs.ts": { + "jsdoc/require-returns": { + "count": 1 + } + }, + "packages/utils/src/hashing.test.ts": { + "n/no-unsupported-features/node-builtins": { + "count": 9 + } + }, + "packages/utils/src/hashing.ts": { + "no-restricted-syntax": { + "count": 3 + } + }, + "packages/utils/src/json.ts": { + "@typescript-eslint/no-explicit-any": { + "count": 1 + } + }, + "packages/utils/src/json.tst.ts": { + "@typescript-eslint/no-explicit-any": { + "count": 1 + } + }, + "packages/utils/src/logging.test.ts": { + "@typescript-eslint/no-explicit-any": { + "count": 2 + } + }, + "packages/utils/src/misc.ts": { + "@typescript-eslint/no-explicit-any": { + "count": 1 + } + }, + "packages/utils/src/misc.tst.ts": { + "@typescript-eslint/no-explicit-any": { + "count": 1 + } + }, + "packages/utils/src/mnemonic.ts": { + "jsdoc/tag-lines": { + "count": 1 + } + }, + "packages/utils/src/promise.ts": { + "jsdoc/tag-lines": { + "count": 1 + } + }, + "packages/utils/src/unitsConversion.test.ts": { + "@typescript-eslint/no-explicit-any": { + "count": 29 + } } } diff --git a/jest.config.packages.cjs b/jest.config.packages.cjs index 073503552a7..a96314934e2 100644 --- a/jest.config.packages.cjs +++ b/jest.config.packages.cjs @@ -86,7 +86,7 @@ module.exports = { '^@metamask/json-rpc-engine/v2$': [ '/../json-rpc-engine/src/v2/index.ts', ], - '^@metamask/utils/node$': require.resolve('@metamask/utils/node'), + '^@metamask/utils/node$': ['/../utils/src/node.ts'], '^@metamask/(.+)$': [ '/../$1/src', // Some @metamask/* packages we are referencing aren't in this monorepo, diff --git a/jest.config.scripts.cjs b/jest.config.scripts.cjs index 4a6d8b66f87..505c9194645 100644 --- a/jest.config.scripts.cjs +++ b/jest.config.scripts.cjs @@ -37,6 +37,11 @@ module.exports = { // Strip .js extensions from relative imports so Jest resolves them to // the TypeScript source files. '^(\\.{1,2}/.+)\\.js$': '$1', + // `@metamask/utils` lives in this repo, so resolve it to its source rather + // than to a build that may not exist yet. + // NOTE: This must be synchronized with the `paths` option in `tsconfig.json`. + '^@metamask/utils/node$': ['/packages/utils/src/node.ts'], + '^@metamask/utils$': ['/packages/utils/src/index.ts'], '^uuid$': require.resolve('uuid'), }, diff --git a/merged-packages/utils/src/caip-types.test-d.ts b/merged-packages/utils/src/caip-types.test-d.ts deleted file mode 100644 index c6255b24580..00000000000 --- a/merged-packages/utils/src/caip-types.test-d.ts +++ /dev/null @@ -1,90 +0,0 @@ -import { expectAssignable, expectNotAssignable } from 'tsd'; - -import type { - CaipAccountAddress, - CaipAccountId, - CaipAssetId, - CaipAssetNamespace, - CaipAssetReference, - CaipAssetType, - CaipChainId, - CaipNamespace, - CaipReference, -} from './index.js'; - -const embeddedString = 'test'; - -// Valid caip strings: - -expectAssignable('namespace:reference'); -expectAssignable('namespace:'); -expectAssignable(':reference'); -expectAssignable(`${embeddedString}:${embeddedString}`); - -expectAssignable('string'); -expectAssignable(`${embeddedString}`); - -expectAssignable('string'); -expectAssignable(`${embeddedString}`); - -expectAssignable('namespace:reference:accountAddress'); -expectAssignable('namespace:reference:'); -expectAssignable(':reference:accountAddress'); -expectAssignable( - `${embeddedString}:${embeddedString}:${embeddedString}`, -); - -expectAssignable('string'); -expectAssignable(`${embeddedString}`); - -expectAssignable('string'); -expectAssignable(`${embeddedString}`); - -expectAssignable('string'); -expectAssignable(`${embeddedString}`); - -expectAssignable( - 'namespace:reference/assetNamespace:assetReference', -); -expectAssignable('namespace:reference/:'); -expectAssignable(':reference/assetNamespace:'); -expectAssignable( - `${embeddedString}:${embeddedString}/${embeddedString}:${embeddedString}`, -); - -expectAssignable( - 'namespace:reference/assetNamespace:assetReference/tokenId', -); -expectAssignable('namespace:reference/:assetReference/'); -expectAssignable(':reference/assetNamespace:/'); -expectAssignable( - `${embeddedString}:${embeddedString}/${embeddedString}:${embeddedString}/${embeddedString}`, -); - -// Not valid caip strings: - -expectAssignable('namespace:😀'); -expectAssignable('😀:reference'); -expectNotAssignable(0); -expectNotAssignable('🙃'); - -expectNotAssignable(0); - -expectNotAssignable(0); - -expectAssignable('namespace:reference:😀'); -expectAssignable('😀:reference:accountAddress'); -expectNotAssignable(0); -expectNotAssignable('🙃'); - -expectNotAssignable(0); - -expectNotAssignable(0); - -expectNotAssignable(0); - -expectNotAssignable(0); -expectNotAssignable('🙃'); - -expectNotAssignable(0); -expectNotAssignable('🙃'); diff --git a/merged-packages/utils/src/hex.test-d.ts b/merged-packages/utils/src/hex.test-d.ts deleted file mode 100644 index 08987e2aedb..00000000000 --- a/merged-packages/utils/src/hex.test-d.ts +++ /dev/null @@ -1,26 +0,0 @@ -import { expectAssignable, expectNotAssignable } from 'tsd'; - -import type { Hex } from './index.js'; - -// Valid hex strings: - -expectAssignable('0x'); - -expectAssignable('0x0'); - -expectAssignable('0x😀'); - -const embeddedString = 'test'; -expectAssignable(`0x${embeddedString}`); - -// Not valid hex strings: - -expectNotAssignable(`0X${embeddedString}`); - -expectNotAssignable(`1x${embeddedString}`); - -expectNotAssignable(0); - -expectNotAssignable('0'); - -expectNotAssignable('🙃'); diff --git a/merged-packages/utils/src/json.test-d.ts b/merged-packages/utils/src/json.test-d.ts deleted file mode 100644 index a74dc6bc4c5..00000000000 --- a/merged-packages/utils/src/json.test-d.ts +++ /dev/null @@ -1,160 +0,0 @@ -/* eslint-disable @typescript-eslint/consistent-type-definitions */ - -import type { Infer } from '@metamask/superstruct'; -import { boolean, number, optional, string } from '@metamask/superstruct'; -import { expectAssignable, expectNotAssignable } from 'tsd'; - -import type { Json } from './index.js'; -import { exactOptional, object } from './index.js'; - -// Valid Json: - -expectAssignable(null); - -expectAssignable(false); - -expectAssignable(''); - -expectAssignable(0); - -expectAssignable([]); - -expectAssignable({}); - -expectAssignable([0]); - -expectAssignable({ a: 0 }); - -expectAssignable({ deeply: [{ nested: 1 }, 'mixed', 'types', 0] }); - -expectAssignable(['array', { nested: { mixed: true, types: null } }, 0]); - -type JsonCompatibleType = { - c: number; -}; -const jsonCompatibleType: JsonCompatibleType = { c: 0 }; -expectAssignable(jsonCompatibleType); - -// Invalid Json: - -expectNotAssignable(undefined); - -expectNotAssignable(new Date()); - -expectNotAssignable(() => 0); - -expectNotAssignable(new Set()); - -expectNotAssignable(new Map()); - -expectNotAssignable(Symbol('test')); - -expectNotAssignable({ a: new Date() }); - -expectNotAssignable(5 as number | undefined); - -interface InterfaceWithOptionalProperty { - a?: number; -} -const interfaceWithOptionalProperty: InterfaceWithOptionalProperty = { a: 0 }; -expectNotAssignable(interfaceWithOptionalProperty); - -interface InterfaceWithDate { - a: Date; -} -const interfaceWithDate: InterfaceWithDate = { a: new Date() }; -expectNotAssignable(interfaceWithDate); - -interface InterfaceWithOptionalDate { - a?: Date; -} -const interfaceWithOptionalDate: InterfaceWithOptionalDate = { a: new Date() }; -expectNotAssignable(interfaceWithOptionalDate); - -interface InterfaceWithUndefinedTypeUnion { - a: number | undefined; -} -const interfaceWithUndefinedTypeUnion: InterfaceWithUndefinedTypeUnion = { - a: 0, -}; -expectNotAssignable(interfaceWithUndefinedTypeUnion); - -interface InterfaceWithFunction { - a: () => number; -} -const interfaceWithFunction: InterfaceWithFunction = { a: () => 0 }; -expectNotAssignable(interfaceWithFunction); - -type TypeWithDate = { - a: Date; -}; -const typeWithDate: TypeWithDate = { a: new Date() }; -expectNotAssignable(typeWithDate); - -type TypeWithOptionalDate = { - a?: Date; -}; -const typeWithOptionalDate: TypeWithOptionalDate = { a: new Date() }; -expectNotAssignable(typeWithOptionalDate); - -type TypeWithUndefinedTypeUnion = { - a: number | undefined; -}; -const typeWithUndefinedTypeUnion: TypeWithUndefinedTypeUnion = { - a: 0, -}; -expectNotAssignable(typeWithUndefinedTypeUnion); - -type TypeWithFunction = { - a: () => number; -}; -const typeWithFunction: TypeWithFunction = { a: () => 0 }; -expectNotAssignable(typeWithFunction); - -type TypeWithOptionalProperty = { - a?: number | undefined; -}; -const typeWithOptionalProperty: TypeWithOptionalProperty = { a: undefined }; -expectNotAssignable(typeWithOptionalProperty); - -// Edge cases: - -// The Json type doesn't protect against the `any` type. -expectAssignable(null as any); - -// The Json type gets confused by interfaces. This interface is valid Json, -// but it's incompatible with the Json type. -interface A { - a: number; -} -const a: A = { a: 0 }; -expectNotAssignable(a); - -// The Json type gets confused by classes. This class instance is valid Json, -// but it's incompatible with the Json type. -class Foo { - a!: number; -} -const foo = new Foo(); -expectNotAssignable(foo); - -// Object using `exactOptional`: - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -- Type-level test fixture; consumed via `typeof`. -const exactOptionalObject = object({ - a: number(), - b: optional(string()), - c: exactOptional(boolean()), -}); - -type ExactOptionalObject = Infer; - -expectAssignable({ a: 0 }); -expectAssignable({ a: 0, b: 'test' }); -expectAssignable({ a: 0, b: 'test', c: true }); -expectNotAssignable({ a: 0, b: 'test', c: 0 }); -expectNotAssignable({ - a: 0, - b: 'test', - c: undefined, -}); diff --git a/merged-packages/utils/src/misc.test-d.ts b/merged-packages/utils/src/misc.test-d.ts deleted file mode 100644 index f334de4144c..00000000000 --- a/merged-packages/utils/src/misc.test-d.ts +++ /dev/null @@ -1,184 +0,0 @@ -import { expectAssignable, expectNotAssignable, expectType } from 'tsd'; - -import type { PublicInterface, RuntimeObject } from './misc.js'; -import { isObject, hasProperty, getKnownPropertyNames } from './misc.js'; - -//============================================================================= -// PublicInterface -//============================================================================= - -class ClassWithPrivateProperties { - // eslint-disable-next-line no-unused-private-class-members -- Type-level test fixture; never read at runtime. - readonly #foo: string; - - bar: string; - - constructor({ foo, bar }: { foo: string; bar: string }) { - this.#foo = foo; - this.bar = bar; - } -} - -// Private properties not required -expectAssignable>({ bar: 'bar' }); -// Public properties still required -expectNotAssignable>({}); - -//============================================================================= -// isObject -//============================================================================= - -const unknownValue = {} as unknown; - -expectNotAssignable(unknownValue); - -if (isObject(unknownValue)) { - expectAssignable(unknownValue); -} - -// Does not interfere with satisfaction of static type -const constObjectType = { foo: 'foo' } as const; -if (hasProperty(constObjectType, 'foo')) { - expectAssignable<{ foo: 'foo' }>(constObjectType); -} - -//============================================================================= -// hasProperty -//============================================================================= - -const unknownObject = {} as object; - -// Establish that `Object` is not accepted when a specific property is needed. -expectNotAssignable>(unknownObject); - -// Establish that `RuntimeObject` is not accepted when a specific property is needed. -if (isObject(unknownObject)) { - expectNotAssignable>(unknownObject); -} - -// An object is accepted after `hasProperty` is used to prove that it has the required property. -if (isObject(unknownObject) && hasProperty(unknownObject, 'foo')) { - expectAssignable>(unknownObject); -} - -// An object is accepted after `hasProperty` is used to prove that it has all required properties. -if ( - isObject(unknownObject) && - hasProperty(unknownObject, 'foo') && - hasProperty(unknownObject, 'bar') -) { - expectAssignable>(unknownObject); -} - -// An object is not accepted after `hasProperty` has only been used to establish that some required properties exist. -if (isObject(unknownObject) && hasProperty(unknownObject, 'foo')) { - expectNotAssignable>(unknownObject); -} - -// Does not interfere with satisfaction of non-overlapping types -const overlappingTypesExample = { foo: 'foo', baz: 'baz' }; -if (hasProperty(overlappingTypesExample, 'foo')) { - expectAssignable>(overlappingTypesExample); -} - -const exampleErrorWithCode = new Error('test'); -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -exampleErrorWithCode.code = 999; - -// Establish that trying to check for a custom property on an error results in failure -expectNotAssignable<{ code: any }>(exampleErrorWithCode); - -// Using custom Error property is allowed after checking with `hasProperty` -if (hasProperty(exampleErrorWithCode, 'code')) { - expectType(exampleErrorWithCode.code); -} - -// `hasProperty` is compatible with interfaces -// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -interface HasPropertyInterfaceExample { - a: number; -} -const hasPropertyInterfaceExample: HasPropertyInterfaceExample = { a: 0 }; -hasProperty(hasPropertyInterfaceExample, 'a'); - -// `hasProperty` is compatible with classes -class HasPropertyClassExample { - a!: number; -} -const hasPropertyClassExample = new HasPropertyClassExample(); -hasProperty(hasPropertyClassExample, 'a'); - -type HasPropertyTypeExample = { - a?: number; -}; - -// It keeps the original type when defined. -const hasPropertyTypeExample: HasPropertyTypeExample = {}; -if (hasProperty(hasPropertyTypeExample, 'a')) { - expectType(hasPropertyTypeExample.a); -} - -//============================================================================= -// getKnownPropertyNames -//============================================================================= - -enum GetKnownPropertyNamesEnumExample { - Foo = 'bar', - Baz = 'qux', -} - -expectType<('Foo' | 'Baz')[]>( - getKnownPropertyNames(GetKnownPropertyNamesEnumExample), -); - -//============================================================================= -// RuntimeObject -//============================================================================= - -// Valid runtime objects: - -expectAssignable({}); - -expectAssignable({ foo: 'foo' }); - -expectAssignable({ 0: 'foo' }); - -expectAssignable({ [Symbol('foo')]: 'foo' }); - -// Invalid runtime objects: - -expectNotAssignable(null); - -expectNotAssignable(undefined); - -expectNotAssignable('foo'); - -expectNotAssignable(0); - -expectNotAssignable([]); - -expectNotAssignable(new Date()); - -expectNotAssignable(() => 0); - -expectNotAssignable(new Set()); - -expectNotAssignable(new Map()); - -expectNotAssignable(Symbol('test')); - -// The RuntimeObject type gets confused by interfaces. This interface is a valid object, -// but it's incompatible with the RuntimeObject type. -// eslint-disable-next-line @typescript-eslint/consistent-type-definitions -interface RuntimeObjectInterfaceExample { - a: number; -} -const runtimeObjectInterfaceExample: RuntimeObjectInterfaceExample = { a: 0 }; -expectNotAssignable(runtimeObjectInterfaceExample); - -class RuntimeObjectClassExample { - a!: number; -} -const runtimeObjectClassExample = new RuntimeObjectClassExample(); -expectNotAssignable(runtimeObjectClassExample); diff --git a/merged-packages/utils/tsconfig.lint.json b/merged-packages/utils/tsconfig.lint.json deleted file mode 100644 index d98d8af5401..00000000000 --- a/merged-packages/utils/tsconfig.lint.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "extends": ["./tsconfig.json", "../../tsconfig.packages.lint.json"], - "compilerOptions": { - "outDir": "./.tsc-lint-cache", - "tsBuildInfoFile": "./.tsc-lint-cache/tsconfig.tsbuildinfo" - }, - /** - * `*.test-d.ts` files belong to `tsd`, which type checks them itself via - * `yarn test:types`. Pulling them in here would drag `tsd`'s own types into - * the program, and those reference `lib="esnext"`, which widens built in - * types like `ReadonlySet` well beyond the `lib` this package targets. - */ - "exclude": ["./src/**/*.test-d.ts"] -} diff --git a/packages/account-tree-controller/tsconfig.build.json b/packages/account-tree-controller/tsconfig.build.json index 6c95339681e..582cb56c266 100644 --- a/packages/account-tree-controller/tsconfig.build.json +++ b/packages/account-tree-controller/tsconfig.build.json @@ -22,6 +22,9 @@ }, { "path": "../profile-sync-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"], diff --git a/packages/account-tree-controller/tsconfig.json b/packages/account-tree-controller/tsconfig.json index 3f058de42f1..b4f00ee71e7 100644 --- a/packages/account-tree-controller/tsconfig.json +++ b/packages/account-tree-controller/tsconfig.json @@ -18,6 +18,9 @@ }, { "path": "../profile-sync-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/accounts-controller/tsconfig.build.json b/packages/accounts-controller/tsconfig.build.json index 7c15c3ff945..1f7278b1e62 100644 --- a/packages/accounts-controller/tsconfig.build.json +++ b/packages/accounts-controller/tsconfig.build.json @@ -20,6 +20,9 @@ }, { "path": "../controller-utils/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/accounts-controller/tsconfig.json b/packages/accounts-controller/tsconfig.json index 6b6a34e1869..658cdbc9e0f 100644 --- a/packages/accounts-controller/tsconfig.json +++ b/packages/accounts-controller/tsconfig.json @@ -15,6 +15,9 @@ }, { "path": "../controller-utils" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/address-book-controller/tsconfig.build.json b/packages/address-book-controller/tsconfig.build.json index 36a42b5f419..762168988a0 100644 --- a/packages/address-book-controller/tsconfig.build.json +++ b/packages/address-book-controller/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/address-book-controller/tsconfig.json b/packages/address-book-controller/tsconfig.json index ac61e63a63e..1322a9b3fcd 100644 --- a/packages/address-book-controller/tsconfig.json +++ b/packages/address-book-controller/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/ai-controllers/CHANGELOG.md b/packages/ai-controllers/CHANGELOG.md index b021dc9f697..69686bc541f 100644 --- a/packages/ai-controllers/CHANGELOG.md +++ b/packages/ai-controllers/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Removed + +- Remove the unused `@metamask/utils` dependency ([#10185](https://github.com/MetaMask/core/pull/10185)) + ## [2.0.0] ### Changed diff --git a/packages/ai-controllers/package.json b/packages/ai-controllers/package.json index 00040950701..bd4008f57e6 100644 --- a/packages/ai-controllers/package.json +++ b/packages/ai-controllers/package.json @@ -52,8 +52,7 @@ "dependencies": { "@metamask/base-controller": "^10.0.0", "@metamask/messenger": "^3.0.0", - "@metamask/superstruct": "^3.4.1", - "@metamask/utils": "^11.12.0" + "@metamask/superstruct": "^3.4.1" }, "devDependencies": { "@metamask/auto-changelog": "^6.1.0", diff --git a/packages/analytics-controller/tsconfig.build.json b/packages/analytics-controller/tsconfig.build.json index 05a93be003a..0af8ba701a3 100644 --- a/packages/analytics-controller/tsconfig.build.json +++ b/packages/analytics-controller/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/analytics-controller/tsconfig.json b/packages/analytics-controller/tsconfig.json index 9520e56a415..c83b485b7b9 100644 --- a/packages/analytics-controller/tsconfig.json +++ b/packages/analytics-controller/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/analytics-data-regulation-controller/tsconfig.build.json b/packages/analytics-data-regulation-controller/tsconfig.build.json index 36a42b5f419..762168988a0 100644 --- a/packages/analytics-data-regulation-controller/tsconfig.build.json +++ b/packages/analytics-data-regulation-controller/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/analytics-data-regulation-controller/tsconfig.json b/packages/analytics-data-regulation-controller/tsconfig.json index ac61e63a63e..1322a9b3fcd 100644 --- a/packages/analytics-data-regulation-controller/tsconfig.json +++ b/packages/analytics-data-regulation-controller/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/approval-controller/tsconfig.build.json b/packages/approval-controller/tsconfig.build.json index 417d660ce09..c145368e144 100644 --- a/packages/approval-controller/tsconfig.build.json +++ b/packages/approval-controller/tsconfig.build.json @@ -10,6 +10,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/approval-controller/tsconfig.json b/packages/approval-controller/tsconfig.json index 676ad181ade..65f085e3813 100644 --- a/packages/approval-controller/tsconfig.json +++ b/packages/approval-controller/tsconfig.json @@ -6,6 +6,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/assets-controller/tsconfig.build.json b/packages/assets-controller/tsconfig.build.json index a5960f7760f..af4db63ebed 100644 --- a/packages/assets-controller/tsconfig.build.json +++ b/packages/assets-controller/tsconfig.build.json @@ -58,6 +58,9 @@ }, { "path": "../remote-feature-flag-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"], diff --git a/packages/assets-controller/tsconfig.json b/packages/assets-controller/tsconfig.json index a12e39e5a79..07672d3ee4d 100644 --- a/packages/assets-controller/tsconfig.json +++ b/packages/assets-controller/tsconfig.json @@ -54,6 +54,9 @@ }, { "path": "../remote-feature-flag-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/assets-controllers/tsconfig.build.json b/packages/assets-controllers/tsconfig.build.json index 1f5aa501ff3..1122026eec6 100644 --- a/packages/assets-controllers/tsconfig.build.json +++ b/packages/assets-controllers/tsconfig.build.json @@ -67,6 +67,9 @@ }, { "path": "../eth-block-tracker/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"], diff --git a/packages/assets-controllers/tsconfig.json b/packages/assets-controllers/tsconfig.json index 77d9ce319dc..873e28ad655 100644 --- a/packages/assets-controllers/tsconfig.json +++ b/packages/assets-controllers/tsconfig.json @@ -66,6 +66,9 @@ }, { "path": "../eth-block-tracker" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "../../tests"] diff --git a/packages/authenticated-user-storage/tsconfig.build.json b/packages/authenticated-user-storage/tsconfig.build.json index 6db76700e55..b036d7f3548 100644 --- a/packages/authenticated-user-storage/tsconfig.build.json +++ b/packages/authenticated-user-storage/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/authenticated-user-storage/tsconfig.json b/packages/authenticated-user-storage/tsconfig.json index 0c78111f10a..4acf37dc828 100644 --- a/packages/authenticated-user-storage/tsconfig.json +++ b/packages/authenticated-user-storage/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/base-controller/tsconfig.build.json b/packages/base-controller/tsconfig.build.json index 66245328a7b..5637adc44de 100644 --- a/packages/base-controller/tsconfig.build.json +++ b/packages/base-controller/tsconfig.build.json @@ -7,6 +7,9 @@ "references": [ { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/base-controller/tsconfig.json b/packages/base-controller/tsconfig.json index db96c0af25d..9c74b2a75c9 100644 --- a/packages/base-controller/tsconfig.json +++ b/packages/base-controller/tsconfig.json @@ -3,6 +3,9 @@ "references": [ { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/base-controller/tsconfig.lint.json b/packages/base-controller/tsconfig.lint.json index 1e03d050875..046d5a5e8ff 100644 --- a/packages/base-controller/tsconfig.lint.json +++ b/packages/base-controller/tsconfig.lint.json @@ -7,6 +7,9 @@ "references": [ { "path": "../messenger/tsconfig.lint.json" + }, + { + "path": "../utils/tsconfig.lint.json" } ] } diff --git a/packages/base-data-service/tsconfig.build.json b/packages/base-data-service/tsconfig.build.json index 8973cd1a714..8f363b63b5a 100644 --- a/packages/base-data-service/tsconfig.build.json +++ b/packages/base-data-service/tsconfig.build.json @@ -10,6 +10,9 @@ }, { "path": "../storage-service/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/base-data-service/tsconfig.json b/packages/base-data-service/tsconfig.json index f7b37501cce..4c1f690bef4 100644 --- a/packages/base-data-service/tsconfig.json +++ b/packages/base-data-service/tsconfig.json @@ -6,6 +6,9 @@ }, { "path": "../storage-service" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/base-data-service/tsconfig.lint.json b/packages/base-data-service/tsconfig.lint.json index 24dbc1c34da..2916b5265a0 100644 --- a/packages/base-data-service/tsconfig.lint.json +++ b/packages/base-data-service/tsconfig.lint.json @@ -10,6 +10,9 @@ }, { "path": "../storage-service/tsconfig.lint.json" + }, + { + "path": "../utils/tsconfig.lint.json" } ] } diff --git a/packages/bridge-controller/tsconfig.build.json b/packages/bridge-controller/tsconfig.build.json index 709900534ad..df1bff7dd74 100644 --- a/packages/bridge-controller/tsconfig.build.json +++ b/packages/bridge-controller/tsconfig.build.json @@ -46,6 +46,9 @@ }, { "path": "../profile-sync-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/bridge-controller/tsconfig.json b/packages/bridge-controller/tsconfig.json index 075fd4b1e82..4045b866183 100644 --- a/packages/bridge-controller/tsconfig.json +++ b/packages/bridge-controller/tsconfig.json @@ -45,6 +45,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/bridge-status-controller/tsconfig.build.json b/packages/bridge-status-controller/tsconfig.build.json index 7ff7a853bae..53f5aa7df7e 100644 --- a/packages/bridge-status-controller/tsconfig.build.json +++ b/packages/bridge-status-controller/tsconfig.build.json @@ -37,6 +37,9 @@ }, { "path": "../profile-sync-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/bridge-status-controller/tsconfig.json b/packages/bridge-status-controller/tsconfig.json index b7d05198163..e3577be88f0 100644 --- a/packages/bridge-status-controller/tsconfig.json +++ b/packages/bridge-status-controller/tsconfig.json @@ -36,6 +36,9 @@ }, { "path": "../keyring-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./test"] diff --git a/packages/build-utils/tsconfig.build.json b/packages/build-utils/tsconfig.build.json index ffd6513622e..3c1bf02d567 100644 --- a/packages/build-utils/tsconfig.build.json +++ b/packages/build-utils/tsconfig.build.json @@ -4,5 +4,10 @@ "outDir": "./dist", "rootDir": "./src" }, - "include": ["../../types", "./src"] + "include": ["../../types", "./src"], + "references": [ + { + "path": "../utils/tsconfig.build.json" + } + ] } diff --git a/packages/build-utils/tsconfig.json b/packages/build-utils/tsconfig.json index b88472136cf..645e5eea139 100644 --- a/packages/build-utils/tsconfig.json +++ b/packages/build-utils/tsconfig.json @@ -1,4 +1,9 @@ { "extends": "../../tsconfig.packages.json", - "include": ["../../types", "./src"] + "include": ["../../types", "./src"], + "references": [ + { + "path": "../utils" + } + ] } diff --git a/packages/build-utils/tsconfig.lint.json b/packages/build-utils/tsconfig.lint.json index fb65dcfce34..29180bd5694 100644 --- a/packages/build-utils/tsconfig.lint.json +++ b/packages/build-utils/tsconfig.lint.json @@ -4,5 +4,9 @@ "outDir": "./.tsc-lint-cache", "tsBuildInfoFile": "./.tsc-lint-cache/tsconfig.tsbuildinfo" }, - "references": [] + "references": [ + { + "path": "../utils/tsconfig.lint.json" + } + ] } diff --git a/packages/chain-agnostic-permission/tsconfig.build.json b/packages/chain-agnostic-permission/tsconfig.build.json index 9da6c001f0f..4a00db6a142 100644 --- a/packages/chain-agnostic-permission/tsconfig.build.json +++ b/packages/chain-agnostic-permission/tsconfig.build.json @@ -11,6 +11,9 @@ }, { "path": "../permission-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/chain-agnostic-permission/tsconfig.json b/packages/chain-agnostic-permission/tsconfig.json index 6d5d8dad242..162df5e099c 100644 --- a/packages/chain-agnostic-permission/tsconfig.json +++ b/packages/chain-agnostic-permission/tsconfig.json @@ -10,6 +10,9 @@ }, { "path": "../permission-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/chomp-api-service/tsconfig.build.json b/packages/chomp-api-service/tsconfig.build.json index f8a1dafdbfe..47fe9c276df 100644 --- a/packages/chomp-api-service/tsconfig.build.json +++ b/packages/chomp-api-service/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../base-data-service/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/chomp-api-service/tsconfig.json b/packages/chomp-api-service/tsconfig.json index daec25a9b37..0173a553c72 100644 --- a/packages/chomp-api-service/tsconfig.json +++ b/packages/chomp-api-service/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../base-data-service" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/claims-controller/tsconfig.build.json b/packages/claims-controller/tsconfig.build.json index bf726e525b2..214a76c6687 100644 --- a/packages/claims-controller/tsconfig.build.json +++ b/packages/claims-controller/tsconfig.build.json @@ -22,6 +22,9 @@ }, { "path": "../controller-utils/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/claims-controller/tsconfig.json b/packages/claims-controller/tsconfig.json index 53e26346b99..82f379ac037 100644 --- a/packages/claims-controller/tsconfig.json +++ b/packages/claims-controller/tsconfig.json @@ -18,6 +18,9 @@ }, { "path": "../controller-utils" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/client-utils/tsconfig.build.json b/packages/client-utils/tsconfig.build.json index 0b6ec79e7ed..4e1926d886e 100644 --- a/packages/client-utils/tsconfig.build.json +++ b/packages/client-utils/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../transaction-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/client-utils/tsconfig.json b/packages/client-utils/tsconfig.json index 5e55cd5123e..9b46db11abf 100644 --- a/packages/client-utils/tsconfig.json +++ b/packages/client-utils/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../transaction-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./test"] diff --git a/packages/compliance-controller/CHANGELOG.md b/packages/compliance-controller/CHANGELOG.md index 8c1ff983441..9a46dd37a15 100644 --- a/packages/compliance-controller/CHANGELOG.md +++ b/packages/compliance-controller/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Removed + +- Remove the unused `@metamask/utils` dependency ([#10185](https://github.com/MetaMask/core/pull/10185)) + ## [3.0.0] ### Changed diff --git a/packages/compliance-controller/package.json b/packages/compliance-controller/package.json index a89530e253d..901e1262e1f 100644 --- a/packages/compliance-controller/package.json +++ b/packages/compliance-controller/package.json @@ -54,7 +54,6 @@ "@metamask/controller-utils": "^13.0.0", "@metamask/messenger": "^3.0.0", "@metamask/superstruct": "^3.4.1", - "@metamask/utils": "^11.12.0", "reselect": "^5.1.1" }, "devDependencies": { diff --git a/packages/config-registry-controller/tsconfig.build.json b/packages/config-registry-controller/tsconfig.build.json index 79f05fbd1dc..6ca0b5c5b70 100644 --- a/packages/config-registry-controller/tsconfig.build.json +++ b/packages/config-registry-controller/tsconfig.build.json @@ -23,6 +23,9 @@ }, { "path": "../remote-feature-flag-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/config-registry-controller/tsconfig.json b/packages/config-registry-controller/tsconfig.json index 1e55dd05400..24d82b461bf 100644 --- a/packages/config-registry-controller/tsconfig.json +++ b/packages/config-registry-controller/tsconfig.json @@ -18,6 +18,9 @@ }, { "path": "../remote-feature-flag-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/controller-utils/tsconfig.build.json b/packages/controller-utils/tsconfig.build.json index 7368e5da36d..664969e65d4 100644 --- a/packages/controller-utils/tsconfig.build.json +++ b/packages/controller-utils/tsconfig.build.json @@ -8,6 +8,9 @@ "references": [ { "path": "../eth-json-rpc-provider/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ] } diff --git a/packages/controller-utils/tsconfig.json b/packages/controller-utils/tsconfig.json index 9bbdfc1b01b..b466256769e 100644 --- a/packages/controller-utils/tsconfig.json +++ b/packages/controller-utils/tsconfig.json @@ -4,6 +4,9 @@ "references": [ { "path": "../eth-json-rpc-provider" + }, + { + "path": "../utils" } ] } diff --git a/packages/core-backend/tsconfig.build.json b/packages/core-backend/tsconfig.build.json index 418d4a9f628..90fbe511fef 100644 --- a/packages/core-backend/tsconfig.build.json +++ b/packages/core-backend/tsconfig.build.json @@ -22,6 +22,9 @@ }, { "path": "../remote-feature-flag-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/core-backend/tsconfig.json b/packages/core-backend/tsconfig.json index f54131d5311..6b208a3059e 100644 --- a/packages/core-backend/tsconfig.json +++ b/packages/core-backend/tsconfig.json @@ -22,6 +22,9 @@ }, { "path": "../remote-feature-flag-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/delegation-controller/tsconfig.build.json b/packages/delegation-controller/tsconfig.build.json index 353c55746d4..3f56f4d0e82 100644 --- a/packages/delegation-controller/tsconfig.build.json +++ b/packages/delegation-controller/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/delegation-controller/tsconfig.json b/packages/delegation-controller/tsconfig.json index cd33265ac9c..f077da92ae0 100644 --- a/packages/delegation-controller/tsconfig.json +++ b/packages/delegation-controller/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/eip-5792-middleware/tsconfig.build.json b/packages/eip-5792-middleware/tsconfig.build.json index 53f536831e0..4027e7afe3f 100644 --- a/packages/eip-5792-middleware/tsconfig.build.json +++ b/packages/eip-5792-middleware/tsconfig.build.json @@ -16,6 +16,9 @@ }, { "path": "../keyring-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/eip-5792-middleware/tsconfig.json b/packages/eip-5792-middleware/tsconfig.json index a7c40db7be7..90ce8ca02ce 100644 --- a/packages/eip-5792-middleware/tsconfig.json +++ b/packages/eip-5792-middleware/tsconfig.json @@ -15,6 +15,9 @@ }, { "path": "../keyring-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/eip-7702-internal-rpc-middleware/tsconfig.build.json b/packages/eip-7702-internal-rpc-middleware/tsconfig.build.json index a6800420cc8..6af429f8fa8 100644 --- a/packages/eip-7702-internal-rpc-middleware/tsconfig.build.json +++ b/packages/eip-7702-internal-rpc-middleware/tsconfig.build.json @@ -7,6 +7,9 @@ "references": [ { "path": "../controller-utils/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/eip-7702-internal-rpc-middleware/tsconfig.json b/packages/eip-7702-internal-rpc-middleware/tsconfig.json index 249b722e7ac..badd873e9ad 100644 --- a/packages/eip-7702-internal-rpc-middleware/tsconfig.json +++ b/packages/eip-7702-internal-rpc-middleware/tsconfig.json @@ -6,6 +6,9 @@ "references": [ { "path": "../controller-utils" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/eip1193-permission-middleware/tsconfig.build.json b/packages/eip1193-permission-middleware/tsconfig.build.json index 9545f18aa1a..c0d12741491 100644 --- a/packages/eip1193-permission-middleware/tsconfig.build.json +++ b/packages/eip1193-permission-middleware/tsconfig.build.json @@ -16,6 +16,9 @@ }, { "path": "../permission-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/eip1193-permission-middleware/tsconfig.json b/packages/eip1193-permission-middleware/tsconfig.json index 8166ad65044..809abb85507 100644 --- a/packages/eip1193-permission-middleware/tsconfig.json +++ b/packages/eip1193-permission-middleware/tsconfig.json @@ -15,6 +15,9 @@ }, { "path": "../permission-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/eth-block-tracker/tsconfig.build.json b/packages/eth-block-tracker/tsconfig.build.json index c6dc40c410f..48e30a3da55 100644 --- a/packages/eth-block-tracker/tsconfig.build.json +++ b/packages/eth-block-tracker/tsconfig.build.json @@ -10,6 +10,9 @@ }, { "path": "../json-rpc-engine/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/eth-block-tracker/tsconfig.json b/packages/eth-block-tracker/tsconfig.json index 050943a0170..655865f99cb 100644 --- a/packages/eth-block-tracker/tsconfig.json +++ b/packages/eth-block-tracker/tsconfig.json @@ -6,6 +6,9 @@ }, { "path": "../json-rpc-engine" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/eth-json-rpc-middleware/tsconfig.build.json b/packages/eth-json-rpc-middleware/tsconfig.build.json index 7930ddb57af..081691a8138 100644 --- a/packages/eth-json-rpc-middleware/tsconfig.build.json +++ b/packages/eth-json-rpc-middleware/tsconfig.build.json @@ -16,6 +16,9 @@ }, { "path": "../message-manager/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"], diff --git a/packages/eth-json-rpc-middleware/tsconfig.json b/packages/eth-json-rpc-middleware/tsconfig.json index f88e7be47d3..50125a6dac8 100644 --- a/packages/eth-json-rpc-middleware/tsconfig.json +++ b/packages/eth-json-rpc-middleware/tsconfig.json @@ -12,6 +12,9 @@ }, { "path": "../message-manager" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./test"] diff --git a/packages/eth-json-rpc-provider/tsconfig.build.json b/packages/eth-json-rpc-provider/tsconfig.build.json index 4709b5a9f49..76370151696 100644 --- a/packages/eth-json-rpc-provider/tsconfig.build.json +++ b/packages/eth-json-rpc-provider/tsconfig.build.json @@ -7,6 +7,9 @@ "references": [ { "path": "../json-rpc-engine/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/eth-json-rpc-provider/tsconfig.json b/packages/eth-json-rpc-provider/tsconfig.json index 32b997f8f47..a171526a1f8 100644 --- a/packages/eth-json-rpc-provider/tsconfig.json +++ b/packages/eth-json-rpc-provider/tsconfig.json @@ -11,6 +11,9 @@ "references": [ { "path": "../json-rpc-engine" + }, + { + "path": "../utils" } ], "include": ["../../types", "../../tests", "./src", "./tests"] diff --git a/packages/gas-fee-controller/tsconfig.build.json b/packages/gas-fee-controller/tsconfig.build.json index 5de55640fc1..615c94382dd 100644 --- a/packages/gas-fee-controller/tsconfig.build.json +++ b/packages/gas-fee-controller/tsconfig.build.json @@ -19,6 +19,9 @@ }, { "path": "../polling-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/gas-fee-controller/tsconfig.json b/packages/gas-fee-controller/tsconfig.json index 9617765cd7c..3d25b650a98 100644 --- a/packages/gas-fee-controller/tsconfig.json +++ b/packages/gas-fee-controller/tsconfig.json @@ -15,6 +15,9 @@ }, { "path": "../polling-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/gator-permissions-controller/tsconfig.build.json b/packages/gator-permissions-controller/tsconfig.build.json index 2d35346f8cd..3eddd97810e 100644 --- a/packages/gator-permissions-controller/tsconfig.build.json +++ b/packages/gator-permissions-controller/tsconfig.build.json @@ -16,6 +16,9 @@ }, { "path": "../network-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/gator-permissions-controller/tsconfig.json b/packages/gator-permissions-controller/tsconfig.json index 88b2bbe2583..a47a172ed69 100644 --- a/packages/gator-permissions-controller/tsconfig.json +++ b/packages/gator-permissions-controller/tsconfig.json @@ -12,6 +12,9 @@ }, { "path": "../network-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/json-rpc-engine/tsconfig.build.json b/packages/json-rpc-engine/tsconfig.build.json index 66245328a7b..5637adc44de 100644 --- a/packages/json-rpc-engine/tsconfig.build.json +++ b/packages/json-rpc-engine/tsconfig.build.json @@ -7,6 +7,9 @@ "references": [ { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/json-rpc-engine/tsconfig.json b/packages/json-rpc-engine/tsconfig.json index 0b59e1ba83a..6ee53df5453 100644 --- a/packages/json-rpc-engine/tsconfig.json +++ b/packages/json-rpc-engine/tsconfig.json @@ -11,6 +11,9 @@ "references": [ { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "../../tests", "./src", "./tests"] diff --git a/packages/json-rpc-middleware-stream/tsconfig.build.json b/packages/json-rpc-middleware-stream/tsconfig.build.json index 4709b5a9f49..76370151696 100644 --- a/packages/json-rpc-middleware-stream/tsconfig.build.json +++ b/packages/json-rpc-middleware-stream/tsconfig.build.json @@ -7,6 +7,9 @@ "references": [ { "path": "../json-rpc-engine/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/json-rpc-middleware-stream/tsconfig.json b/packages/json-rpc-middleware-stream/tsconfig.json index 579f81588f3..f4854885c25 100644 --- a/packages/json-rpc-middleware-stream/tsconfig.json +++ b/packages/json-rpc-middleware-stream/tsconfig.json @@ -7,6 +7,9 @@ "references": [ { "path": "../json-rpc-engine" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/keyring-controller/tsconfig.build.json b/packages/keyring-controller/tsconfig.build.json index 36a42b5f419..762168988a0 100644 --- a/packages/keyring-controller/tsconfig.build.json +++ b/packages/keyring-controller/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/keyring-controller/tsconfig.json b/packages/keyring-controller/tsconfig.json index 6002c4dd292..84b159bcc93 100644 --- a/packages/keyring-controller/tsconfig.json +++ b/packages/keyring-controller/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/kyc-controller/tsconfig.build.json b/packages/kyc-controller/tsconfig.build.json index a61f3be2cf7..81ebe7402d5 100644 --- a/packages/kyc-controller/tsconfig.build.json +++ b/packages/kyc-controller/tsconfig.build.json @@ -22,6 +22,9 @@ }, { "path": "../profile-sync-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/kyc-controller/tsconfig.json b/packages/kyc-controller/tsconfig.json index fa161f5ad96..2fab97a73aa 100644 --- a/packages/kyc-controller/tsconfig.json +++ b/packages/kyc-controller/tsconfig.json @@ -18,6 +18,9 @@ }, { "path": "../profile-sync-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./scripts"] diff --git a/packages/logging-controller/tsconfig.build.json b/packages/logging-controller/tsconfig.build.json index 417d660ce09..c145368e144 100644 --- a/packages/logging-controller/tsconfig.build.json +++ b/packages/logging-controller/tsconfig.build.json @@ -10,6 +10,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/logging-controller/tsconfig.json b/packages/logging-controller/tsconfig.json index 676ad181ade..65f085e3813 100644 --- a/packages/logging-controller/tsconfig.json +++ b/packages/logging-controller/tsconfig.json @@ -6,6 +6,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/message-manager/tsconfig.build.json b/packages/message-manager/tsconfig.build.json index 36a42b5f419..762168988a0 100644 --- a/packages/message-manager/tsconfig.build.json +++ b/packages/message-manager/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/message-manager/tsconfig.json b/packages/message-manager/tsconfig.json index ac61e63a63e..1322a9b3fcd 100644 --- a/packages/message-manager/tsconfig.json +++ b/packages/message-manager/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/messenger-cli/tsconfig.build.json b/packages/messenger-cli/tsconfig.build.json index f7e0bc20778..eb9ebb8da38 100644 --- a/packages/messenger-cli/tsconfig.build.json +++ b/packages/messenger-cli/tsconfig.build.json @@ -4,6 +4,10 @@ "outDir": "./dist", "rootDir": "./src" }, - "references": [], + "references": [ + { + "path": "../utils/tsconfig.build.json" + } + ], "include": ["../../types", "./src"] } diff --git a/packages/messenger-cli/tsconfig.json b/packages/messenger-cli/tsconfig.json index fabfb3eca68..3f8c910bcfb 100644 --- a/packages/messenger-cli/tsconfig.json +++ b/packages/messenger-cli/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.packages.json", - "references": [], + "references": [ + { + "path": "../utils" + } + ], "include": ["../../types", "./src"] } diff --git a/packages/messenger-cli/tsconfig.lint.json b/packages/messenger-cli/tsconfig.lint.json index fb65dcfce34..29180bd5694 100644 --- a/packages/messenger-cli/tsconfig.lint.json +++ b/packages/messenger-cli/tsconfig.lint.json @@ -4,5 +4,9 @@ "outDir": "./.tsc-lint-cache", "tsBuildInfoFile": "./.tsc-lint-cache/tsconfig.tsbuildinfo" }, - "references": [] + "references": [ + { + "path": "../utils/tsconfig.lint.json" + } + ] } diff --git a/packages/messenger/CHANGELOG.md b/packages/messenger/CHANGELOG.md index 2cf966bb18f..9877e5e49f1 100644 --- a/packages/messenger/CHANGELOG.md +++ b/packages/messenger/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Removed + +- Remove the unused `@metamask/utils` dependency ([#10185](https://github.com/MetaMask/core/pull/10185)) + ## [3.0.0] ### Added diff --git a/packages/messenger/package.json b/packages/messenger/package.json index 6ca64fed313..5240109cae4 100644 --- a/packages/messenger/package.json +++ b/packages/messenger/package.json @@ -51,9 +51,6 @@ "test:verbose": "yarn test:unit:verbose && yarn test:types", "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, - "dependencies": { - "@metamask/utils": "^11.12.0" - }, "devDependencies": { "@metamask/auto-changelog": "^6.1.0", "@types/jest": "^30.0.0", diff --git a/packages/messenger/tsconfig.lint.json b/packages/messenger/tsconfig.lint.json index 672c3683956..52e4f0f5c3f 100644 --- a/packages/messenger/tsconfig.lint.json +++ b/packages/messenger/tsconfig.lint.json @@ -4,5 +4,6 @@ "outDir": "./.tsc-lint-cache", "tsBuildInfoFile": "./.tsc-lint-cache/tsconfig.tsbuildinfo" }, - "exclude": ["**/*.tst.ts"] + "exclude": ["**/*.tst.ts"], + "references": [] } diff --git a/packages/money-account-api-data-service/tsconfig.build.json b/packages/money-account-api-data-service/tsconfig.build.json index 6db76700e55..b036d7f3548 100644 --- a/packages/money-account-api-data-service/tsconfig.build.json +++ b/packages/money-account-api-data-service/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/money-account-api-data-service/tsconfig.json b/packages/money-account-api-data-service/tsconfig.json index cd9adb67e5e..8630400f97a 100644 --- a/packages/money-account-api-data-service/tsconfig.json +++ b/packages/money-account-api-data-service/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/money-account-balance-service/tsconfig.build.json b/packages/money-account-balance-service/tsconfig.build.json index 148aae90ab8..9b02263941d 100644 --- a/packages/money-account-balance-service/tsconfig.build.json +++ b/packages/money-account-balance-service/tsconfig.build.json @@ -22,6 +22,9 @@ }, { "path": "../remote-feature-flag-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/money-account-balance-service/tsconfig.json b/packages/money-account-balance-service/tsconfig.json index d98672b611b..69ce9293f3c 100644 --- a/packages/money-account-balance-service/tsconfig.json +++ b/packages/money-account-balance-service/tsconfig.json @@ -18,6 +18,9 @@ }, { "path": "../remote-feature-flag-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/money-account-controller/tsconfig.build.json b/packages/money-account-controller/tsconfig.build.json index 77fc3be1cc5..3748bcae4e5 100644 --- a/packages/money-account-controller/tsconfig.build.json +++ b/packages/money-account-controller/tsconfig.build.json @@ -16,6 +16,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/money-account-controller/tsconfig.json b/packages/money-account-controller/tsconfig.json index 3b413026d59..62641e499a2 100644 --- a/packages/money-account-controller/tsconfig.json +++ b/packages/money-account-controller/tsconfig.json @@ -12,6 +12,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/money-account-upgrade-controller/tsconfig.build.json b/packages/money-account-upgrade-controller/tsconfig.build.json index 132c9f2245a..415b4fc0dfe 100644 --- a/packages/money-account-upgrade-controller/tsconfig.build.json +++ b/packages/money-account-upgrade-controller/tsconfig.build.json @@ -31,6 +31,9 @@ }, { "path": "../remote-feature-flag-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/money-account-upgrade-controller/tsconfig.json b/packages/money-account-upgrade-controller/tsconfig.json index 6a8ce597308..17da2cbd548 100644 --- a/packages/money-account-upgrade-controller/tsconfig.json +++ b/packages/money-account-upgrade-controller/tsconfig.json @@ -27,6 +27,9 @@ }, { "path": "../remote-feature-flag-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/money-account-utils/tsconfig.build.json b/packages/money-account-utils/tsconfig.build.json index 5360ec390c9..6b5d3a33856 100644 --- a/packages/money-account-utils/tsconfig.build.json +++ b/packages/money-account-utils/tsconfig.build.json @@ -7,6 +7,9 @@ "references": [ { "path": "../transaction-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/money-account-utils/tsconfig.json b/packages/money-account-utils/tsconfig.json index 7765c3044cd..145b2394fcf 100644 --- a/packages/money-account-utils/tsconfig.json +++ b/packages/money-account-utils/tsconfig.json @@ -3,6 +3,9 @@ "references": [ { "path": "../transaction-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/multichain-account-service/tsconfig.build.json b/packages/multichain-account-service/tsconfig.build.json index ee1fb782adb..e265c145d59 100644 --- a/packages/multichain-account-service/tsconfig.build.json +++ b/packages/multichain-account-service/tsconfig.build.json @@ -22,6 +22,9 @@ }, { "path": "../controller-utils/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/multichain-account-service/tsconfig.json b/packages/multichain-account-service/tsconfig.json index 8a90013c1ab..744f8298b18 100644 --- a/packages/multichain-account-service/tsconfig.json +++ b/packages/multichain-account-service/tsconfig.json @@ -18,6 +18,9 @@ }, { "path": "../controller-utils" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/multichain-api-middleware/tsconfig.build.json b/packages/multichain-api-middleware/tsconfig.build.json index 701e962dcd5..a3b576b0ea9 100644 --- a/packages/multichain-api-middleware/tsconfig.build.json +++ b/packages/multichain-api-middleware/tsconfig.build.json @@ -26,6 +26,9 @@ }, { "path": "../multichain-transactions-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/multichain-api-middleware/tsconfig.json b/packages/multichain-api-middleware/tsconfig.json index 79acb191e2f..c066e4d7b77 100644 --- a/packages/multichain-api-middleware/tsconfig.json +++ b/packages/multichain-api-middleware/tsconfig.json @@ -25,6 +25,9 @@ }, { "path": "../controller-utils" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/multichain-network-controller/tsconfig.build.json b/packages/multichain-network-controller/tsconfig.build.json index 6cba418bf88..51f298758dc 100644 --- a/packages/multichain-network-controller/tsconfig.build.json +++ b/packages/multichain-network-controller/tsconfig.build.json @@ -22,6 +22,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/multichain-network-controller/tsconfig.json b/packages/multichain-network-controller/tsconfig.json index 4ee3f7a697e..19b0a70fddf 100644 --- a/packages/multichain-network-controller/tsconfig.json +++ b/packages/multichain-network-controller/tsconfig.json @@ -18,6 +18,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/multichain-transactions-controller/tsconfig.build.json b/packages/multichain-transactions-controller/tsconfig.build.json index 39a7ca84f4f..4180cc0a468 100644 --- a/packages/multichain-transactions-controller/tsconfig.build.json +++ b/packages/multichain-transactions-controller/tsconfig.build.json @@ -19,6 +19,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/multichain-transactions-controller/tsconfig.json b/packages/multichain-transactions-controller/tsconfig.json index b34c11cac82..6da5b288327 100644 --- a/packages/multichain-transactions-controller/tsconfig.json +++ b/packages/multichain-transactions-controller/tsconfig.json @@ -15,6 +15,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/name-controller/tsconfig.build.json b/packages/name-controller/tsconfig.build.json index 2488ec721f4..1498f3dc607 100644 --- a/packages/name-controller/tsconfig.build.json +++ b/packages/name-controller/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../controller-utils/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/name-controller/tsconfig.json b/packages/name-controller/tsconfig.json index c024578eb9a..18d142cb5e8 100644 --- a/packages/name-controller/tsconfig.json +++ b/packages/name-controller/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../controller-utils" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/network-connection-banner-controller/tsconfig.build.json b/packages/network-connection-banner-controller/tsconfig.build.json index bfad83d236c..3e0e5a611c3 100644 --- a/packages/network-connection-banner-controller/tsconfig.build.json +++ b/packages/network-connection-banner-controller/tsconfig.build.json @@ -25,6 +25,9 @@ }, { "path": "../network-enablement-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/network-connection-banner-controller/tsconfig.json b/packages/network-connection-banner-controller/tsconfig.json index abd6b661412..10419d1368b 100644 --- a/packages/network-connection-banner-controller/tsconfig.json +++ b/packages/network-connection-banner-controller/tsconfig.json @@ -21,6 +21,9 @@ }, { "path": "../network-enablement-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/network-controller/tsconfig.build.json b/packages/network-controller/tsconfig.build.json index 49c53a977b2..0a05c12d2cc 100644 --- a/packages/network-controller/tsconfig.build.json +++ b/packages/network-controller/tsconfig.build.json @@ -37,6 +37,9 @@ }, { "path": "../remote-feature-flag-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/network-controller/tsconfig.json b/packages/network-controller/tsconfig.json index 29cc8f7ba99..66eb92fc5d9 100644 --- a/packages/network-controller/tsconfig.json +++ b/packages/network-controller/tsconfig.json @@ -36,6 +36,9 @@ }, { "path": "../remote-feature-flag-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "../../tests", "./src", "./tests"] diff --git a/packages/network-enablement-controller/tsconfig.build.json b/packages/network-enablement-controller/tsconfig.build.json index 84e2b0125ff..4fba2ed1d7d 100644 --- a/packages/network-enablement-controller/tsconfig.build.json +++ b/packages/network-enablement-controller/tsconfig.build.json @@ -25,6 +25,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/network-enablement-controller/tsconfig.json b/packages/network-enablement-controller/tsconfig.json index 9347c6493b5..64bd0af6f0c 100644 --- a/packages/network-enablement-controller/tsconfig.json +++ b/packages/network-enablement-controller/tsconfig.json @@ -24,6 +24,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/notification-services-controller/tsconfig.build.json b/packages/notification-services-controller/tsconfig.build.json index d03c590f901..90f84279096 100644 --- a/packages/notification-services-controller/tsconfig.build.json +++ b/packages/notification-services-controller/tsconfig.build.json @@ -23,6 +23,9 @@ }, { "path": "../controller-utils/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"], diff --git a/packages/notification-services-controller/tsconfig.json b/packages/notification-services-controller/tsconfig.json index 4ba40174253..46a71a6788a 100644 --- a/packages/notification-services-controller/tsconfig.json +++ b/packages/notification-services-controller/tsconfig.json @@ -18,6 +18,9 @@ }, { "path": "../controller-utils" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/passkey-controller/tsconfig.build.json b/packages/passkey-controller/tsconfig.build.json index 353c55746d4..3f56f4d0e82 100644 --- a/packages/passkey-controller/tsconfig.build.json +++ b/packages/passkey-controller/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/passkey-controller/tsconfig.json b/packages/passkey-controller/tsconfig.json index 315da2461b9..e0f724d28d0 100644 --- a/packages/passkey-controller/tsconfig.json +++ b/packages/passkey-controller/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/permission-controller/tsconfig.build.json b/packages/permission-controller/tsconfig.build.json index 2071d291553..e3ec004aae6 100644 --- a/packages/permission-controller/tsconfig.build.json +++ b/packages/permission-controller/tsconfig.build.json @@ -19,6 +19,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/permission-controller/tsconfig.json b/packages/permission-controller/tsconfig.json index 12259ed2218..7b50effdc5e 100644 --- a/packages/permission-controller/tsconfig.json +++ b/packages/permission-controller/tsconfig.json @@ -15,6 +15,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/permission-log-controller/tsconfig.build.json b/packages/permission-log-controller/tsconfig.build.json index 0d1b07d49ef..a01c3e0b44a 100644 --- a/packages/permission-log-controller/tsconfig.build.json +++ b/packages/permission-log-controller/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/permission-log-controller/tsconfig.json b/packages/permission-log-controller/tsconfig.json index 6880640e8c1..081ef59f171 100644 --- a/packages/permission-log-controller/tsconfig.json +++ b/packages/permission-log-controller/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/perps-controller/tsconfig.build.json b/packages/perps-controller/tsconfig.build.json index 151490509b1..c7d82da0dc9 100644 --- a/packages/perps-controller/tsconfig.build.json +++ b/packages/perps-controller/tsconfig.build.json @@ -39,6 +39,9 @@ }, { "path": "../transaction-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/perps-controller/tsconfig.json b/packages/perps-controller/tsconfig.json index bc17bcefd24..4f10ff12672 100644 --- a/packages/perps-controller/tsconfig.json +++ b/packages/perps-controller/tsconfig.json @@ -37,6 +37,9 @@ }, { "path": "../transaction-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/platform-api-docs/tsconfig.build.json b/packages/platform-api-docs/tsconfig.build.json index f7e0bc20778..eb9ebb8da38 100644 --- a/packages/platform-api-docs/tsconfig.build.json +++ b/packages/platform-api-docs/tsconfig.build.json @@ -4,6 +4,10 @@ "outDir": "./dist", "rootDir": "./src" }, - "references": [], + "references": [ + { + "path": "../utils/tsconfig.build.json" + } + ], "include": ["../../types", "./src"] } diff --git a/packages/platform-api-docs/tsconfig.json b/packages/platform-api-docs/tsconfig.json index fabfb3eca68..3f8c910bcfb 100644 --- a/packages/platform-api-docs/tsconfig.json +++ b/packages/platform-api-docs/tsconfig.json @@ -1,5 +1,9 @@ { "extends": "../../tsconfig.packages.json", - "references": [], + "references": [ + { + "path": "../utils" + } + ], "include": ["../../types", "./src"] } diff --git a/packages/platform-api-docs/tsconfig.lint.json b/packages/platform-api-docs/tsconfig.lint.json index fb65dcfce34..29180bd5694 100644 --- a/packages/platform-api-docs/tsconfig.lint.json +++ b/packages/platform-api-docs/tsconfig.lint.json @@ -4,5 +4,9 @@ "outDir": "./.tsc-lint-cache", "tsBuildInfoFile": "./.tsc-lint-cache/tsconfig.tsbuildinfo" }, - "references": [] + "references": [ + { + "path": "../utils/tsconfig.lint.json" + } + ] } diff --git a/packages/polling-controller/tsconfig.build.json b/packages/polling-controller/tsconfig.build.json index 417d660ce09..c145368e144 100644 --- a/packages/polling-controller/tsconfig.build.json +++ b/packages/polling-controller/tsconfig.build.json @@ -10,6 +10,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/polling-controller/tsconfig.json b/packages/polling-controller/tsconfig.json index b6f2435bc46..d38985cc12a 100644 --- a/packages/polling-controller/tsconfig.json +++ b/packages/polling-controller/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "../../tests"] diff --git a/packages/preferences-controller/package.json b/packages/preferences-controller/package.json index cec12a86cf8..140de1be5b1 100644 --- a/packages/preferences-controller/package.json +++ b/packages/preferences-controller/package.json @@ -55,7 +55,6 @@ }, "devDependencies": { "@metamask/auto-changelog": "^6.1.0", - "@metamask/utils": "^11.12.0", "@types/jest": "^30.0.0", "@typescript/native": "npm:typescript@^7.0.2", "deepmerge": "^4.2.2", diff --git a/packages/profile-metrics-controller/tsconfig.build.json b/packages/profile-metrics-controller/tsconfig.build.json index 17c2e119af3..6f420f9b2e2 100644 --- a/packages/profile-metrics-controller/tsconfig.build.json +++ b/packages/profile-metrics-controller/tsconfig.build.json @@ -28,6 +28,9 @@ }, { "path": "../transaction-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/profile-metrics-controller/tsconfig.json b/packages/profile-metrics-controller/tsconfig.json index 515afde9ce2..f976dd772c7 100644 --- a/packages/profile-metrics-controller/tsconfig.json +++ b/packages/profile-metrics-controller/tsconfig.json @@ -24,6 +24,9 @@ }, { "path": "../transaction-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/profile-sync-controller/tsconfig.build.json b/packages/profile-sync-controller/tsconfig.build.json index 26faa84e8a7..24f6ea448d3 100644 --- a/packages/profile-sync-controller/tsconfig.build.json +++ b/packages/profile-sync-controller/tsconfig.build.json @@ -20,6 +20,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"], diff --git a/packages/profile-sync-controller/tsconfig.json b/packages/profile-sync-controller/tsconfig.json index d2f9dbf7c05..096b2d227ea 100644 --- a/packages/profile-sync-controller/tsconfig.json +++ b/packages/profile-sync-controller/tsconfig.json @@ -15,6 +15,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/rate-limit-controller/tsconfig.build.json b/packages/rate-limit-controller/tsconfig.build.json index 417d660ce09..c145368e144 100644 --- a/packages/rate-limit-controller/tsconfig.build.json +++ b/packages/rate-limit-controller/tsconfig.build.json @@ -10,6 +10,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/rate-limit-controller/tsconfig.json b/packages/rate-limit-controller/tsconfig.json index 676ad181ade..65f085e3813 100644 --- a/packages/rate-limit-controller/tsconfig.json +++ b/packages/rate-limit-controller/tsconfig.json @@ -6,6 +6,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/rate-limit-controller/tsconfig.lint.json b/packages/rate-limit-controller/tsconfig.lint.json index c19124f864f..e5b50698930 100644 --- a/packages/rate-limit-controller/tsconfig.lint.json +++ b/packages/rate-limit-controller/tsconfig.lint.json @@ -10,6 +10,9 @@ }, { "path": "../messenger/tsconfig.lint.json" + }, + { + "path": "../utils/tsconfig.lint.json" } ] } diff --git a/packages/react-data-query/tsconfig.build.json b/packages/react-data-query/tsconfig.build.json index 6c787f342d8..5e6a390d1e7 100644 --- a/packages/react-data-query/tsconfig.build.json +++ b/packages/react-data-query/tsconfig.build.json @@ -10,6 +10,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"], diff --git a/packages/react-data-query/tsconfig.json b/packages/react-data-query/tsconfig.json index 799bcd181a9..e9aa00c7744 100644 --- a/packages/react-data-query/tsconfig.json +++ b/packages/react-data-query/tsconfig.json @@ -6,6 +6,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/react-data-query/tsconfig.lint.json b/packages/react-data-query/tsconfig.lint.json index 20dc38ed389..d764bd2f431 100644 --- a/packages/react-data-query/tsconfig.lint.json +++ b/packages/react-data-query/tsconfig.lint.json @@ -10,6 +10,9 @@ }, { "path": "../base-data-service/tsconfig.lint.json" + }, + { + "path": "../utils/tsconfig.lint.json" } ] } diff --git a/packages/remote-feature-flag-controller/tsconfig.build.json b/packages/remote-feature-flag-controller/tsconfig.build.json index 2488ec721f4..1498f3dc607 100644 --- a/packages/remote-feature-flag-controller/tsconfig.build.json +++ b/packages/remote-feature-flag-controller/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../controller-utils/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/remote-feature-flag-controller/tsconfig.json b/packages/remote-feature-flag-controller/tsconfig.json index c024578eb9a..18d142cb5e8 100644 --- a/packages/remote-feature-flag-controller/tsconfig.json +++ b/packages/remote-feature-flag-controller/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../controller-utils" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/sample-controllers/tsconfig.build.json b/packages/sample-controllers/tsconfig.build.json index aaa9582d5da..03d9cd14276 100644 --- a/packages/sample-controllers/tsconfig.build.json +++ b/packages/sample-controllers/tsconfig.build.json @@ -19,6 +19,9 @@ }, { "path": "../network-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/sample-controllers/tsconfig.json b/packages/sample-controllers/tsconfig.json index 6d78b6a6845..5feece8d600 100644 --- a/packages/sample-controllers/tsconfig.json +++ b/packages/sample-controllers/tsconfig.json @@ -15,6 +15,9 @@ }, { "path": "../network-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/seedless-onboarding-controller/tsconfig.build.json b/packages/seedless-onboarding-controller/tsconfig.build.json index 353c55746d4..3f56f4d0e82 100644 --- a/packages/seedless-onboarding-controller/tsconfig.build.json +++ b/packages/seedless-onboarding-controller/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/seedless-onboarding-controller/tsconfig.json b/packages/seedless-onboarding-controller/tsconfig.json index 315da2461b9..e0f724d28d0 100644 --- a/packages/seedless-onboarding-controller/tsconfig.json +++ b/packages/seedless-onboarding-controller/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/selected-network-controller/tsconfig.build.json b/packages/selected-network-controller/tsconfig.build.json index 151b0156da1..db5b1b8a5f4 100644 --- a/packages/selected-network-controller/tsconfig.build.json +++ b/packages/selected-network-controller/tsconfig.build.json @@ -19,6 +19,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/selected-network-controller/tsconfig.json b/packages/selected-network-controller/tsconfig.json index 559018fc22b..f52ea2c8f57 100644 --- a/packages/selected-network-controller/tsconfig.json +++ b/packages/selected-network-controller/tsconfig.json @@ -18,6 +18,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "../../tests", "./src", "./tests"] diff --git a/packages/sentinel-api-service/tsconfig.build.json b/packages/sentinel-api-service/tsconfig.build.json index 6db76700e55..b036d7f3548 100644 --- a/packages/sentinel-api-service/tsconfig.build.json +++ b/packages/sentinel-api-service/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/sentinel-api-service/tsconfig.json b/packages/sentinel-api-service/tsconfig.json index cd9adb67e5e..8630400f97a 100644 --- a/packages/sentinel-api-service/tsconfig.json +++ b/packages/sentinel-api-service/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/shield-controller/tsconfig.build.json b/packages/shield-controller/tsconfig.build.json index 9f039878307..26d1fb347e8 100644 --- a/packages/shield-controller/tsconfig.build.json +++ b/packages/shield-controller/tsconfig.build.json @@ -25,6 +25,9 @@ }, { "path": "../controller-utils/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/shield-controller/tsconfig.json b/packages/shield-controller/tsconfig.json index 7612dea44f1..8eb95e1dbb5 100644 --- a/packages/shield-controller/tsconfig.json +++ b/packages/shield-controller/tsconfig.json @@ -21,6 +21,9 @@ }, { "path": "../controller-utils" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/signature-controller/tsconfig.build.json b/packages/signature-controller/tsconfig.build.json index 55d18bc4f12..4fa74fdbbee 100644 --- a/packages/signature-controller/tsconfig.build.json +++ b/packages/signature-controller/tsconfig.build.json @@ -31,6 +31,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/signature-controller/tsconfig.json b/packages/signature-controller/tsconfig.json index 97c37a33b5b..37c718a0500 100644 --- a/packages/signature-controller/tsconfig.json +++ b/packages/signature-controller/tsconfig.json @@ -27,6 +27,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/smart-transactions-controller/tsconfig.build.json b/packages/smart-transactions-controller/tsconfig.build.json index e193dc7bdd4..5cdfba971d8 100644 --- a/packages/smart-transactions-controller/tsconfig.build.json +++ b/packages/smart-transactions-controller/tsconfig.build.json @@ -34,6 +34,9 @@ }, { "path": "../transaction-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/smart-transactions-controller/tsconfig.json b/packages/smart-transactions-controller/tsconfig.json index 9c2c9794a2a..d5dd7c771f5 100644 --- a/packages/smart-transactions-controller/tsconfig.json +++ b/packages/smart-transactions-controller/tsconfig.json @@ -34,6 +34,9 @@ }, { "path": "../transaction-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/snap-account-service/tsconfig.build.json b/packages/snap-account-service/tsconfig.build.json index 1bbf7232c6c..92f62586d0b 100644 --- a/packages/snap-account-service/tsconfig.build.json +++ b/packages/snap-account-service/tsconfig.build.json @@ -10,6 +10,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/snap-account-service/tsconfig.json b/packages/snap-account-service/tsconfig.json index b1ec80c628b..fd6c74e28f1 100644 --- a/packages/snap-account-service/tsconfig.json +++ b/packages/snap-account-service/tsconfig.json @@ -6,6 +6,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/storage-service/tsconfig.build.json b/packages/storage-service/tsconfig.build.json index 66245328a7b..5637adc44de 100644 --- a/packages/storage-service/tsconfig.build.json +++ b/packages/storage-service/tsconfig.build.json @@ -7,6 +7,9 @@ "references": [ { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/storage-service/tsconfig.json b/packages/storage-service/tsconfig.json index c75b51a1a76..96f7e89cfb4 100644 --- a/packages/storage-service/tsconfig.json +++ b/packages/storage-service/tsconfig.json @@ -3,6 +3,9 @@ "references": [ { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/storage-service/tsconfig.lint.json b/packages/storage-service/tsconfig.lint.json index 1e03d050875..046d5a5e8ff 100644 --- a/packages/storage-service/tsconfig.lint.json +++ b/packages/storage-service/tsconfig.lint.json @@ -7,6 +7,9 @@ "references": [ { "path": "../messenger/tsconfig.lint.json" + }, + { + "path": "../utils/tsconfig.lint.json" } ] } diff --git a/packages/subscription-controller/tsconfig.build.json b/packages/subscription-controller/tsconfig.build.json index abec5593e0f..af48c003321 100644 --- a/packages/subscription-controller/tsconfig.build.json +++ b/packages/subscription-controller/tsconfig.build.json @@ -25,6 +25,9 @@ }, { "path": "../base-data-service/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/subscription-controller/tsconfig.json b/packages/subscription-controller/tsconfig.json index 3c6f42c1fff..b56de08ffbb 100644 --- a/packages/subscription-controller/tsconfig.json +++ b/packages/subscription-controller/tsconfig.json @@ -21,6 +21,9 @@ }, { "path": "../base-data-service" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/transaction-controller/tsconfig.build.json b/packages/transaction-controller/tsconfig.build.json index 03d2c5b95fa..2d19c5f9e94 100644 --- a/packages/transaction-controller/tsconfig.build.json +++ b/packages/transaction-controller/tsconfig.build.json @@ -40,6 +40,9 @@ }, { "path": "../eth-json-rpc-provider/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/transaction-controller/tsconfig.json b/packages/transaction-controller/tsconfig.json index ccc7fd7ef36..a0aaffc8358 100644 --- a/packages/transaction-controller/tsconfig.json +++ b/packages/transaction-controller/tsconfig.json @@ -39,6 +39,9 @@ }, { "path": "../eth-json-rpc-provider" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src", "./tests"] diff --git a/packages/transaction-pay-controller/tsconfig.build.json b/packages/transaction-pay-controller/tsconfig.build.json index 314a9a8ac6a..c712fcdb60c 100644 --- a/packages/transaction-pay-controller/tsconfig.build.json +++ b/packages/transaction-pay-controller/tsconfig.build.json @@ -40,6 +40,9 @@ }, { "path": "../sentinel-api-service/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/transaction-pay-controller/tsconfig.json b/packages/transaction-pay-controller/tsconfig.json index e4b9aba06ee..b9359d62000 100644 --- a/packages/transaction-pay-controller/tsconfig.json +++ b/packages/transaction-pay-controller/tsconfig.json @@ -36,6 +36,9 @@ }, { "path": "../sentinel-api-service" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/packages/user-operation-controller/tsconfig.build.json b/packages/user-operation-controller/tsconfig.build.json index 4a928599c18..5af046d572e 100644 --- a/packages/user-operation-controller/tsconfig.build.json +++ b/packages/user-operation-controller/tsconfig.build.json @@ -34,6 +34,9 @@ }, { "path": "../eth-block-tracker/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/user-operation-controller/tsconfig.json b/packages/user-operation-controller/tsconfig.json index 340530c201f..f5edcef92c1 100644 --- a/packages/user-operation-controller/tsconfig.json +++ b/packages/user-operation-controller/tsconfig.json @@ -30,6 +30,9 @@ }, { "path": "../eth-block-tracker" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/merged-packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md similarity index 100% rename from merged-packages/utils/CHANGELOG.md rename to packages/utils/CHANGELOG.md diff --git a/merged-packages/utils/LICENSE b/packages/utils/LICENSE similarity index 100% rename from merged-packages/utils/LICENSE rename to packages/utils/LICENSE diff --git a/merged-packages/utils/README.md b/packages/utils/README.md similarity index 100% rename from merged-packages/utils/README.md rename to packages/utils/README.md diff --git a/merged-packages/utils/jest.config.cjs b/packages/utils/jest.config.cjs similarity index 74% rename from merged-packages/utils/jest.config.cjs rename to packages/utils/jest.config.cjs index 2a3d022c2b6..e0d1d266578 100644 --- a/merged-packages/utils/jest.config.cjs +++ b/packages/utils/jest.config.cjs @@ -14,9 +14,9 @@ module.exports = merge(baseConfig, { // The display name when running multiple projects displayName, - // Fixtures hold data rather than logic, and `*.test-d.ts` files are type - // tests run by `tsd` rather than Jest, so neither counts towards coverage. - coveragePathIgnorePatterns: ['/__fixtures__/', '\\.test-d\\.ts$'], + // Fixtures hold data rather than logic, and `*.tst.ts` files are type + // tests run by `tstyche` rather than Jest, so neither counts towards coverage. + coveragePathIgnorePatterns: ['/__fixtures__/', '\\.tst\\.ts$'], // An object that configures minimum threshold enforcement for coverage results coverageThreshold: { diff --git a/merged-packages/utils/package.json b/packages/utils/package.json similarity index 77% rename from merged-packages/utils/package.json rename to packages/utils/package.json index e7656eeb445..81acddbcf32 100644 --- a/merged-packages/utils/package.json +++ b/packages/utils/package.json @@ -2,21 +2,25 @@ "name": "@metamask/utils", "version": "12.0.0", "description": "Various JavaScript/TypeScript utilities of wide relevance to the MetaMask codebase", - "homepage": "https://github.com/MetaMask/utils#readme", + "keywords": [ + "Ethereum", + "MetaMask" + ], + "homepage": "https://github.com/MetaMask/core/tree/main/packages/utils#readme", "bugs": { - "url": "https://github.com/MetaMask/utils/issues" + "url": "https://github.com/MetaMask/core/issues" }, "license": "ISC", "repository": { "type": "git", - "url": "https://github.com/MetaMask/utils.git" + "url": "https://github.com/MetaMask/core.git" }, "files": [ - "dist" + "dist", + "dist/" ], "type": "module", "sideEffects": false, - "types": "./dist/index.d.ts", "exports": { ".": { "types": "./dist/index.d.ts", @@ -43,10 +47,13 @@ "lint:tsconfigs": "tsx ../../scripts/lint-tsconfigs/lint-tsconfigs.mts", "lint:tsconfigs:fix": "tsx ../../scripts/lint-tsconfigs/lint-tsconfigs.mts --fix", "since-latest-release": "../../scripts/since-latest-release.sh", - "test": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter && yarn test:types", - "test:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache", - "test:types": "tsd --files 'src/*.test-d.ts'", - "test:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose", + "test": "yarn test:unit && yarn test:types", + "test:clean": "yarn test:unit:clean && yarn test:types", + "test:types": "tstyche", + "test:unit": "NODE_OPTIONS=--experimental-vm-modules jest --reporters=jest-silent-reporter", + "test:unit:clean": "NODE_OPTIONS=--experimental-vm-modules jest --clearCache", + "test:unit:verbose": "NODE_OPTIONS=--experimental-vm-modules jest --verbose", + "test:verbose": "yarn test:unit:verbose && yarn test:types", "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { @@ -75,19 +82,13 @@ "rimraf": "^5.0.5", "stdio-mock": "^1.2.0", "ts-jest": "^29.4.11", - "tsd": "^0.29.0", + "tstyche": "^7.2.3", "tsx": "^4.20.5", "typedoc": "^0.25.13", "typedoc-plugin-missing-exports": "^2.0.0", "typescript": "npm:@typescript/typescript6@^6.0.2", "web3": "^4.16.0" }, - "resolutions": { - "jest-worker@^28.1.3": "patch:jest-worker@npm%3A28.1.3#./.yarn/patches/jest-worker-npm-28.1.3-5d0ff9006c.patch" - }, - "tsd": { - "directory": "src" - }, "engines": { "node": "^22.14.0 || ^24" }, diff --git a/merged-packages/utils/src/__fixtures__/bytes.ts b/packages/utils/src/__fixtures__/bytes.ts similarity index 100% rename from merged-packages/utils/src/__fixtures__/bytes.ts rename to packages/utils/src/__fixtures__/bytes.ts diff --git a/merged-packages/utils/src/__fixtures__/caip-types.ts b/packages/utils/src/__fixtures__/caip-types.ts similarity index 100% rename from merged-packages/utils/src/__fixtures__/caip-types.ts rename to packages/utils/src/__fixtures__/caip-types.ts diff --git a/merged-packages/utils/src/__fixtures__/coercions.ts b/packages/utils/src/__fixtures__/coercions.ts similarity index 100% rename from merged-packages/utils/src/__fixtures__/coercions.ts rename to packages/utils/src/__fixtures__/coercions.ts diff --git a/merged-packages/utils/src/__fixtures__/index.ts b/packages/utils/src/__fixtures__/index.ts similarity index 100% rename from merged-packages/utils/src/__fixtures__/index.ts rename to packages/utils/src/__fixtures__/index.ts diff --git a/merged-packages/utils/src/__fixtures__/json.ts b/packages/utils/src/__fixtures__/json.ts similarity index 100% rename from merged-packages/utils/src/__fixtures__/json.ts rename to packages/utils/src/__fixtures__/json.ts diff --git a/merged-packages/utils/src/__fixtures__/numbers.ts b/packages/utils/src/__fixtures__/numbers.ts similarity index 100% rename from merged-packages/utils/src/__fixtures__/numbers.ts rename to packages/utils/src/__fixtures__/numbers.ts diff --git a/merged-packages/utils/src/assert.test.ts b/packages/utils/src/assert.test.ts similarity index 100% rename from merged-packages/utils/src/assert.test.ts rename to packages/utils/src/assert.test.ts diff --git a/merged-packages/utils/src/assert.ts b/packages/utils/src/assert.ts similarity index 100% rename from merged-packages/utils/src/assert.ts rename to packages/utils/src/assert.ts diff --git a/merged-packages/utils/src/base64.test.ts b/packages/utils/src/base64.test.ts similarity index 100% rename from merged-packages/utils/src/base64.test.ts rename to packages/utils/src/base64.test.ts diff --git a/merged-packages/utils/src/base64.ts b/packages/utils/src/base64.ts similarity index 100% rename from merged-packages/utils/src/base64.ts rename to packages/utils/src/base64.ts diff --git a/merged-packages/utils/src/bytes.test.ts b/packages/utils/src/bytes.test.ts similarity index 100% rename from merged-packages/utils/src/bytes.test.ts rename to packages/utils/src/bytes.test.ts diff --git a/merged-packages/utils/src/bytes.ts b/packages/utils/src/bytes.ts similarity index 100% rename from merged-packages/utils/src/bytes.ts rename to packages/utils/src/bytes.ts diff --git a/merged-packages/utils/src/caip-types.test.ts b/packages/utils/src/caip-types.test.ts similarity index 100% rename from merged-packages/utils/src/caip-types.test.ts rename to packages/utils/src/caip-types.test.ts diff --git a/merged-packages/utils/src/caip-types.ts b/packages/utils/src/caip-types.ts similarity index 100% rename from merged-packages/utils/src/caip-types.ts rename to packages/utils/src/caip-types.ts diff --git a/packages/utils/src/caip-types.tst.ts b/packages/utils/src/caip-types.tst.ts new file mode 100644 index 00000000000..627dfa73397 --- /dev/null +++ b/packages/utils/src/caip-types.tst.ts @@ -0,0 +1,101 @@ +import { describe, expect, test } from 'tstyche'; + +import type { + CaipAccountAddress, + CaipAccountId, + CaipAssetId, + CaipAssetNamespace, + CaipAssetReference, + CaipAssetType, + CaipChainId, + CaipNamespace, + CaipReference, +} from './index.js'; + +const embeddedString = 'test'; + +describe('CAIP types', () => { + test('accept valid CAIP strings', () => { + expect('namespace:reference').type.toBeAssignableTo(); + expect('namespace:').type.toBeAssignableTo(); + expect(':reference').type.toBeAssignableTo(); + expect( + `${embeddedString}:${embeddedString}`, + ).type.toBeAssignableTo(); + + expect('string').type.toBeAssignableTo(); + expect(`${embeddedString}`).type.toBeAssignableTo(); + + expect('string').type.toBeAssignableTo(); + expect(`${embeddedString}`).type.toBeAssignableTo(); + + expect( + 'namespace:reference:accountAddress', + ).type.toBeAssignableTo(); + expect('namespace:reference:').type.toBeAssignableTo(); + expect(':reference:accountAddress').type.toBeAssignableTo(); + expect( + `${embeddedString}:${embeddedString}:${embeddedString}`, + ).type.toBeAssignableTo(); + + expect('string').type.toBeAssignableTo(); + expect(`${embeddedString}`).type.toBeAssignableTo(); + + expect('string').type.toBeAssignableTo(); + expect(`${embeddedString}`).type.toBeAssignableTo(); + + expect('string').type.toBeAssignableTo(); + expect(`${embeddedString}`).type.toBeAssignableTo(); + + expect( + 'namespace:reference/assetNamespace:assetReference', + ).type.toBeAssignableTo(); + expect('namespace:reference/:').type.toBeAssignableTo(); + expect(':reference/assetNamespace:').type.toBeAssignableTo(); + expect( + `${embeddedString}:${embeddedString}/${embeddedString}:${embeddedString}`, + ).type.toBeAssignableTo(); + + expect( + 'namespace:reference/assetNamespace:assetReference/tokenId', + ).type.toBeAssignableTo(); + expect( + 'namespace:reference/:assetReference/', + ).type.toBeAssignableTo(); + expect(':reference/assetNamespace:/').type.toBeAssignableTo(); + expect( + `${embeddedString}:${embeddedString}/${embeddedString}:${embeddedString}/${embeddedString}`, + ).type.toBeAssignableTo(); + }); + + test('reject invalid CAIP strings', () => { + // Emoji are not excluded by the patterns, only checked at runtime. + expect('namespace:😀').type.toBeAssignableTo(); + expect('😀:reference').type.toBeAssignableTo(); + expect(0).type.not.toBeAssignableTo(); + expect('🙃').type.not.toBeAssignableTo(); + + expect(0).type.not.toBeAssignableTo(); + + expect(0).type.not.toBeAssignableTo(); + + expect('namespace:reference:😀').type.toBeAssignableTo(); + expect( + '😀:reference:accountAddress', + ).type.toBeAssignableTo(); + expect(0).type.not.toBeAssignableTo(); + expect('🙃').type.not.toBeAssignableTo(); + + expect(0).type.not.toBeAssignableTo(); + + expect(0).type.not.toBeAssignableTo(); + + expect(0).type.not.toBeAssignableTo(); + + expect(0).type.not.toBeAssignableTo(); + expect('🙃').type.not.toBeAssignableTo(); + + expect(0).type.not.toBeAssignableTo(); + expect('🙃').type.not.toBeAssignableTo(); + }); +}); diff --git a/merged-packages/utils/src/checksum.test.ts b/packages/utils/src/checksum.test.ts similarity index 100% rename from merged-packages/utils/src/checksum.test.ts rename to packages/utils/src/checksum.test.ts diff --git a/merged-packages/utils/src/checksum.ts b/packages/utils/src/checksum.ts similarity index 100% rename from merged-packages/utils/src/checksum.ts rename to packages/utils/src/checksum.ts diff --git a/merged-packages/utils/src/coercers.test.ts b/packages/utils/src/coercers.test.ts similarity index 100% rename from merged-packages/utils/src/coercers.test.ts rename to packages/utils/src/coercers.test.ts diff --git a/merged-packages/utils/src/coercers.ts b/packages/utils/src/coercers.ts similarity index 100% rename from merged-packages/utils/src/coercers.ts rename to packages/utils/src/coercers.ts diff --git a/merged-packages/utils/src/collections.test.ts b/packages/utils/src/collections.test.ts similarity index 100% rename from merged-packages/utils/src/collections.test.ts rename to packages/utils/src/collections.test.ts diff --git a/merged-packages/utils/src/collections.ts b/packages/utils/src/collections.ts similarity index 100% rename from merged-packages/utils/src/collections.ts rename to packages/utils/src/collections.ts diff --git a/merged-packages/utils/src/encryption-types.ts b/packages/utils/src/encryption-types.ts similarity index 100% rename from merged-packages/utils/src/encryption-types.ts rename to packages/utils/src/encryption-types.ts diff --git a/merged-packages/utils/src/errors.test.ts b/packages/utils/src/errors.test.ts similarity index 100% rename from merged-packages/utils/src/errors.test.ts rename to packages/utils/src/errors.test.ts diff --git a/merged-packages/utils/src/errors.ts b/packages/utils/src/errors.ts similarity index 100% rename from merged-packages/utils/src/errors.ts rename to packages/utils/src/errors.ts diff --git a/merged-packages/utils/src/fs.test.ts b/packages/utils/src/fs.test.ts similarity index 100% rename from merged-packages/utils/src/fs.test.ts rename to packages/utils/src/fs.test.ts diff --git a/merged-packages/utils/src/fs.ts b/packages/utils/src/fs.ts similarity index 100% rename from merged-packages/utils/src/fs.ts rename to packages/utils/src/fs.ts diff --git a/merged-packages/utils/src/hashing.test.ts b/packages/utils/src/hashing.test.ts similarity index 100% rename from merged-packages/utils/src/hashing.test.ts rename to packages/utils/src/hashing.test.ts diff --git a/merged-packages/utils/src/hashing.ts b/packages/utils/src/hashing.ts similarity index 100% rename from merged-packages/utils/src/hashing.ts rename to packages/utils/src/hashing.ts diff --git a/merged-packages/utils/src/hex.test.ts b/packages/utils/src/hex.test.ts similarity index 100% rename from merged-packages/utils/src/hex.test.ts rename to packages/utils/src/hex.test.ts diff --git a/merged-packages/utils/src/hex.ts b/packages/utils/src/hex.ts similarity index 100% rename from merged-packages/utils/src/hex.ts rename to packages/utils/src/hex.ts diff --git a/packages/utils/src/hex.tst.ts b/packages/utils/src/hex.tst.ts new file mode 100644 index 00000000000..31b78fe802e --- /dev/null +++ b/packages/utils/src/hex.tst.ts @@ -0,0 +1,30 @@ +import { describe, expect, test } from 'tstyche'; + +import type { Hex } from './index.js'; + +describe('Hex', () => { + test('accepts valid hex strings', () => { + expect('0x').type.toBeAssignableTo(); + + expect('0x0').type.toBeAssignableTo(); + + expect('0x😀').type.toBeAssignableTo(); + + const embeddedString = 'test'; + expect(`0x${embeddedString}`).type.toBeAssignableTo(); + }); + + test('rejects invalid hex strings', () => { + const embeddedString = 'test'; + + expect(`0X${embeddedString}`).type.not.toBeAssignableTo(); + + expect(`1x${embeddedString}`).type.not.toBeAssignableTo(); + + expect(0).type.not.toBeAssignableTo(); + + expect('0').type.not.toBeAssignableTo(); + + expect('🙃').type.not.toBeAssignableTo(); + }); +}); diff --git a/merged-packages/utils/src/index.test.ts b/packages/utils/src/index.test.ts similarity index 100% rename from merged-packages/utils/src/index.test.ts rename to packages/utils/src/index.test.ts diff --git a/merged-packages/utils/src/index.ts b/packages/utils/src/index.ts similarity index 100% rename from merged-packages/utils/src/index.ts rename to packages/utils/src/index.ts diff --git a/merged-packages/utils/src/json.test.ts b/packages/utils/src/json.test.ts similarity index 100% rename from merged-packages/utils/src/json.test.ts rename to packages/utils/src/json.test.ts diff --git a/merged-packages/utils/src/json.ts b/packages/utils/src/json.ts similarity index 98% rename from merged-packages/utils/src/json.ts rename to packages/utils/src/json.ts index d847166728c..b2795c477d2 100644 --- a/merged-packages/utils/src/json.ts +++ b/packages/utils/src/json.ts @@ -467,7 +467,10 @@ export type JsonRpcSuccess = Omit< export const JsonRpcFailureStruct = object({ id: JsonRpcIdStruct, jsonrpc: JsonRpcVersionStruct, - // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion -- The assertion does not change assignability, but it does pin the emitted declaration to the named `JsonRpcError`. Without it TypeScript inlines the structure and leaks the unexported `ExactOptionalGuard` into the published types. + // The assertion does not change assignability, but it does pin the emitted + // declaration to the named `JsonRpcError`. Without it TypeScript inlines the + // structure and leaks the unexported `ExactOptionalGuard` into the published + // types. error: JsonRpcErrorStruct as Struct, }); diff --git a/packages/utils/src/json.tst.ts b/packages/utils/src/json.tst.ts new file mode 100644 index 00000000000..9b48b674790 --- /dev/null +++ b/packages/utils/src/json.tst.ts @@ -0,0 +1,185 @@ +/* eslint-disable @typescript-eslint/consistent-type-definitions */ + +import type { Infer } from '@metamask/superstruct'; +import { boolean, number, optional, string } from '@metamask/superstruct'; +import { describe, expect, test } from 'tstyche'; + +import type { Json } from './index.js'; +import { exactOptional, object } from './index.js'; + +describe('Json', () => { + test('accepts valid JSON', () => { + expect(null).type.toBeAssignableTo(); + + expect(false).type.toBeAssignableTo(); + + expect('').type.toBeAssignableTo(); + + expect(0).type.toBeAssignableTo(); + + expect([]).type.toBeAssignableTo(); + + expect({}).type.toBeAssignableTo(); + + expect([0]).type.toBeAssignableTo(); + + expect({ a: 0 }).type.toBeAssignableTo(); + + expect({ + deeply: [{ nested: 1 }, 'mixed', 'types', 0], + }).type.toBeAssignableTo(); + + expect([ + 'array', + { nested: { mixed: true, types: null } }, + 0, + ]).type.toBeAssignableTo(); + + type JsonCompatibleType = { + c: number; + }; + const jsonCompatibleType: JsonCompatibleType = { c: 0 }; + expect(jsonCompatibleType).type.toBeAssignableTo(); + }); + + test('rejects invalid JSON', () => { + expect(undefined).type.not.toBeAssignableTo(); + + expect(new Date()).type.not.toBeAssignableTo(); + + expect(() => 0).type.not.toBeAssignableTo(); + + expect(new Set()).type.not.toBeAssignableTo(); + + expect(new Map()).type.not.toBeAssignableTo(); + + expect(Symbol('test')).type.not.toBeAssignableTo(); + + expect({ a: new Date() }).type.not.toBeAssignableTo(); + + expect(5 as number | undefined).type.not.toBeAssignableTo(); + }); + + test('rejects interfaces and types with non-JSON members', () => { + interface InterfaceWithOptionalProperty { + a?: number; + } + const interfaceWithOptionalProperty: InterfaceWithOptionalProperty = { + a: 0, + }; + expect(interfaceWithOptionalProperty).type.not.toBeAssignableTo(); + + interface InterfaceWithDate { + a: Date; + } + const interfaceWithDate: InterfaceWithDate = { a: new Date() }; + expect(interfaceWithDate).type.not.toBeAssignableTo(); + + interface InterfaceWithOptionalDate { + a?: Date; + } + const interfaceWithOptionalDate: InterfaceWithOptionalDate = { + a: new Date(), + }; + expect(interfaceWithOptionalDate).type.not.toBeAssignableTo(); + + interface InterfaceWithUndefinedTypeUnion { + a: number | undefined; + } + const interfaceWithUndefinedTypeUnion: InterfaceWithUndefinedTypeUnion = { + a: 0, + }; + expect(interfaceWithUndefinedTypeUnion).type.not.toBeAssignableTo(); + + interface InterfaceWithFunction { + a: () => number; + } + const interfaceWithFunction: InterfaceWithFunction = { a: () => 0 }; + expect(interfaceWithFunction).type.not.toBeAssignableTo(); + + type TypeWithDate = { + a: Date; + }; + const typeWithDate: TypeWithDate = { a: new Date() }; + expect(typeWithDate).type.not.toBeAssignableTo(); + + type TypeWithOptionalDate = { + a?: Date; + }; + const typeWithOptionalDate: TypeWithOptionalDate = { a: new Date() }; + expect(typeWithOptionalDate).type.not.toBeAssignableTo(); + + type TypeWithUndefinedTypeUnion = { + a: number | undefined; + }; + const typeWithUndefinedTypeUnion: TypeWithUndefinedTypeUnion = { + a: 0, + }; + expect(typeWithUndefinedTypeUnion).type.not.toBeAssignableTo(); + + type TypeWithFunction = { + a: () => number; + }; + const typeWithFunction: TypeWithFunction = { a: () => 0 }; + expect(typeWithFunction).type.not.toBeAssignableTo(); + + type TypeWithOptionalProperty = { + a?: number | undefined; + }; + const typeWithOptionalProperty: TypeWithOptionalProperty = { a: undefined }; + expect(typeWithOptionalProperty).type.not.toBeAssignableTo(); + }); + + test('has known edge cases', () => { + // The Json type doesn't protect against the `any` type. Passing `any` + // explicitly is the point of the test, so it must not be removed. + expect().type.toBeAssignableTo(); + + // The Json type gets confused by interfaces. This interface is valid Json, + // but it's incompatible with the Json type. + interface A { + a: number; + } + const a: A = { a: 0 }; + expect(a).type.not.toBeAssignableTo(); + + // The Json type gets confused by classes. This class instance is valid + // Json, but it's incompatible with the Json type. + class Foo { + a!: number; + } + const foo = new Foo(); + expect(foo).type.not.toBeAssignableTo(); + }); +}); + +describe('exactOptional', () => { + // eslint-disable-next-line @typescript-eslint/no-unused-vars -- Type-level test fixture; consumed via `typeof`. + const exactOptionalObject = object({ + a: number(), + b: optional(string()), + c: exactOptional(boolean()), + }); + + type ExactOptionalObject = Infer; + + test('distinguishes optional from exactOptional members', () => { + expect({ a: 0 }).type.toBeAssignableTo(); + expect({ a: 0, b: 'test' }).type.toBeAssignableTo(); + expect({ + a: 0, + b: 'test', + c: true, + }).type.toBeAssignableTo(); + expect({ + a: 0, + b: 'test', + c: 0, + }).type.not.toBeAssignableTo(); + expect({ + a: 0, + b: 'test', + c: undefined, + }).type.not.toBeAssignableTo(); + }); +}); diff --git a/merged-packages/utils/src/keyring.ts b/packages/utils/src/keyring.ts similarity index 100% rename from merged-packages/utils/src/keyring.ts rename to packages/utils/src/keyring.ts diff --git a/merged-packages/utils/src/logging.test.ts b/packages/utils/src/logging.test.ts similarity index 100% rename from merged-packages/utils/src/logging.test.ts rename to packages/utils/src/logging.test.ts diff --git a/merged-packages/utils/src/logging.ts b/packages/utils/src/logging.ts similarity index 100% rename from merged-packages/utils/src/logging.ts rename to packages/utils/src/logging.ts diff --git a/merged-packages/utils/src/misc.test.ts b/packages/utils/src/misc.test.ts similarity index 100% rename from merged-packages/utils/src/misc.test.ts rename to packages/utils/src/misc.test.ts diff --git a/merged-packages/utils/src/misc.ts b/packages/utils/src/misc.ts similarity index 100% rename from merged-packages/utils/src/misc.ts rename to packages/utils/src/misc.ts diff --git a/packages/utils/src/misc.tst.ts b/packages/utils/src/misc.tst.ts new file mode 100644 index 00000000000..db54f512d45 --- /dev/null +++ b/packages/utils/src/misc.tst.ts @@ -0,0 +1,208 @@ +import { describe, expect, test } from 'tstyche'; + +import type { PublicInterface, RuntimeObject } from './misc.js'; +import { isObject, hasProperty, getKnownPropertyNames } from './misc.js'; + +describe('PublicInterface', () => { + class ClassWithPrivateProperties { + // eslint-disable-next-line no-unused-private-class-members -- Type-level test fixture; never read at runtime. + readonly #foo: string; + + bar: string; + + constructor({ foo, bar }: { foo: string; bar: string }) { + this.#foo = foo; + this.bar = bar; + } + } + + test('does not require private properties', () => { + expect({ + bar: 'bar', + }).type.toBeAssignableTo>(); + }); + + test('still requires public properties', () => { + expect({}).type.not.toBeAssignableTo< + PublicInterface + >(); + }); +}); + +describe('isObject', () => { + test('narrows an unknown value to a runtime object', () => { + const unknownValue = {} as unknown; + + expect(unknownValue).type.not.toBeAssignableTo(); + + if (isObject(unknownValue)) { + expect(unknownValue).type.toBeAssignableTo(); + } + }); + + test('does not interfere with satisfaction of static type', () => { + const constObjectType = { foo: 'foo' } as const; + if (hasProperty(constObjectType, 'foo')) { + expect(constObjectType).type.toBeAssignableTo<{ foo: 'foo' }>(); + } + }); +}); + +describe('hasProperty', () => { + const unknownObject = {} as object; + + test('rejects objects that have not been proven to have the property', () => { + // Establish that `Object` is not accepted when a specific property is needed. + expect(unknownObject).type.not.toBeAssignableTo>(); + + // Establish that `RuntimeObject` is not accepted when a specific property is needed. + if (isObject(unknownObject)) { + expect(unknownObject).type.not.toBeAssignableTo>(); + } + }); + + test('accepts an object once the property is proven', () => { + if (isObject(unknownObject) && hasProperty(unknownObject, 'foo')) { + expect(unknownObject).type.toBeAssignableTo>(); + } + }); + + test('accepts an object once all required properties are proven', () => { + if ( + isObject(unknownObject) && + hasProperty(unknownObject, 'foo') && + hasProperty(unknownObject, 'bar') + ) { + expect(unknownObject).type.toBeAssignableTo< + Record<'foo' | 'bar', unknown> + >(); + } + }); + + test('rejects an object when only some required properties are proven', () => { + if (isObject(unknownObject) && hasProperty(unknownObject, 'foo')) { + expect(unknownObject).type.not.toBeAssignableTo< + Record<'foo' | 'bar', unknown> + >(); + } + }); + + test('does not interfere with satisfaction of non-overlapping types', () => { + const overlappingTypesExample = { foo: 'foo', baz: 'baz' }; + if (hasProperty(overlappingTypesExample, 'foo')) { + expect(overlappingTypesExample).type.toBeAssignableTo< + Record<'baz', unknown> + >(); + } + }); + + test('allows custom error properties once proven', () => { + const exampleErrorWithCode = new Error('test'); + // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore + exampleErrorWithCode.code = 999; + + // Establish that trying to check for a custom property on an error results in failure + expect(exampleErrorWithCode).type.not.toBeAssignableTo<{ code: any }>(); + + if (hasProperty(exampleErrorWithCode, 'code')) { + expect(exampleErrorWithCode.code).type.toBe(); + } + }); + + test('is compatible with interfaces and classes', () => { + // eslint-disable-next-line @typescript-eslint/consistent-type-definitions + interface HasPropertyInterfaceExample { + a: number; + } + const hasPropertyInterfaceExample: HasPropertyInterfaceExample = { a: 0 }; + hasProperty(hasPropertyInterfaceExample, 'a'); + + class HasPropertyClassExample { + a!: number; + } + const hasPropertyClassExample = new HasPropertyClassExample(); + hasProperty(hasPropertyClassExample, 'a'); + }); + + test('keeps the original type when defined', () => { + type HasPropertyTypeExample = { + a?: number; + }; + + const hasPropertyTypeExample: HasPropertyTypeExample = {}; + if (hasProperty(hasPropertyTypeExample, 'a')) { + expect(hasPropertyTypeExample.a).type.toBe(); + } + }); +}); + +describe('getKnownPropertyNames', () => { + enum GetKnownPropertyNamesEnumExample { + Foo = 'bar', + Baz = 'qux', + } + + test('returns the known keys of an enum', () => { + expect(getKnownPropertyNames(GetKnownPropertyNamesEnumExample)).type.toBe< + ('Foo' | 'Baz')[] + >(); + }); +}); + +describe('RuntimeObject', () => { + test('accepts valid runtime objects', () => { + expect({}).type.toBeAssignableTo(); + + expect({ foo: 'foo' }).type.toBeAssignableTo(); + + expect({ 0: 'foo' }).type.toBeAssignableTo(); + + expect({ [Symbol('foo')]: 'foo' }).type.toBeAssignableTo(); + }); + + test('rejects invalid runtime objects', () => { + expect(null).type.not.toBeAssignableTo(); + + expect(undefined).type.not.toBeAssignableTo(); + + expect('foo').type.not.toBeAssignableTo(); + + expect(0).type.not.toBeAssignableTo(); + + expect([]).type.not.toBeAssignableTo(); + + expect(new Date()).type.not.toBeAssignableTo(); + + expect(() => 0).type.not.toBeAssignableTo(); + + expect(new Set()).type.not.toBeAssignableTo(); + + expect(new Map()).type.not.toBeAssignableTo(); + + expect(Symbol('test')).type.not.toBeAssignableTo(); + }); + + test('gets confused by interfaces and classes', () => { + // The RuntimeObject type gets confused by interfaces. This interface is a + // valid object, but it's incompatible with the RuntimeObject type. + // eslint-disable-next-line @typescript-eslint/consistent-type-definitions + interface RuntimeObjectInterfaceExample { + a: number; + } + const runtimeObjectInterfaceExample: RuntimeObjectInterfaceExample = { + a: 0, + }; + expect( + runtimeObjectInterfaceExample, + ).type.not.toBeAssignableTo(); + + class RuntimeObjectClassExample { + a!: number; + } + const runtimeObjectClassExample = new RuntimeObjectClassExample(); + expect( + runtimeObjectClassExample, + ).type.not.toBeAssignableTo(); + }); +}); diff --git a/merged-packages/utils/src/mnemonic.test.ts b/packages/utils/src/mnemonic.test.ts similarity index 100% rename from merged-packages/utils/src/mnemonic.test.ts rename to packages/utils/src/mnemonic.test.ts diff --git a/merged-packages/utils/src/mnemonic.ts b/packages/utils/src/mnemonic.ts similarity index 100% rename from merged-packages/utils/src/mnemonic.ts rename to packages/utils/src/mnemonic.ts diff --git a/merged-packages/utils/src/node.test.ts b/packages/utils/src/node.test.ts similarity index 100% rename from merged-packages/utils/src/node.test.ts rename to packages/utils/src/node.test.ts diff --git a/merged-packages/utils/src/node.ts b/packages/utils/src/node.ts similarity index 100% rename from merged-packages/utils/src/node.ts rename to packages/utils/src/node.ts diff --git a/merged-packages/utils/src/number.test.ts b/packages/utils/src/number.test.ts similarity index 100% rename from merged-packages/utils/src/number.test.ts rename to packages/utils/src/number.test.ts diff --git a/merged-packages/utils/src/number.ts b/packages/utils/src/number.ts similarity index 100% rename from merged-packages/utils/src/number.ts rename to packages/utils/src/number.ts diff --git a/merged-packages/utils/src/opaque.ts b/packages/utils/src/opaque.ts similarity index 100% rename from merged-packages/utils/src/opaque.ts rename to packages/utils/src/opaque.ts diff --git a/merged-packages/utils/src/promise.test.ts b/packages/utils/src/promise.test.ts similarity index 100% rename from merged-packages/utils/src/promise.test.ts rename to packages/utils/src/promise.test.ts diff --git a/merged-packages/utils/src/promise.ts b/packages/utils/src/promise.ts similarity index 100% rename from merged-packages/utils/src/promise.ts rename to packages/utils/src/promise.ts diff --git a/merged-packages/utils/src/superstruct.test.ts b/packages/utils/src/superstruct.test.ts similarity index 100% rename from merged-packages/utils/src/superstruct.test.ts rename to packages/utils/src/superstruct.test.ts diff --git a/merged-packages/utils/src/superstruct.ts b/packages/utils/src/superstruct.ts similarity index 100% rename from merged-packages/utils/src/superstruct.ts rename to packages/utils/src/superstruct.ts diff --git a/merged-packages/utils/src/time.test.ts b/packages/utils/src/time.test.ts similarity index 100% rename from merged-packages/utils/src/time.test.ts rename to packages/utils/src/time.test.ts diff --git a/merged-packages/utils/src/time.ts b/packages/utils/src/time.ts similarity index 100% rename from merged-packages/utils/src/time.ts rename to packages/utils/src/time.ts diff --git a/merged-packages/utils/src/transaction-types.ts b/packages/utils/src/transaction-types.ts similarity index 100% rename from merged-packages/utils/src/transaction-types.ts rename to packages/utils/src/transaction-types.ts diff --git a/merged-packages/utils/src/unitsConversion.test.ts b/packages/utils/src/unitsConversion.test.ts similarity index 100% rename from merged-packages/utils/src/unitsConversion.test.ts rename to packages/utils/src/unitsConversion.test.ts diff --git a/merged-packages/utils/src/unitsConversion.ts b/packages/utils/src/unitsConversion.ts similarity index 100% rename from merged-packages/utils/src/unitsConversion.ts rename to packages/utils/src/unitsConversion.ts diff --git a/merged-packages/utils/src/versions.test.ts b/packages/utils/src/versions.test.ts similarity index 100% rename from merged-packages/utils/src/versions.test.ts rename to packages/utils/src/versions.test.ts diff --git a/merged-packages/utils/src/versions.ts b/packages/utils/src/versions.ts similarity index 100% rename from merged-packages/utils/src/versions.ts rename to packages/utils/src/versions.ts diff --git a/merged-packages/utils/tsconfig.build.json b/packages/utils/tsconfig.build.json similarity index 77% rename from merged-packages/utils/tsconfig.build.json rename to packages/utils/tsconfig.build.json index d9c9f1137c7..14c772f3803 100644 --- a/merged-packages/utils/tsconfig.build.json +++ b/packages/utils/tsconfig.build.json @@ -8,15 +8,15 @@ /** * `exclude` replaces rather than extends, so the entries from * `tsconfig.packages.build.json` are repeated here alongside the ones this - * package needs: `tsd` type tests, fixtures and mocks are not published. + * package needs: type tests, fixtures and mocks are not published. */ "exclude": [ "./jest.config.packages.ts", "**/*.test.ts", + "**/*.tst.ts", "**/jest.config.ts", "./src/**/__fixtures__/**/*", "./src/**/__mocks__/**/*", - "./src/**/__snapshots__/**/*", - "./src/**/*.test-d.ts" + "./src/**/__snapshots__/**/*" ] } diff --git a/merged-packages/utils/tsconfig.json b/packages/utils/tsconfig.json similarity index 100% rename from merged-packages/utils/tsconfig.json rename to packages/utils/tsconfig.json diff --git a/packages/utils/tsconfig.lint.json b/packages/utils/tsconfig.lint.json new file mode 100644 index 00000000000..378ed1dce55 --- /dev/null +++ b/packages/utils/tsconfig.lint.json @@ -0,0 +1,7 @@ +{ + "extends": ["./tsconfig.json", "../../tsconfig.packages.lint.json"], + "compilerOptions": { + "outDir": "./.tsc-lint-cache", + "tsBuildInfoFile": "./.tsc-lint-cache/tsconfig.tsbuildinfo" + } +} diff --git a/merged-packages/utils/typedoc.json b/packages/utils/typedoc.json similarity index 100% rename from merged-packages/utils/typedoc.json rename to packages/utils/typedoc.json diff --git a/packages/wallet-cli/tsconfig.build.json b/packages/wallet-cli/tsconfig.build.json index 8725c1a7269..d592a7d8614 100644 --- a/packages/wallet-cli/tsconfig.build.json +++ b/packages/wallet-cli/tsconfig.build.json @@ -28,6 +28,9 @@ }, { "path": "../foundryup/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/wallet-cli/tsconfig.json b/packages/wallet-cli/tsconfig.json index 1565df5a34d..a08470b04e9 100644 --- a/packages/wallet-cli/tsconfig.json +++ b/packages/wallet-cli/tsconfig.json @@ -24,6 +24,9 @@ }, { "path": "../foundryup" + }, + { + "path": "../utils" } ], "include": ["../../types", "./bin", "./src", "./tests"] diff --git a/packages/wallet-framework-docs/tsconfig.build.json b/packages/wallet-framework-docs/tsconfig.build.json index 6db76700e55..b036d7f3548 100644 --- a/packages/wallet-framework-docs/tsconfig.build.json +++ b/packages/wallet-framework-docs/tsconfig.build.json @@ -13,6 +13,9 @@ }, { "path": "../messenger/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/wallet-framework-docs/tsconfig.json b/packages/wallet-framework-docs/tsconfig.json index 9eccdaafbac..a8e41f6a058 100644 --- a/packages/wallet-framework-docs/tsconfig.json +++ b/packages/wallet-framework-docs/tsconfig.json @@ -9,6 +9,9 @@ }, { "path": "../messenger" + }, + { + "path": "../utils" } ], "include": ["../../types", "./content", "./site"] diff --git a/packages/wallet/tsconfig.build.json b/packages/wallet/tsconfig.build.json index 9cf2b3d94f4..5e4b9b749b0 100644 --- a/packages/wallet/tsconfig.build.json +++ b/packages/wallet/tsconfig.build.json @@ -61,6 +61,9 @@ }, { "path": "../transaction-controller/tsconfig.build.json" + }, + { + "path": "../utils/tsconfig.build.json" } ], "include": ["../../types", "./src"] diff --git a/packages/wallet/tsconfig.json b/packages/wallet/tsconfig.json index e829e43ea4d..446a21966df 100644 --- a/packages/wallet/tsconfig.json +++ b/packages/wallet/tsconfig.json @@ -57,6 +57,9 @@ }, { "path": "../transaction-controller" + }, + { + "path": "../utils" } ], "include": ["../../types", "./src"] diff --git a/teams.json b/teams.json index f1582a37562..1a2a17e6197 100644 --- a/teams.json +++ b/teams.json @@ -45,6 +45,7 @@ "metamask/client-controller": "team-core-platform,team-extension-platform,team-mobile-platform", "metamask/base-controller": "team-core-platform", "metamask/base-data-service": "team-core-platform", + "metamask/utils": "team-core-platform", "metamask/build-utils": "team-core-platform", "metamask/composable-controller": "team-core-platform", "metamask/connectivity-controller": "team-core-platform", diff --git a/tsconfig.build.json b/tsconfig.build.json index f0ab91b2cb4..27802e2ae04 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -298,6 +298,9 @@ { "path": "./packages/user-operation-controller/tsconfig.build.json" }, + { + "path": "./packages/utils/tsconfig.build.json" + }, { "path": "./packages/wallet-cli/tsconfig.build.json" }, diff --git a/tsconfig.json b/tsconfig.json index 737d5fcf4dd..a346de13d01 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -5,7 +5,11 @@ */ "extends": "./tsconfig.base.json", "compilerOptions": { - "noEmit": true + "noEmit": true, + "paths": { + "@metamask/utils/node": ["./packages/utils/src/node.ts"], + "@metamask/utils": ["./packages/utils/src/index.ts"] + } }, "references": [ { @@ -299,6 +303,9 @@ { "path": "./packages/user-operation-controller" }, + { + "path": "./packages/utils" + }, { "path": "./packages/wallet" }, diff --git a/tsconfig.lint.json b/tsconfig.lint.json index b50466e6689..ed40605f06c 100644 --- a/tsconfig.lint.json +++ b/tsconfig.lint.json @@ -55,6 +55,9 @@ }, { "path": "./packages/storage-service/tsconfig.lint.json" + }, + { + "path": "./packages/utils/tsconfig.lint.json" } ] } diff --git a/tsconfig.packages.json b/tsconfig.packages.json index 69ead292d7f..841b367e445 100644 --- a/tsconfig.packages.json +++ b/tsconfig.packages.json @@ -21,6 +21,19 @@ "@metamask/profile-sync-controller/user-storage": [ "${configDir}../profile-sync-controller/src/controllers/user-storage/index.ts" ], + /** + * `@metamask/utils` now lives in this repo, which means the `@metamask/*` + * entry below would resolve it to its source. Its dependents still declare + * the published version though, so they are pointed back at that copy + * until the follow up PR bumps them. Removing these two entries is what + * switches them over. + */ + "@metamask/utils/node": [ + "${configDir}/../../node_modules/@metamask/utils/dist/node.d.ts" + ], + "@metamask/utils": [ + "${configDir}/../../node_modules/@metamask/utils/dist/index.d.ts" + ], "@metamask/*": ["${configDir}/../*/src/index.ts"] } } diff --git a/yarn.config.cjs b/yarn.config.cjs index cbc35380295..48d3806cc44 100644 --- a/yarn.config.cjs +++ b/yarn.config.cjs @@ -10,7 +10,6 @@ // format, but also check the presence of certain files as well. /** @type {import('@yarnpkg/types')} */ -const { hasProperty } = require('@metamask/utils'); const { defineConfig } = require('@yarnpkg/types'); const { readFile } = require('fs/promises'); const { get } = require('lodash'); @@ -23,7 +22,12 @@ const { inspect } = require('util'); * Only intended as temporary measures to faciliate upgrades and releases. * This should trend towards empty. */ -const ALLOWED_INCONSISTENT_DEPENDENCIES = {}; +const ALLOWED_INCONSISTENT_DEPENDENCIES = { + // `@metamask/utils` has just moved into this repo at v12, but its dependents + // are still on the published v11. The bump happens in the follow up PR, which + // removes this entry again. + '@metamask/utils': ['^11.12.0'], +}; /** * These packages are allowed as peer dependencies without requiring installation as @@ -81,7 +85,7 @@ module.exports = defineConfig({ const workspaceBasename = getWorkspaceBasename(workspace); const isChildWorkspace = workspace.cwd !== '.'; const isPrivate = - hasProperty(workspace.manifest, 'private') && + Object.hasOwn(workspace.manifest, 'private') && workspace.manifest.private === true; const dependenciesByIdentAndType = getDependenciesByIdentAndType( Yarn.dependencies({ workspace }), @@ -423,7 +427,7 @@ async function workspaceFileExists(workspace, path) { try { await getWorkspaceFile(workspace, path); } catch (error) { - if (hasProperty(error, 'code') && error.code === 'ENOENT') { + if (Object.hasOwn(error, 'code') && error.code === 'ENOENT') { return false; } throw error; diff --git a/yarn.lock b/yarn.lock index 43f86c63a0c..e57a7ec0a66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -73,7 +73,7 @@ __metadata: languageName: node linkType: hard -"@adraffy/ens-normalize@npm:^1.11.0": +"@adraffy/ens-normalize@npm:^1.11.0, @adraffy/ens-normalize@npm:^1.8.8": version: 1.11.1 resolution: "@adraffy/ens-normalize@npm:1.11.1" checksum: 10/dd19274d9fcaf99bf08a62b64e54f4748de11b235767addbd3f7385ae1b7777bd704d17ff003ffaa3295a0b9d035929381cf3b38329c96260bff96aab8ad7b37 @@ -5692,7 +5692,6 @@ __metadata: "@metamask/base-controller": "npm:^10.0.0" "@metamask/messenger": "npm:^3.0.0" "@metamask/superstruct": "npm:^3.4.1" - "@metamask/utils": "npm:^11.12.0" "@types/jest": "npm:^30.0.0" "@typescript/native": "npm:typescript@^7.0.2" deepmerge: "npm:^4.2.2" @@ -6379,7 +6378,6 @@ __metadata: "@metamask/controller-utils": "npm:^13.0.0" "@metamask/messenger": "npm:^3.0.0" "@metamask/superstruct": "npm:^3.4.1" - "@metamask/utils": "npm:^11.12.0" "@types/jest": "npm:^30.0.0" "@typescript/native": "npm:typescript@^7.0.2" deepmerge: "npm:^4.2.2" @@ -7805,7 +7803,6 @@ __metadata: resolution: "@metamask/messenger@workspace:packages/messenger" dependencies: "@metamask/auto-changelog": "npm:^6.1.0" - "@metamask/utils": "npm:^11.12.0" "@types/jest": "npm:^30.0.0" "@typescript/native": "npm:typescript@^7.0.2" deepmerge: "npm:^4.2.2" @@ -8582,7 +8579,6 @@ __metadata: "@metamask/auto-changelog": "npm:^6.1.0" "@metamask/base-controller": "npm:^10.0.0" "@metamask/messenger": "npm:^3.0.0" - "@metamask/utils": "npm:^11.12.0" "@types/jest": "npm:^30.0.0" "@typescript/native": "npm:typescript@^7.0.2" deepmerge: "npm:^4.2.2" @@ -9507,8 +9503,8 @@ __metadata: linkType: soft "@metamask/utils@npm:^11.0.1, @metamask/utils@npm:^11.10.0, @metamask/utils@npm:^11.11.0, @metamask/utils@npm:^11.12.0, @metamask/utils@npm:^11.4.0, @metamask/utils@npm:^11.4.2, @metamask/utils@npm:^11.8.1, @metamask/utils@npm:^11.9.0": - version: 11.12.0 - resolution: "@metamask/utils@npm:11.12.0" + version: 11.12.1 + resolution: "@metamask/utils@npm:11.12.1" dependencies: "@ethereumjs/tx": "npm:^4.2.0" "@metamask/scure-bip39": "npm:^2.0.3" @@ -9522,7 +9518,7 @@ __metadata: pony-cause: "npm:^2.1.10" semver: "npm:^7.5.4" uuid: "npm:^9.0.1" - checksum: 10/91b21f92858e96499d780ac408b2a6e99aadde9eb566f7413b425f0583aa746d7bfcd7bf4310578723939aa940d3724e91761e68d1db49caac233f533f108052 + checksum: 10/2d91b1d5338929f7a7c0e272ea564426d229e4d5bc33f7b124043245b3d14afb0f01ca15fcee70c434fa1cd537eb82c537ea575489a8672a10ea3da6ae74da81 languageName: node linkType: hard @@ -9543,6 +9539,42 @@ __metadata: languageName: node linkType: hard +"@metamask/utils@workspace:packages/utils": + version: 0.0.0-use.local + resolution: "@metamask/utils@workspace:packages/utils" + dependencies: + "@ethereumjs/tx": "npm:^5.4.0" + "@metamask/auto-changelog": "npm:^6.1.0" + "@metamask/scure-bip39": "npm:^2.1.1" + "@metamask/superstruct": "npm:^3.4.1" + "@noble/hashes": "npm:^1.8.0" + "@scure/base": "npm:^1.2.6" + "@types/debug": "npm:^4.1.7" + "@types/jest": "npm:^30.0.0" + "@types/jest-when": "npm:^3.5.3" + "@types/lodash": "npm:^4.17.20" + "@types/uuid": "npm:^9.0.8" + "@typescript/native": "npm:typescript@^7.0.2" + debug: "npm:^4.3.4" + deepmerge: "npm:^4.2.2" + jest: "npm:^30.4.2" + jest-when: "npm:^3.7.0" + lodash: "npm:^4.17.21" + pony-cause: "npm:^2.1.10" + rimraf: "npm:^5.0.5" + semver: "npm:^7.6.3" + stdio-mock: "npm:^1.2.0" + ts-jest: "npm:^29.4.11" + tstyche: "npm:^7.2.3" + tsx: "npm:^4.20.5" + typedoc: "npm:^0.25.13" + typedoc-plugin-missing-exports: "npm:^2.0.0" + typescript: "npm:@typescript/typescript6@^6.0.2" + uuid: "npm:^9.0.1" + web3: "npm:^4.16.0" + languageName: unknown + linkType: soft + "@metamask/wallet-cli@workspace:packages/wallet-cli": version: 0.0.0-use.local resolution: "@metamask/wallet-cli@workspace:packages/wallet-cli" @@ -12370,6 +12402,15 @@ __metadata: languageName: node linkType: hard +"@types/ws@npm:8.5.3": + version: 8.5.3 + resolution: "@types/ws@npm:8.5.3" + dependencies: + "@types/node": "npm:*" + checksum: 10/08aac698ce6480b532d8311f790a8744ae489ccdd98f374cfe4b8245855439825c64b031abcbba4f30fb280da6cc2b02a4e261e16341d058ffaeecaa24ba2bd3 + languageName: node + linkType: hard + "@types/ws@npm:^8.5.10": version: 8.18.1 resolution: "@types/ws@npm:8.18.1" @@ -13684,6 +13725,19 @@ __metadata: languageName: node linkType: hard +"abitype@npm:0.7.1": + version: 0.7.1 + resolution: "abitype@npm:0.7.1" + peerDependencies: + typescript: ">=4.9.4" + zod: ^3 >=3.19.1 + peerDependenciesMeta: + zod: + optional: true + checksum: 10/deee4a18c9c7218ab2e5e57e07e4cb3e2f3e785657be364d098ab0587cd552c4fbb41e1bdddbc6fa52387f51ebd181461fe70a13127cc77091655775fdfb18fe + languageName: node + linkType: hard + "abitype@npm:1.2.3": version: 1.2.3 resolution: "abitype@npm:1.2.3" @@ -14194,6 +14248,15 @@ __metadata: languageName: node linkType: hard +"available-typed-arrays@npm:^1.0.7": + version: 1.0.7 + resolution: "available-typed-arrays@npm:1.0.7" + dependencies: + possible-typed-array-names: "npm:^1.0.0" + checksum: 10/6c9da3a66caddd83c875010a1ca8ef11eac02ba15fb592dc9418b2b5e7b77b645fa7729380a92d9835c2f05f2ca1b6251f39b993e0feb3f1517c74fa1af02cab + languageName: node + linkType: hard + "axios@npm:^1.7.4": version: 1.7.5 resolution: "axios@npm:1.7.5" @@ -14927,7 +14990,7 @@ __metadata: languageName: node linkType: hard -"call-bind@npm:^1.0.8": +"call-bind@npm:^1.0.8, call-bind@npm:^1.0.9": version: 1.0.9 resolution: "call-bind@npm:1.0.9" dependencies: @@ -14939,7 +15002,7 @@ __metadata: languageName: node linkType: hard -"call-bound@npm:^1.0.2, call-bound@npm:^1.0.3": +"call-bound@npm:^1.0.2, call-bound@npm:^1.0.3, call-bound@npm:^1.0.4": version: 1.0.4 resolution: "call-bound@npm:1.0.4" dependencies: @@ -15803,7 +15866,7 @@ __metadata: languageName: node linkType: hard -"crc-32@npm:^1.2.0": +"crc-32@npm:^1.2.0, crc-32@npm:^1.2.2": version: 1.2.2 resolution: "crc-32@npm:1.2.2" bin: @@ -15848,6 +15911,15 @@ __metadata: languageName: node linkType: hard +"cross-fetch@npm:^4.0.0": + version: 4.1.0 + resolution: "cross-fetch@npm:4.1.0" + dependencies: + node-fetch: "npm:^2.7.0" + checksum: 10/07624940607b64777d27ec9c668ddb6649e8c59ee0a5a10e63a51ce857e2bbb1294a45854a31c10eccb91b65909a5b199fcb0217339b44156f85900a7384f489 + languageName: node + linkType: hard + "cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.3, cross-spawn@npm:^7.0.6": version: 7.0.6 resolution: "cross-spawn@npm:7.0.6" @@ -17553,6 +17625,13 @@ __metadata: languageName: node linkType: hard +"eventemitter3@npm:^5.0.1": + version: 5.0.4 + resolution: "eventemitter3@npm:5.0.4" + checksum: 10/54f5c8c543650d65f92d03dbef1bb73a682a920490c44699ad8f863a6b19bbca42fb7409aa09ca09cb98a44149d9a7bc1dffd55ca88a740bd928c7be0ad666a0 + languageName: node + linkType: hard + "events@npm:^3.2.0, events@npm:^3.3.0": version: 3.3.0 resolution: "events@npm:3.3.0" @@ -18094,6 +18173,15 @@ __metadata: languageName: node linkType: hard +"for-each@npm:^0.3.5": + version: 0.3.5 + resolution: "for-each@npm:0.3.5" + dependencies: + is-callable: "npm:^1.2.7" + checksum: 10/330cc2439f85c94f4609de3ee1d32c5693ae15cdd7fe3d112c4fd9efd4ce7143f2c64ef6c2c9e0cfdb0058437f33ef05b5bdae5b98fcc903fb2143fbaf0fea0f + languageName: node + linkType: hard + "foreach@npm:^2.0.4": version: 2.0.6 resolution: "foreach@npm:2.0.6" @@ -18642,13 +18730,22 @@ __metadata: languageName: node linkType: hard -"has-symbols@npm:^1.1.0": +"has-symbols@npm:^1.0.3, has-symbols@npm:^1.1.0": version: 1.1.0 resolution: "has-symbols@npm:1.1.0" checksum: 10/959385c98696ebbca51e7534e0dc723ada325efa3475350951363cce216d27373e0259b63edb599f72eb94d6cde8577b4b2375f080b303947e560f85692834fa languageName: node linkType: hard +"has-tostringtag@npm:^1.0.2": + version: 1.0.2 + resolution: "has-tostringtag@npm:1.0.2" + dependencies: + has-symbols: "npm:^1.0.3" + checksum: 10/c74c5f5ceee3c8a5b8bc37719840dc3749f5b0306d818974141dda2471a1a2ca6c8e46b9d6ac222c5345df7a901c9b6f350b1e6d62763fec877e26609a401bfe + languageName: node + linkType: hard + "has-yarn@npm:^3.0.0": version: 3.0.0 resolution: "has-yarn@npm:3.0.0" @@ -19427,6 +19524,16 @@ __metadata: languageName: node linkType: hard +"is-arguments@npm:^1.0.4": + version: 1.2.0 + resolution: "is-arguments@npm:1.2.0" + dependencies: + call-bound: "npm:^1.0.2" + has-tostringtag: "npm:^1.0.2" + checksum: 10/471a8ef631b8ee8829c43a8ab05c081700c0e25180c73d19f3bf819c1a8448c426a9e8e601f278973eca68966384b16ceb78b8c63af795b099cd199ea5afc457 + languageName: node + linkType: hard + "is-arrayish@npm:^0.2.1": version: 0.2.1 resolution: "is-arrayish@npm:0.2.1" @@ -19452,6 +19559,13 @@ __metadata: languageName: node linkType: hard +"is-callable@npm:^1.2.7": + version: 1.2.7 + resolution: "is-callable@npm:1.2.7" + checksum: 10/48a9297fb92c99e9df48706241a189da362bff3003354aea4048bd5f7b2eb0d823cd16d0a383cece3d76166ba16d85d9659165ac6fcce1ac12e6c649d66dbdb9 + languageName: node + linkType: hard + "is-ci@npm:^2.0.0": version: 2.0.0 resolution: "is-ci@npm:2.0.0" @@ -19550,6 +19664,19 @@ __metadata: languageName: node linkType: hard +"is-generator-function@npm:^1.0.7": + version: 1.1.2 + resolution: "is-generator-function@npm:1.1.2" + dependencies: + call-bound: "npm:^1.0.4" + generator-function: "npm:^2.0.0" + get-proto: "npm:^1.0.1" + has-tostringtag: "npm:^1.0.2" + safe-regex-test: "npm:^1.1.0" + checksum: 10/cc50fa01034356bdfda26983c5457103240f201f4663c0de1257802714e40d36bcff7aee21091d37bbba4be962fa5c6475ce7ddbc0abfa86d6bef466e41e50a5 + 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": version: 4.0.3 resolution: "is-glob@npm:4.0.3" @@ -19673,6 +19800,18 @@ __metadata: languageName: node linkType: hard +"is-regex@npm:^1.2.1": + version: 1.2.1 + resolution: "is-regex@npm:1.2.1" + dependencies: + call-bound: "npm:^1.0.2" + gopd: "npm:^1.2.0" + has-tostringtag: "npm:^1.0.2" + hasown: "npm:^2.0.2" + checksum: 10/c42b7efc5868a5c9a4d8e6d3e9816e8815c611b09535c00fead18a1138455c5cb5e1887f0023a467ad3f9c419d62ba4dc3d9ba8bafe55053914d6d6454a945d2 + languageName: node + linkType: hard + "is-regexp@npm:^1.0.0": version: 1.0.0 resolution: "is-regexp@npm:1.0.0" @@ -19703,6 +19842,15 @@ __metadata: languageName: node linkType: hard +"is-typed-array@npm:^1.1.3": + version: 1.1.15 + resolution: "is-typed-array@npm:1.1.15" + dependencies: + which-typed-array: "npm:^1.1.16" + checksum: 10/e8cf60b9ea85667097a6ad68c209c9722cfe8c8edf04d6218366469e51944c5cc25bae45ffb845c23f811d262e4314d3b0168748eb16711aa34d12724cdf0735 + languageName: node + linkType: hard + "is-typedarray@npm:^1.0.0": version: 1.0.0 resolution: "is-typedarray@npm:1.0.0" @@ -19794,6 +19942,15 @@ __metadata: languageName: node linkType: hard +"isomorphic-ws@npm:^5.0.0": + version: 5.0.0 + resolution: "isomorphic-ws@npm:5.0.0" + peerDependencies: + ws: "*" + checksum: 10/e20eb2aee09ba96247465fda40c6d22c1153394c0144fa34fe6609f341af4c8c564f60ea3ba762335a7a9c306809349f9b863c8beedf2beea09b299834ad5398 + languageName: node + linkType: hard + "isows@npm:1.0.7": version: 1.0.7 resolution: "isows@npm:1.0.7" @@ -23501,6 +23658,13 @@ __metadata: languageName: node linkType: hard +"possible-typed-array-names@npm:^1.0.0": + version: 1.1.0 + resolution: "possible-typed-array-names@npm:1.1.0" + checksum: 10/2f44137b8d3dd35f4a7ba7469eec1cd9cfbb46ec164b93a5bc1f4c3d68599c9910ee3b91da1d28b4560e9cc8414c3cd56fedc07259c67e52cc774476270d3302 + languageName: node + linkType: hard + "postcss-attribute-case-insensitive@npm:^7.0.1": version: 7.0.1 resolution: "postcss-attribute-case-insensitive@npm:7.0.1" @@ -25516,6 +25680,17 @@ __metadata: languageName: node linkType: hard +"safe-regex-test@npm:^1.1.0": + version: 1.1.0 + resolution: "safe-regex-test@npm:1.1.0" + dependencies: + call-bound: "npm:^1.0.2" + es-errors: "npm:^1.3.0" + is-regex: "npm:^1.2.1" + checksum: 10/ebdb61f305bf4756a5b023ad86067df5a11b26898573afe9e52a548a63c3bd594825d9b0e2dde2eb3c94e57e0e04ac9929d4107c394f7b8e56a4613bed46c69a + languageName: node + linkType: hard + "safe-stable-stringify@npm:^2.4.3": version: 2.5.0 resolution: "safe-stable-stringify@npm:2.5.0" @@ -26302,6 +26477,13 @@ __metadata: languageName: node linkType: hard +"stdio-mock@npm:^1.2.0": + version: 1.2.0 + resolution: "stdio-mock@npm:1.2.0" + checksum: 10/aedec703d7a252fd9292b2f8043b9d29032767e10f2d7ab83f80596148c439d80901612bc6c983481c38b8cef224ec680c0d3bb485805764a079065f73800e48 + languageName: node + linkType: hard + "streamx@npm:^2.15.0": version: 2.19.0 resolution: "streamx@npm:2.19.0" @@ -27638,6 +27820,19 @@ __metadata: languageName: node linkType: hard +"util@npm:^0.12.5": + version: 0.12.5 + resolution: "util@npm:0.12.5" + dependencies: + inherits: "npm:^2.0.3" + is-arguments: "npm:^1.0.4" + is-generator-function: "npm:^1.0.7" + is-typed-array: "npm:^1.1.3" + which-typed-array: "npm:^1.1.2" + checksum: 10/61a10de7753353dd4d744c917f74cdd7d21b8b46379c1e48e1c4fd8e83f8190e6bd9978fc4e5102ab6a10ebda6019d1b36572fa4a325e175ec8b789a121f6147 + languageName: node + linkType: hard + "utila@npm:~0.4": version: 0.4.0 resolution: "utila@npm:0.4.0" @@ -27854,6 +28049,273 @@ __metadata: languageName: node linkType: hard +"web3-core@npm:^4.4.0, web3-core@npm:^4.5.0, web3-core@npm:^4.6.0, web3-core@npm:^4.7.1": + version: 4.7.1 + resolution: "web3-core@npm:4.7.1" + dependencies: + web3-errors: "npm:^1.3.1" + web3-eth-accounts: "npm:^4.3.1" + web3-eth-iban: "npm:^4.0.7" + web3-providers-http: "npm:^4.2.0" + web3-providers-ipc: "npm:^4.0.7" + web3-providers-ws: "npm:^4.0.8" + web3-types: "npm:^1.10.0" + web3-utils: "npm:^4.3.3" + web3-validator: "npm:^2.0.6" + dependenciesMeta: + web3-providers-ipc: + optional: true + checksum: 10/c6b9447e62f5c57ccc3c96492adf5630cb3256968c15ce5675c660dec1f6da0bf60397efa88588029640f749ff45a1adaa0167a402ba0b4a46e600d8eda76334 + languageName: node + linkType: hard + +"web3-errors@npm:^1.1.3, web3-errors@npm:^1.2.0, web3-errors@npm:^1.3.0, web3-errors@npm:^1.3.1": + version: 1.3.1 + resolution: "web3-errors@npm:1.3.1" + dependencies: + web3-types: "npm:^1.10.0" + checksum: 10/0d1cb0e02701a4bd619f856b0a6702fdd4cdc0a434029c3c3dcde3f3cc4acaca418117ad10238002aa697745840e7fd312bd43ad5341482b3ff8f9e6eb438a31 + languageName: node + linkType: hard + +"web3-eth-abi@npm:^4.4.1": + version: 4.4.1 + resolution: "web3-eth-abi@npm:4.4.1" + dependencies: + abitype: "npm:0.7.1" + web3-errors: "npm:^1.3.1" + web3-types: "npm:^1.10.0" + web3-utils: "npm:^4.3.3" + web3-validator: "npm:^2.0.6" + checksum: 10/0c7f4f9f05f04e0ac98f6029edfb3bf7e514efc325f6be83e999203f49c7a0cdc9759f4b1011ce12d80c2044c74a867f7fc0ee83538408c2ebb4c9f407027b7f + languageName: node + linkType: hard + +"web3-eth-accounts@npm:^4.3.1": + version: 4.3.1 + resolution: "web3-eth-accounts@npm:4.3.1" + dependencies: + "@ethereumjs/rlp": "npm:^4.0.1" + crc-32: "npm:^1.2.2" + ethereum-cryptography: "npm:^2.0.0" + web3-errors: "npm:^1.3.1" + web3-types: "npm:^1.10.0" + web3-utils: "npm:^4.3.3" + web3-validator: "npm:^2.0.6" + checksum: 10/f8b689146c908d88b983bd467c3e794ed96e284490aa3f74e665580202db4f0826d4108f0aa95dc6ef1e14f9a8a41939ff2c4485e9713744dc6474d7082d9239 + languageName: node + linkType: hard + +"web3-eth-contract@npm:^4.5.0, web3-eth-contract@npm:^4.7.2": + version: 4.7.2 + resolution: "web3-eth-contract@npm:4.7.2" + dependencies: + "@ethereumjs/rlp": "npm:^5.0.2" + web3-core: "npm:^4.7.1" + web3-errors: "npm:^1.3.1" + web3-eth: "npm:^4.11.1" + web3-eth-abi: "npm:^4.4.1" + web3-types: "npm:^1.10.0" + web3-utils: "npm:^4.3.3" + web3-validator: "npm:^2.0.6" + checksum: 10/f5dd22199a69c6f10b0c38daee790341f80247a0155bad03e7c1a9ffad2d6c47722010b4fd0e3fe7832a43eb72a2fceadfd2892712ef199898c1e43067a92c0d + languageName: node + linkType: hard + +"web3-eth-ens@npm:^4.4.0": + version: 4.4.0 + resolution: "web3-eth-ens@npm:4.4.0" + dependencies: + "@adraffy/ens-normalize": "npm:^1.8.8" + web3-core: "npm:^4.5.0" + web3-errors: "npm:^1.2.0" + web3-eth: "npm:^4.8.0" + web3-eth-contract: "npm:^4.5.0" + web3-net: "npm:^4.1.0" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.0" + web3-validator: "npm:^2.0.6" + checksum: 10/25a1535e095d8ffcbc0641041af69e42aa60ba2989477108a5678c42a06135df9134ccc6024c89c216cb3408848e3905ee178d5b12e3bb740e895ee6ee0bd2cf + languageName: node + linkType: hard + +"web3-eth-iban@npm:^4.0.7": + version: 4.0.7 + resolution: "web3-eth-iban@npm:4.0.7" + dependencies: + web3-errors: "npm:^1.1.3" + web3-types: "npm:^1.3.0" + web3-utils: "npm:^4.0.7" + web3-validator: "npm:^2.0.3" + checksum: 10/9d7521b4d4aef3a0d697905c7859d8e4d7ce82234320beecba9b24d254592a7ccf0354f329289b4e11a816fcbe3eceb842c4c87678f5e8ec622c8351bc1b9170 + languageName: node + linkType: hard + +"web3-eth-personal@npm:^4.1.0": + version: 4.1.0 + resolution: "web3-eth-personal@npm:4.1.0" + dependencies: + web3-core: "npm:^4.6.0" + web3-eth: "npm:^4.9.0" + web3-rpc-methods: "npm:^1.3.0" + web3-types: "npm:^1.8.0" + web3-utils: "npm:^4.3.1" + web3-validator: "npm:^2.0.6" + checksum: 10/a560b0ef1f28961101c47824aa6fc71722c4e581ef5ffc5b68cf1b7db0fd5804032239f872a167a589b3c0ebe223353b8112b38e247e1f5b5ac48991e12f853c + languageName: node + linkType: hard + +"web3-eth@npm:^4.11.1, web3-eth@npm:^4.8.0, web3-eth@npm:^4.9.0": + version: 4.11.1 + resolution: "web3-eth@npm:4.11.1" + dependencies: + setimmediate: "npm:^1.0.5" + web3-core: "npm:^4.7.1" + web3-errors: "npm:^1.3.1" + web3-eth-abi: "npm:^4.4.1" + web3-eth-accounts: "npm:^4.3.1" + web3-net: "npm:^4.1.0" + web3-providers-ws: "npm:^4.0.8" + web3-rpc-methods: "npm:^1.3.0" + web3-types: "npm:^1.10.0" + web3-utils: "npm:^4.3.3" + web3-validator: "npm:^2.0.6" + checksum: 10/b39f5f1559a012ece0017f3976207ffb5358c4ebb2e8518721efcc4975005ed8948814613795d1ceee67eb28f33608cbc89f6b231534241052de231c6477ed17 + languageName: node + linkType: hard + +"web3-net@npm:^4.1.0": + version: 4.1.0 + resolution: "web3-net@npm:4.1.0" + dependencies: + web3-core: "npm:^4.4.0" + web3-rpc-methods: "npm:^1.3.0" + web3-types: "npm:^1.6.0" + web3-utils: "npm:^4.3.0" + checksum: 10/2899ed28d9afda9f9faee6424752cb967dabf79128bce25321318e069a41571b9bd9477b480f290fd65f07cd6c0c641def0d72f31a730705112bd14c301f4e5e + languageName: node + linkType: hard + +"web3-providers-http@npm:^4.2.0": + version: 4.2.0 + resolution: "web3-providers-http@npm:4.2.0" + dependencies: + cross-fetch: "npm:^4.0.0" + web3-errors: "npm:^1.3.0" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.1" + checksum: 10/812b05d1e0dd8b6c5005bdcfe3c5fbddfe6cdd082bd2654dfe171ad98c3b7ff85b0bab371c70366d2bace2cf45fbf7d2f087b4cb281dbfa12372b902b8138eeb + languageName: node + linkType: hard + +"web3-providers-ipc@npm:^4.0.7": + version: 4.0.7 + resolution: "web3-providers-ipc@npm:4.0.7" + dependencies: + web3-errors: "npm:^1.1.3" + web3-types: "npm:^1.3.0" + web3-utils: "npm:^4.0.7" + checksum: 10/b953818479f5d9c7b748e10977430fd7e377696f9160ae19b1917c0317e89671c4be824c06723b6fda190258927160fcec0e8e7c1aa87a5f0344008ef7649cda + languageName: node + linkType: hard + +"web3-providers-ws@npm:^4.0.8": + version: 4.0.8 + resolution: "web3-providers-ws@npm:4.0.8" + dependencies: + "@types/ws": "npm:8.5.3" + isomorphic-ws: "npm:^5.0.0" + web3-errors: "npm:^1.2.0" + web3-types: "npm:^1.7.0" + web3-utils: "npm:^4.3.1" + ws: "npm:^8.17.1" + checksum: 10/9b9fa96fa1fc9455fb1b632de50f542d2589710002ea2cb0cd6a5c1ed9f72960d80ce219ac66b038ea6d0a767056fe653aa258a1c084aa78d5745870cc2703b4 + languageName: node + linkType: hard + +"web3-rpc-methods@npm:^1.3.0": + version: 1.3.0 + resolution: "web3-rpc-methods@npm:1.3.0" + dependencies: + web3-core: "npm:^4.4.0" + web3-types: "npm:^1.6.0" + web3-validator: "npm:^2.0.6" + checksum: 10/8c134b1f2ae1cf94d5c452c53fe699d5951c22c62ea82084559db06722a5f0db2047be4209172ff90432c42f70cf8081fea0ea85a024e4cbcd0e037efd9acfa8 + languageName: node + linkType: hard + +"web3-rpc-providers@npm:^1.0.0-rc.4": + version: 1.0.0-rc.4 + resolution: "web3-rpc-providers@npm:1.0.0-rc.4" + dependencies: + web3-errors: "npm:^1.3.1" + web3-providers-http: "npm:^4.2.0" + web3-providers-ws: "npm:^4.0.8" + web3-types: "npm:^1.10.0" + web3-utils: "npm:^4.3.3" + web3-validator: "npm:^2.0.6" + checksum: 10/a6dff5ce76e6905eb3e8e7175984305b859a35f17ffad9511371e0840097cdccc4d8dd4a4bc893aeb78f93c22034b4c73cac79551a4d7cba204e55590018909b + languageName: node + linkType: hard + +"web3-types@npm:^1.10.0, web3-types@npm:^1.3.0, web3-types@npm:^1.6.0, web3-types@npm:^1.7.0, web3-types@npm:^1.8.0": + version: 1.10.0 + resolution: "web3-types@npm:1.10.0" + checksum: 10/849f05a001896b27082c5b5c46c62b65a28f463366eeec7223802418a61db6d3487ebfb73d1fe6dcad3f0849a76e20706098819cb4e266df4f75ca24617e62a1 + languageName: node + linkType: hard + +"web3-utils@npm:^4.0.7, web3-utils@npm:^4.3.0, web3-utils@npm:^4.3.1, web3-utils@npm:^4.3.3": + version: 4.3.3 + resolution: "web3-utils@npm:4.3.3" + dependencies: + ethereum-cryptography: "npm:^2.0.0" + eventemitter3: "npm:^5.0.1" + web3-errors: "npm:^1.3.1" + web3-types: "npm:^1.10.0" + web3-validator: "npm:^2.0.6" + checksum: 10/c91ebbe67e469fe184ab258564b1f002f6f0e563a91637429c8e5bd3f0653b970d0c45dac544402021a5512297f0bea39aa2dd0b4c9bc6f54d4b58897f2dd002 + languageName: node + linkType: hard + +"web3-validator@npm:^2.0.3, web3-validator@npm:^2.0.6": + version: 2.0.6 + resolution: "web3-validator@npm:2.0.6" + dependencies: + ethereum-cryptography: "npm:^2.0.0" + util: "npm:^0.12.5" + web3-errors: "npm:^1.2.0" + web3-types: "npm:^1.6.0" + zod: "npm:^3.21.4" + checksum: 10/4df08e5317d55cdb674cbd11d7534a6cb41abfa4912cf3ff976c2b34a98e84500732fa0cade68a848e57b61259b4c9b377773f57de6bb69a5029c2ddef1cd0ab + languageName: node + linkType: hard + +"web3@npm:^4.16.0": + version: 4.16.0 + resolution: "web3@npm:4.16.0" + dependencies: + web3-core: "npm:^4.7.1" + web3-errors: "npm:^1.3.1" + web3-eth: "npm:^4.11.1" + web3-eth-abi: "npm:^4.4.1" + web3-eth-accounts: "npm:^4.3.1" + web3-eth-contract: "npm:^4.7.2" + web3-eth-ens: "npm:^4.4.0" + web3-eth-iban: "npm:^4.0.7" + web3-eth-personal: "npm:^4.1.0" + web3-net: "npm:^4.1.0" + web3-providers-http: "npm:^4.2.0" + web3-providers-ws: "npm:^4.0.8" + web3-rpc-methods: "npm:^1.3.0" + web3-rpc-providers: "npm:^1.0.0-rc.4" + web3-types: "npm:^1.10.0" + web3-utils: "npm:^4.3.3" + web3-validator: "npm:^2.0.6" + checksum: 10/8d63e70404914d2717d2675ba19350f112b07e50583a0703a68dd326eeb43a5c82b56f1165f4339cd89e697967581e0cd65fdb42ca0f1150fb7a3ce612f1a829 + languageName: node + linkType: hard + "webextension-polyfill-ts@npm:^0.26.0": version: 0.26.0 resolution: "webextension-polyfill-ts@npm:0.26.0" @@ -28130,6 +28592,21 @@ __metadata: languageName: node linkType: hard +"which-typed-array@npm:^1.1.16, which-typed-array@npm:^1.1.2": + version: 1.1.22 + resolution: "which-typed-array@npm:1.1.22" + dependencies: + available-typed-arrays: "npm:^1.0.7" + call-bind: "npm:^1.0.9" + call-bound: "npm:^1.0.4" + for-each: "npm:^0.3.5" + get-proto: "npm:^1.0.1" + gopd: "npm:^1.2.0" + has-tostringtag: "npm:^1.0.2" + checksum: 10/59b0383347e2f3b0bc5be570c2dfae551b172a9c83e0a6b03c6e17401d6161dfa1d912c7657062fe9add254a0d3c25ef70593dbaec8fefa8714715ff69e0a3fc + languageName: node + linkType: hard + "which@npm:^1.2.10": version: 1.3.1 resolution: "which@npm:1.3.1" @@ -28316,7 +28793,7 @@ __metadata: languageName: node linkType: hard -"ws@npm:8.21.0, ws@npm:^8.18.0": +"ws@npm:8.21.0": version: 8.21.0 resolution: "ws@npm:8.21.0" peerDependencies: @@ -28346,6 +28823,21 @@ __metadata: languageName: node linkType: hard +"ws@npm:^8.17.1, ws@npm:^8.18.0": + version: 8.21.3 + resolution: "ws@npm:8.21.3" + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: ">=5.0.2" + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + checksum: 10/8856922c26fd2d106931c16310d9a0bc2d6d37ed8771352bfa0d2a36df0ab5cb1f6528c6db8213f3333cf4ce93925e56f13604df0454cb0d4289fef922bebcdd + languageName: node + linkType: hard + "wsl-utils@npm:^0.1.0": version: 0.1.0 resolution: "wsl-utils@npm:0.1.0" @@ -28518,6 +29010,13 @@ __metadata: languageName: node linkType: hard +"zod@npm:^3.21.4": + version: 3.25.76 + resolution: "zod@npm:3.25.76" + checksum: 10/f0c963ec40cd96858451d1690404d603d36507c1fc9682f2dae59ab38b578687d542708a7fdbf645f77926f78c9ed558f57c3d3aa226c285f798df0c4da16995 + languageName: node + linkType: hard + "zod@npm:^4.1.11": version: 4.4.3 resolution: "zod@npm:4.4.3"