Resolve yarn peer dependency warnings#123
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Caution MetaMask internal reviewing guidelines:
Ignoring alerts on:
|
packages/delegation-deployments/script/validate-contract-deployments.ts
Outdated
Show resolved
Hide resolved
f93398e to
5646f1a
Compare
- Mark @typescript-eslint/explicit-function-return-type and @typescript-eslint/naming-convention as warning only
5646f1a to
bea4baf
Compare
| return undefined; | ||
| }) | ||
| .catch((error) => { | ||
| console.error(error.message); |
There was a problem hiding this comment.
The catch handler could be fail when the error isn't an Error object.
There was a problem hiding this comment.
it'd only fail if error was undefined / null - but it would provide an unhelpful message. I've updated to say "Failed with: ${message}" and adopted your suggestion for extracting the message from error: unknown.
| } catch { | ||
| console.error(`RPC Request failed for ${chain.name}: ${contractName}`); | ||
| hasThisChainFailed = true; | ||
| } |
There was a problem hiding this comment.
I think it would be better to provide more details of the error.
| } catch { | |
| console.error(`RPC Request failed for ${chain.name}: ${contractName}`); | |
| hasThisChainFailed = true; | |
| } | |
| } catch (error) { | |
| const errorMessage = error instanceof Error ? error.message : String(error); | |
| console.error( | |
| `RPC Request failed for ${chain.name}: ${contractName} - ${errorMessage}` | |
| ); | |
| hasThisChainFailed = true; | |
| } |
There was a problem hiding this comment.
Good call - this is helpful. I've made the change as you suggested, and adopted the same error message format in the other catch block.
| * The wallet will respond with an empty response when successful. | ||
| */ | ||
| export type RevokeExecutionPermissionResponseResult = {}; | ||
| export type RevokeExecutionPermissionResponseResult = object; |
There was a problem hiding this comment.
Is Record<string, never> a better choice than object here to represent an empty response type?
There was a problem hiding this comment.
Probably - especially given the description above, but 1. I'm unsure where it's used, 2. I'm cautious to bundle a functional change into an already verbose PR 😢
I recommend if we want to change this, we bump it to a separate change. Also, I wonder if { status: "success" } wouldn't be a more helpful response than {}
| * | ||
| * data - is a record of the data that is associated with the permission, and the structure is defined by the ERCs. | ||
| */ | ||
| // TODO: Consider openning up permission types with Custom / Unknown permissions in subseqential versions. |
There was a problem hiding this comment.
| // TODO: Consider openning up permission types with Custom / Unknown permissions in subseqential versions. | |
| // TODO: Consider opening up permission types with Custom / Unknown permissions in subsequent versions. |
- improve error handling in validate-contract-deployments scripts - fix comment
|
@SocketSecurity ignore npm/@emnapi/core@1.8.1 |
📝 Description
Update dependencies to resolve yarn warnings in preparation for stable launch.
This is intended as a first step towards resolving dependency security alerts.
Now:
Before:
🔄 What Changed?
This got a little out of hand - I had to make a number of changes to resolve eslint issues. Look at individual changes to see it broken out.
Bump various dependencies:
Shared tooling / root package.json
• @metamask/eslint-config: ^12.0.0 → 14.1.0
• @metamask/eslint-config-nodejs: ^12.0.0 → 14.0.0
• @metamask/eslint-config-typescript: ^12.0.0 → 14.0.0
• eslint: ^8.56.0 → ^9.0.0
• eslint-config-prettier: ^8.5.0 → ^9.1.0
• eslint-plugin-jsdoc: ^41.1.2 → ^50.2.4
• eslint-plugin-n: ^15.7.0 → ^17.10.3
• eslint-plugin-prettier: “latest” → ^5.2.6
• eslint-plugin-promise: ^6.1.1 → ^7.1.0
• typescript: 5.0.4 → 5.5.4
(Also: eslint-plugin-import was replaced by eslint-plugin-import-x@^4.0.0, and typescript-eslint@^8.0.0 was added — new packages rather than bumps.)
⸻
packages/7715-permission-types/package.json
• typescript: 5.0.4 → 5.5.4
(Plus new prettier@^3.5.3.)
⸻
packages/delegation-abis/package.json
• typescript: 5.0.4 → 5.5.4
(Plus new prettier@^3.5.3.)
⸻
packages/delegation-core/package.json
• @types/node: ^20.10.6 → ^20.19.0
• typescript: 5.0.4 → 5.5.4
(Plus new prettier@^3.5.3.)
⸻
packages/delegation-deployments/package.json
• typescript: 5.0.4 → 5.5.4
(Plus new prettier@^3.5.3.)
⸻
packages/smart-accounts-kit/package.json
• @metamask/eslint-config: ^12.0.0 → 14.1.0
• @metamask/eslint-config-nodejs: ^12.0.0 → 14.0.0
• @metamask/eslint-config-typescript: ^12.0.0 → 14.0.0
• @types/node: ^20.10.6 → ^20.19.0
• eslint: ^8.56.0 → ^9.0.0
• prettier: ^3.3.3 → ^3.5.3
• typescript: 5.0.4 → 5.5.4
(Also adds eslint-config-prettier@^9.1.0, eslint-import-resolver-typescript@^3.6.1, eslint-plugin-import-x@^4.0.0, eslint-plugin-jsdoc@^50.2.4, eslint-plugin-n@^17.10.3, eslint-plugin-prettier@^5.5.4, eslint-plugin-promise@^7.1.0, and typescript-eslint@^8.0.0 as new dependencies.)
⸻
🚀 Why?
Resolves yarn warnings, and potentially broken developer functionality.
🧪 How to Test?
Describe how to test these changes:
Everything should work as normal
List any breaking changes:
📋 Checklist
Check off completed items:
🔗 Related Issues
Link to related issues:
Closes #
Related to #
📚 Additional Notes
Any additional information, concerns, or context:
Note
Modernizes linting/TypeScript/tooling across the monorepo and fixes code to comply, eliminating Yarn peer warnings.
eslint-plugin-import-x, bump@types/node, add missingprettier/viem; update LavaMoat and Yarn packageExtensionsshared/config/base.eslint.mjs); migrate packages toeslint.config.mjs, add/lint scripts, remove legacy.eslintrc.*delegation-*,7715-permission-types, andsmart-accounts-kitWritten by Cursor Bugbot for commit 2407dee. This will update automatically on new commits. Configure here.