Skip to content
Merged
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
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
"resolutions": {
"typescript": "5.8.3",
"react-native": "0.76.9",
"prettier": "3.2.5",
"prettier": "3.5.3",
"type-fest": "4.24.0",
"bcrypto": "5.4.0",
"react": "18.2.0",
Expand Down Expand Up @@ -121,15 +121,15 @@
"@types/node": "22.13.10",
"babel-jest": "29.7.0",
"depcheck": "^1.4.7",
"eslint": "^9.23.0",
"eslint": "^9.25.1",
"husky": "^9.1.7",
"jest": "29.7.0",
"jest-expo": "~52.0.6",
"node-fetch": "^2.6.4",
"node-gyp": "10.2.0",
"nx": "^18.0.3",
"nx": "^20.8.1",
"patch-package": "8.0.0",
"prettier": "3.2.5",
"prettier": "3.5.3",
"rimraf": "^6.0.1",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/blockchain-link/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@trezor/e2e-utils": "workspace:*",
"@trezor/eslint": "workspace:*",
"@trezor/type-utils": "workspace:*",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"html-webpack-plugin": "^5.6.0",
"tiny-worker": "^2.3.0",
"tsx": "^4.19.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/connect-explorer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
"babel-plugin-styled-components": "^2.1.4",
"concurrently": "^8.2.2",
"copy-webpack-plugin": "^12.0.2",
"eslint-plugin-mdx": "^3.3.1",
"eslint-plugin-mdx": "^3.4.1",
"html-webpack-plugin": "^5.6.0",
"rimraf": "^6.0.1",
"tsx": "^4.19.3",
Expand Down
8 changes: 4 additions & 4 deletions packages/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
"type-check": "yarn g:tsc --build"
},
"devDependencies": {
"@eslint/js": "^9.23.0",
"eslint": "^9.23.0",
"@eslint/js": "^9.25.1",
"eslint": "^9.25.1",
"eslint-plugin-chai-friendly": "^1.0.1",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest": "^28.11.0",
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-local-rules": "^3.0.2",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"globals": "^15.11.0",
"typescript-eslint": "^8.29.0"
"typescript-eslint": "^8.31.1"
}
}
2 changes: 1 addition & 1 deletion packages/suite-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"autoprefixer": "^10.4.21",
"babel-loader": "^10.0.0",
"css-loader": "^6.10.0",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"postcss-loader": "^8.1.1",
"postcss-modules-extract-imports": "^3.1.0",
"postcss-modules-local-by-default": "4.2.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/suite-desktop-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
"@types/ws": "^8.5.13",
"dotenv": "^16.4.7",
"electron": "35.1.2",
"fs-extra": "^11.2.0",
"glob": "^10.3.10",
"fs-extra": "^11.3.0",
"glob": "^11.0.2",
"jest-diff": "^29.7.0",
"lodash": "^4.17.21",
"terser-webpack-plugin": "^5.3.14",
Expand Down
2 changes: 1 addition & 1 deletion packages/suite-desktop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"@electron/notarize": "2.5.0",
"electron": "35.1.2",
"electron-builder": "26.0.3",
"glob": "^10.3.10"
"glob": "^11.0.2"
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { testMocks } from '@suite-common/test-utils';
import '@suite-common/test-utils/src/globalOverrides';
import {
createDiscoveryThunk,
deviceActions,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { combineReducers, createReducer } from '@reduxjs/toolkit';

import { prepareMessageSystemReducer } from '@suite-common/message-system';
import { configureMockStore, initPreloadedState, testMocks } from '@suite-common/test-utils';
import '@suite-common/test-utils/src/globalOverrides';
import { promiseAllSequence } from '@trezor/utils';

import { coinjoinMiddleware } from 'src/middlewares/wallet/coinjoinMiddleware';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { combineReducers, createReducer } from '@reduxjs/toolkit';

import { prepareMessageSystemReducer } from '@suite-common/message-system';
import { configureMockStore, testMocks } from '@suite-common/test-utils';
import '@suite-common/test-utils/src/globalOverrides';

import { fixtures } from 'src/middlewares/wallet/__fixtures__/coinjoinMiddleware';
import { coinjoinMiddleware } from 'src/middlewares/wallet/coinjoinMiddleware';
Expand Down
2 changes: 1 addition & 1 deletion packages/suite/src/storage/__tests__/storage.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import '@suite-common/test-utils/src/mocks';
import '@suite-common/test-utils/src/globalOverrides';

import { db } from '../index';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ bn.js
bs58
bs58check
chalk
core-js
cors
create-hmac
depcheck
Expand Down
6 changes: 3 additions & 3 deletions scripts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
"dependencies": {
"@mobily/ts-belt": "^3.13.1",
"chalk": "^4.1.2",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"minimatch": "^9.0.3",
"prettier": "3.2.5",
"sort-package-json": "^1.57.0",
"prettier": "3.5.3",
"sort-package-json": "^3.1.0",
"tsx": "^4.19.3",
"yargs": "17.7.2"
},
Expand Down
2 changes: 1 addition & 1 deletion suite-common/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"devDependencies": {
"chalk": "4.1.2",
"fantasticon": "3.0.0",
"prettier": "3.2.5",
"prettier": "3.5.3",
"sharp": "^0.34.1",
"svgo": "3.3.2"
}
Expand Down
2 changes: 1 addition & 1 deletion suite-common/message-system/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@trezor/env-utils": "workspace:*",
"@trezor/utils": "workspace:*",
"@types/semver": "^7.7.0",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.0",
"json-schema-to-typescript": "^15.0.4",
"jws": "^4.0.0",
"react": "18.2.0",
Expand Down
3 changes: 2 additions & 1 deletion suite-common/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"@suite-common/wallet-types": "workspace:*",
"@trezor/connect": "workspace:*",
"@trezor/utils": "workspace:*",
"fake-indexeddb": "^4.0.2",
"core-js": "^3.42.0",
"fake-indexeddb": "^6.0.0",
"redux": "^5.0.1",
"redux-thunk": "^3.1.0"
}
Expand Down
6 changes: 6 additions & 0 deletions suite-common/test-utils/src/globalOverrides.ts
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Found out that side effects like thsi absolutely must be in its separate file.
I spent a while time debugging Suite Native app crashing during runtime because of infinite loop:

RangeError: Maximum call stack size exceeded

I didn't think this would be the cause, because test-utils are only used in tests.. The file mocks.ts is indirectly included in suite-native tests, but that shouldn't leak into runtime code!

It seems to me, that precisely that is happening. Just because mocks.ts is included in the suite-native packages, even though only in tests, its side effects are performed and leak into runtime code even though never referenced. Idk it's weird AF. Isolating the browser mocks into special file solves this 🙈

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// in-memory implementation of indexedDB as a replacement in node environment
import 'fake-indexeddb/auto';

// fake-indexeddb requires this polyfill with jsdom environment
// https://github.com/dumbmatter/fakeIndexedDB/blob/57465fd/README.md#jsdom-often-used-with-jest
import 'core-js/stable/structured-clone';
2 changes: 0 additions & 2 deletions suite-common/test-utils/src/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ import {
} from '@trezor/connect';
import { DeviceModelInternal } from '@trezor/device-utils';

// in-memory implementation of indexedDB
import 'fake-indexeddb/auto';
/**
* Generate wallet account
* @param {Partial<Account>} [account]
Expand Down
2 changes: 1 addition & 1 deletion suite-native/video-assets/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"@trezor/styles": "workspace:*",
"expo": "52.0.42",
"expo-video": "^2.0.1",
"prettier": "3.2.5",
"prettier": "3.5.3",
"react": "18.2.0",
"react-native": "0.76.9",
"react-native-reanimated": "^3.16.7"
Expand Down
Loading