chore: align external dep ranges with core monorepo#598
Conversation
Core's `yarn.config.cjs` enforces consistent version ranges for every external dep across all monorepo packages (`expectConsistentDependenciesAndDevDependencies`). This PR aligns 6 of 7 remaining drift points so the migrated package doesn't fail constraints. - @babel/runtime ^7.24.1 -> ^7.23.9 - @lavamoat/allow-scripts ^3.2.1 -> ^3.0.4 - @types/eslint ^9.6.1 -> ^8.44.7 - @types/lodash ^4.14.194-> ^4.14.191 - @types/node ^18.19.17-> ^16.18.54 - typescript-eslint ^8.39.0 -> ^8.48.0 `nock` is intentionally NOT aligned: downgrading from `^14.0.0-beta.7` to core's `^13.3.1` makes 22 tests fail with HTTP 500s (the mock interceptors aren't matching). Will need to add `nock` to ALLOWED_INCONSISTENT_DEPENDENCIES in core during Phase B, or upgrade core to v14 separately. Lint, build, and 196/196 tests remain green.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning MetaMask internal reviewing guidelines:
Ignoring alerts on:
|
Source has no direct Node API usage (no fs/path/crypto/process/Buffer references; tsconfig lib is ["ES2020", "DOM"]). Transitive consumers that need Node types (jest, etc.) install their own copy. Build, lint, and 196/196 tests all pass without it.
Source doesn't import any of these directly. jest 29 ships its own types via @jest/globals; lodash/eslint types come in transitively. tsconfig has `skipLibCheck: true` so missing declaration files for these aren't checked anyway. Build, lint, and 196/196 tests all pass without them.
| "devDependencies": { | ||
| "@arethetypeswrong/cli": "^0.18.2", | ||
| "@lavamoat/allow-scripts": "^3.2.1", | ||
| "@lavamoat/allow-scripts": "^3.0.4", |
There was a problem hiding this comment.
I could also update in core if it's better
There was a problem hiding this comment.
We can do that after the merge. This is fine for now.
| "test:watch": "jest --watchAll" | ||
| }, | ||
| "dependencies": { | ||
| "@babel/runtime": "^7.24.1", |
There was a problem hiding this comment.
I could also update in core if it`s better
Mrtenz
left a comment
There was a problem hiding this comment.
Please review the Socket report before merging.
|
@SocketSecurity ignore npm/glob@13.0.6 False positive. The "fetch" identifiers Socket detected come from |
|
@SocketSecurity ignore npm/nock@14.0.15 False positive. nock's source ( |
|
@SocketSecurity ignore npm/@mswjs/interceptors@0.41.9 False positive. The "obfuscation" detection is triggered by hash-suffixed chunk filenames (e.g. |
|
@SocketSecurity ignore npm/undici@6.26.0 All 5 alerts checked, all false positives.
Transitive devDep of |
Explanation
MetaMask/core'syarn.config.cjsenforces consistent version ranges for every external dependency across all monorepo packages (expectConsistentDependenciesAndDevDependencies), andexpectUpToDateWorkspaceDependenciesAndDevDependenciesrequires internal@metamask/*ranges to track the current in-monorepo version. This PR aligns or removes every remaining drift point so the migrated package doesn't fail constraints.Aligned
@babel/runtime^7.24.1^7.23.9@lavamoat/allow-scripts^3.2.1^3.0.4typescript-eslint^8.39.0^8.48.0@metamask/profile-sync-controller^28.1.1^28.2.0(core released 28.2.0 since the previous alignment in #590)Removed (unused)
@types/node— no Node API usage anywhere in source (nofs/path/crypto/process/Buffer; tsconfiglibis["ES2020", "DOM"]).@types/eslint— noimport 'eslint'anywhere.@types/jest— Jest 29 ships its own types via@jest/globals.@types/lodash— transitively available;tsconfig.skipLibCheckmakes it irrelevant for source builds.(Transitive consumers that need any of these install their own copy.)
Not aligned (intentional)
nockstays at^14.0.0-beta.7. Downgrading to core's^13.3.1causes 22 test failures (the v14-beta mock interceptors don't match in v13). Two options for Phase B:nocktoALLOWED_INCONSISTENT_DEPENDENCIESin core'syarn.config.cjs, ORSource-only deps (not in core, will migrate as-is)
@ethersproject/bytes,@ethersproject/keccak256,@ethersproject/transactions(runtime),@arethetypeswrong/cli,prettier-plugin-packagejson(dev — Phase B PR #10 will strip the dev ones).Verification
yarn buildyarn lintyarn jest— 196/196 passReferences
yarn.config.cjs:222 expectUpToDateWorkspaceDependenciesAndDevDependenciesandyarn.config.cjs:885 expectConsistentDependenciesAndDevDependencies