Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ ignores:
- 'jest-silent-reporter'
- 'prettier-plugin-packagejson'
- 'typescript-eslint'
# Jest environment referenced in `jest.config.scripts.js`
- 'jest-environment-node'
# Ignore dependencies imported implicitly by tools
- 'eslint-import-resolver-typescript'
# Ignore dependencies which plug into the NPM lifecycle
Expand Down
7 changes: 5 additions & 2 deletions jest.config.packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ module.exports = {
// so in that case use their published versions
'<rootDir>/../../node_modules/@metamask/$1',
],
'^uuid$': require.resolve('uuid'),
},

// An array of regexp pattern strings, matched against all module paths before considered 'visible' to the module loader
Expand Down Expand Up @@ -188,8 +189,10 @@ module.exports = {
// This option sets the URL for the jsdom environment. It is reflected in properties such as location.href
// testURL: "http://localhost",

// Setting this value to "fake" allows the use of fake timers for functions such as "setTimeout"
// timers: "real",
// Enabling fake timers allows the use of fake timers for functions such as "setTimeout"
// fakeTimers: {
// enableGlobally: false,
// },

// A map from regular expressions to paths to transformers
// transform: undefined,
Expand Down
6 changes: 1 addition & 5 deletions jest.config.scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,8 @@ module.exports = {
},
},

// A map from regular expressions to module names or to arrays of module names that allow to stub out resources with a single module
// This ensures that Babel can resolve subpath exports correctly.
moduleNameMapper: {
'^@metamask/utils/(.+)$': [
'<rootDir>/node_modules/@metamask/utils/dist/$1.cjs',
],
'^uuid$': require.resolve('uuid'),
},

// Disabled due to use of 'transform' below.
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
"@metamask/network-controller": "^25.0.0",
"@metamask/utils": "^11.8.1",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"@types/lodash": "^4.14.191",
"@types/node": "^16.18.54",
"@types/semver": "^7",
Expand All @@ -86,7 +86,8 @@
"eslint-plugin-promise": "^7.1.0",
"execa": "^5.0.0",
"isomorphic-fetch": "^3.0.0",
"jest": "^27.5.1",
"jest": "^28.0.0",
"jest-environment-node": "^29.0.0",
"jest-silent-reporter": "^0.5.0",
"lodash": "^4.17.21",
"nock": "^13.3.1",
Expand All @@ -99,6 +100,7 @@
"tsx": "^4.20.5",
"typescript": "~5.3.3",
"typescript-eslint": "^8.7.0",
"uuid": "^8.3.2",
"yargs": "^17.7.2"
},
"packageManager": "yarn@4.10.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/account-tree-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@
"@metamask/providers": "^22.1.0",
"@metamask/snaps-controllers": "^14.0.1",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"jest": "^28.0.0",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/accounts-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@
"@metamask/providers": "^22.1.0",
"@metamask/snaps-controllers": "^14.0.1",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"@types/readable-stream": "^2.3.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"jest": "^28.0.0",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/address-book-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"jest": "^28.0.0",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/analytics-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"jest": "^28.0.0",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/announcement-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"jest": "^28.0.0",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/app-metadata-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"jest": "^28.0.0",
"sinon": "^9.2.4",
"ts-jest": "^27.1.4",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/approval-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,11 @@
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"jest": "^28.0.0",
"sinon": "^9.2.4",
"ts-jest": "^27.1.4",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
4 changes: 2 additions & 2 deletions packages/assets-controllers/jest.environment.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const JSDOMEnvironment = require('jest-environment-jsdom');
const { TestEnvironment } = require('jest-environment-jsdom');

// Custom test environment copied from https://github.com/jsdom/jsdom/issues/2524
// in order to add TextEncoder to jsdom. TextEncoder is expected by jose.

module.exports = class CustomTestEnvironment extends JSDOMEnvironment {
module.exports = class CustomTestEnvironment extends TestEnvironment {
async setup() {
await super.setup();
if (typeof this.global.TextEncoder === 'undefined') {
Expand Down
8 changes: 4 additions & 4 deletions packages/assets-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@
"@metamask/snaps-controllers": "^14.0.1",
"@metamask/transaction-controller": "^61.3.0",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"@types/lodash": "^4.14.191",
"@types/node": "^16.18.54",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"jest-environment-jsdom": "^27.5.1",
"jest": "^28.0.0",
"jest-environment-jsdom": "^28.0.0",
"nock": "^13.3.1",
"sinon": "^9.2.4",
"ts-jest": "^27.1.4",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3",
Expand Down
6 changes: 3 additions & 3 deletions packages/base-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
"@metamask/auto-changelog": "^3.4.4",
"@metamask/json-rpc-engine": "^10.1.1",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"@types/sinon": "^9.0.10",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"jest": "^28.0.0",
"sinon": "^9.2.4",
"ts-jest": "^27.1.4",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
8 changes: 4 additions & 4 deletions packages/bridge-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@
"@metamask/superstruct": "^3.1.0",
"@metamask/transaction-controller": "^61.3.0",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"jest-environment-jsdom": "^27.5.1",
"jest": "^28.0.0",
"jest-environment-jsdom": "^28.0.0",
"lodash": "^4.17.21",
"nock": "^13.3.1",
"ts-jest": "^27.1.4",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
8 changes: 4 additions & 4 deletions packages/bridge-status-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,13 @@
"@metamask/snaps-controllers": "^14.0.1",
"@metamask/transaction-controller": "^61.3.0",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"jest-environment-jsdom": "^27.5.1",
"jest": "^28.0.0",
"jest-environment-jsdom": "^28.0.0",
"lodash": "^4.17.21",
"nock": "^13.3.1",
"ts-jest": "^27.1.4",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/build-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"jest": "^28.0.0",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/chain-agnostic-permission/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
"@metamask/auto-changelog": "^3.4.4",
"@metamask/keyring-internal-api": "^9.0.0",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"jest": "^28.0.0",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/claims-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@
"@metamask/keyring-controller": "^24.0.0",
"@metamask/profile-sync-controller": "^26.0.0",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"jest": "^28.0.0",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/composable-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
"@metamask/auto-changelog": "^3.4.4",
"@metamask/json-rpc-engine": "^10.1.1",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"immer": "^9.0.6",
"jest": "^27.5.1",
"jest": "^28.0.0",
"sinon": "^9.2.4",
"ts-jest": "^27.1.4",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
4 changes: 2 additions & 2 deletions packages/controller-utils/jest.environment.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const JSDOMEnvironment = require('jest-environment-jsdom');
const { TestEnvironment } = require('jest-environment-jsdom');

// Custom test environment copied from https://github.com/jsdom/jsdom/issues/2524
// in order to add TextEncoder to jsdom. TextEncoder is expected by @noble/hashes.

module.exports = class CustomTestEnvironment extends JSDOMEnvironment {
module.exports = class CustomTestEnvironment extends TestEnvironment {
async setup() {
await super.setup();
if (typeof this.global.TextEncoder === 'undefined') {
Expand Down
8 changes: 4 additions & 4 deletions packages/controller-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,14 @@
"@babel/runtime": "^7.23.9",
"@metamask/auto-changelog": "^3.4.4",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"@types/lodash": "^4.14.191",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"jest-environment-jsdom": "^27.5.1",
"jest": "^28.0.0",
"jest-environment-jsdom": "^28.0.0",
"nock": "^13.3.1",
"sinon": "^9.2.4",
"ts-jest": "^27.1.4",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
7 changes: 4 additions & 3 deletions packages/core-backend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@
"@metamask/auto-changelog": "^3.4.4",
"@metamask/keyring-controller": "^24.0.0",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"jest": "^28.0.0",
"jest-environment-jsdom": "^28.0.0",
"sinon": "^9.2.4",
"ts-jest": "^27.1.4",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/delegation-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@
"@metamask/auto-changelog": "^3.4.4",
"@metamask/keyring-controller": "^24.0.0",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"jest": "^28.0.0",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
6 changes: 3 additions & 3 deletions packages/earn-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
"@metamask/network-controller": "^25.0.0",
"@metamask/transaction-controller": "^61.3.0",
"@ts-bridge/cli": "^0.6.4",
"@types/jest": "^27.4.1",
"@types/jest": "^28.0.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"jest": "^28.0.0",
"ts-jest": "^28.0.0",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.3.3"
Expand Down
Loading
Loading