From 44887f721f0bad4d3fd1e7e6aa917257d388ee21 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 9 Oct 2024 04:10:35 +0000 Subject: [PATCH 1/2] deps(json-rpc-engine): @metamask/rpc-errors@^6.3.1->^7.0.0 --- packages/json-rpc-engine/package.json | 2 +- yarn.lock | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/json-rpc-engine/package.json b/packages/json-rpc-engine/package.json index 93b4e77c92..5cd3044314 100644 --- a/packages/json-rpc-engine/package.json +++ b/packages/json-rpc-engine/package.json @@ -56,7 +56,7 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/rpc-errors": "^6.3.1", + "@metamask/rpc-errors": "^7.0.0", "@metamask/safe-event-emitter": "^3.0.0", "@metamask/utils": "^9.1.0" }, diff --git a/yarn.lock b/yarn.lock index 06a9e70928..02fc53459b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2862,7 +2862,7 @@ __metadata: dependencies: "@lavamoat/allow-scripts": "npm:^3.0.4" "@metamask/auto-changelog": "npm:^3.4.4" - "@metamask/rpc-errors": "npm:^6.3.1" + "@metamask/rpc-errors": "npm:^7.0.0" "@metamask/safe-event-emitter": "npm:^3.0.0" "@metamask/utils": "npm:^9.1.0" "@types/jest": "npm:^27.4.1" @@ -3403,6 +3403,16 @@ __metadata: languageName: node linkType: hard +"@metamask/rpc-errors@npm:^7.0.0": + version: 7.0.0 + resolution: "@metamask/rpc-errors@npm:7.0.0" + dependencies: + "@metamask/utils": "npm:^9.0.0" + fast-safe-stringify: "npm:^2.0.6" + checksum: 10/f25e2a5506d4d0d6193c88aef8f035ec189a1177f8aee8fa01c9a33d73b1536ca7b5eea2fb33a477768bbd2abaf16529e68f0b3cf714387e5d6c9178225354fd + languageName: node + linkType: hard + "@metamask/safe-event-emitter@npm:^3.0.0, @metamask/safe-event-emitter@npm:^3.1.1": version: 3.1.1 resolution: "@metamask/safe-event-emitter@npm:3.1.1" From 1972ccf3c5096e3d0b6edd2095f6ca4401704056 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Wed, 9 Oct 2024 05:44:48 +0000 Subject: [PATCH 2/2] chore: allow exception for @metamask/rpc-errors@^7.0.0 inconsistent dependency range chore(constraints): move out constant object construction from function body --- yarn.config.cjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/yarn.config.cjs b/yarn.config.cjs index 1352ee2e0f..9b51713461 100644 --- a/yarn.config.cjs +++ b/yarn.config.cjs @@ -714,6 +714,10 @@ function expectControllerDependenciesListedAsPeerDependencies( } } +const ALLOWED_INCONSISTENT_DEPENDENCIES = Object.entries({ + '@metamask/rpc-errors': ['^7.0.0'], +}); + /** * Filter out dependency ranges which are not to be considered in `expectConsistentDependenciesAndDevDependencies`. * @@ -725,9 +729,6 @@ function getInconsistentDependenciesAndDevDependencies( dependencyIdent, dependenciesByRange, ) { - const ALLOWED_INCONSISTENT_DEPENDENCIES = Object.entries({ - // '@metamask/foo': ['^1.0.0'], - }); for (const [ allowedPackage, ignoredRange,