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
7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,18 +39,21 @@
"devDependencies": {
"@babel/runtime": "^7.0.0",
"@lavamoat/allow-scripts": "^3.0.0",
"@metamask/approval-controller": "^5.1.1",
"@metamask/accounts-controller": "^18.0.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

required by this TransactionController version:

node_modules/@metamask/transaction-controller/dist/TransactionController.d.cts:3:65 - error TS2307: Cannot find module '@metamask/accounts-controller' or its corresponding type declarations.

3 import type { AccountsControllerGetSelectedAccountAction } from "@metamask/accounts-controller";
                                                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/@metamask/transaction-controller/dist/helpers/IncomingTransactionHelper.d.cts:2:41 - error TS2307: Cannot find module '@metamask/accounts-controller' or its corresponding type declarations.

2 import type { AccountsController } from "@metamask/accounts-controller";

Copy link
Contributor

Choose a reason for hiding this comment

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

It looks like we only use @metamask/transaction-controller for types and yet this is needed because TransactionController talks to AccountsController, so @metamask/accounts-controller is a peer dependency of @metamask/transaction-controller. Interesting.

"@metamask/approval-controller": "^7.1.0",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/composable-controller": "^9.0.1",
"@metamask/eslint-config": "^12.2.0",
"@metamask/eslint-config-jest": "^12.1.0",
"@metamask/eslint-config-nodejs": "^12.1.0",
"@metamask/eslint-config-typescript": "^12.1.0",
"@metamask/gas-fee-controller": "^21.0.0",
"@metamask/keyring-controller": "^17.0.0",
Copy link
Member Author

Choose a reason for hiding this comment

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

added to fix this error yield by AccountsController:

node_modules/@metamask/accounts-controller/dist/utils.d.cts:1:30 - error TS2307: Cannot find module '@metamask/keyring-controller' or its corresponding type declarations.

1 import { KeyringTypes } from "@metamask/keyring-controller";

Copy link
Contributor

Choose a reason for hiding this comment

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

Connected to the @metamask/transaction-controller update, I see.

"@metamask/network-controller": "^21.1.0",
"@metamask/transaction-controller": "^19.0.1",
"@metamask/transaction-controller": "^37.3.0",
"@types/jest": "^26.0.22",
"@types/node": "^20.10.4",
"@types/readable-stream": "^4.0.18",
Copy link
Member Author

Choose a reason for hiding this comment

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

added to fix several error messages similar to these ones:

node_modules/@metamask/object-multiplex/dist/ObjectMultiplex.d.ts:2:44 - error TS7016: Could not find a declaration file for module 'readable-stream'

node_modules/@metamask/post-message-stream/dist/BasePostMessageStream.d.ts:1:24 - error TS7016: Could not find a declaration file for module 'readable-stream'. '/home/mike/dev/metamask/swaps-controller/node_modules/readable-stream/readable.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/readable-stream` if it exists or add a new declaration (.d.ts) file containing `declare module 'readable-stream';`

1 import { Duplex } from 'readable-stream';

Copy link
Contributor

Choose a reason for hiding this comment

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

It seems that @types/readable-stream is a dev dependency of @metamask/object-multiplex when it should not be in the dev group. I've added a ticket for this here: MetaMask/object-multiplex#58

"@typescript-eslint/eslint-plugin": "^5.42.1",
"@typescript-eslint/parser": "^5.42.1",
"babel-runtime": "^6.26.0",
Expand Down
Loading