From bf8ca4ffe5d784cab34b744eb11b4ee2d2c59966 Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Thu, 17 Oct 2024 09:39:46 +0000 Subject: [PATCH 1/2] deps: json-rpc-middleware-stream@^5 -> @metamask/json-rpc-middleware-stream@^8 --- app/scripts/metamask-controller.js | 2 +- package.json | 2 +- yarn.lock | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/scripts/metamask-controller.js b/app/scripts/metamask-controller.js index 24ae9c0b63e7..c09e08d17e34 100644 --- a/app/scripts/metamask-controller.js +++ b/app/scripts/metamask-controller.js @@ -14,9 +14,9 @@ import { fetchMultiExchangeRate, } from '@metamask/assets-controllers'; import { JsonRpcEngine } from '@metamask/json-rpc-engine'; +import { createEngineStream } from '@metamask/json-rpc-middleware-stream'; import { ObservableStore } from '@metamask/obs-store'; import { storeAsStream } from '@metamask/obs-store/dist/asStream'; -import { createEngineStream } from 'json-rpc-middleware-stream'; import { providerAsMiddleware } from '@metamask/eth-json-rpc-middleware'; import { debounce, throttle, memoize, wrap } from 'lodash'; import { diff --git a/package.json b/package.json index 63f00531d939..3826fe3e315e 100644 --- a/package.json +++ b/package.json @@ -329,6 +329,7 @@ "@metamask/gas-fee-controller": "^18.0.0", "@metamask/jazzicon": "^2.0.0", "@metamask/json-rpc-engine": "^10.0.0", + "@metamask/json-rpc-middleware-stream": "^8.0.4", "@metamask/keyring-api": "^8.1.3", "@metamask/keyring-controller": "^17.2.2", "@metamask/logging-controller": "^6.0.0", @@ -407,7 +408,6 @@ "immer": "^9.0.6", "is-retry-allowed": "^2.2.0", "jest-junit": "^14.0.1", - "json-rpc-middleware-stream": "^5.0.1", "labeled-stream-splicer": "^2.0.2", "localforage": "^1.9.0", "lodash": "^4.17.21", diff --git a/yarn.lock b/yarn.lock index c2382bcab48d..34e24e3d4b7a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5560,15 +5560,15 @@ __metadata: languageName: node linkType: hard -"@metamask/json-rpc-middleware-stream@npm:^8.0.1, @metamask/json-rpc-middleware-stream@npm:^8.0.2": - version: 8.0.2 - resolution: "@metamask/json-rpc-middleware-stream@npm:8.0.2" +"@metamask/json-rpc-middleware-stream@npm:^8.0.1, @metamask/json-rpc-middleware-stream@npm:^8.0.2, @metamask/json-rpc-middleware-stream@npm:^8.0.4": + version: 8.0.4 + resolution: "@metamask/json-rpc-middleware-stream@npm:8.0.4" dependencies: - "@metamask/json-rpc-engine": "npm:^9.0.2" + "@metamask/json-rpc-engine": "npm:^10.0.0" "@metamask/safe-event-emitter": "npm:^3.0.0" "@metamask/utils": "npm:^9.1.0" readable-stream: "npm:^3.6.2" - checksum: 10/aaf41cb6fa015494eb0424959d14022b1355c390066898603223e3418d93bd72249b6e54caee3e23b4d6a679f389c2374f687882f2a7202379b4f4b042a84974 + checksum: 10/93c842e1ac8e624c65d888cb3539b38ade5b8415ea45f649d78dad91e7139f11fa96bbf89136998d21def7711b3f710939f8e4498ce31a6cf461892e3f4ba176 languageName: node linkType: hard @@ -25970,6 +25970,7 @@ __metadata: "@metamask/gas-fee-controller": "npm:^18.0.0" "@metamask/jazzicon": "npm:^2.0.0" "@metamask/json-rpc-engine": "npm:^10.0.0" + "@metamask/json-rpc-middleware-stream": "npm:^8.0.4" "@metamask/keyring-api": "npm:^8.1.3" "@metamask/keyring-controller": "npm:^17.2.2" "@metamask/logging-controller": "npm:^6.0.0" @@ -26188,7 +26189,6 @@ __metadata: jest-environment-jsdom: "patch:jest-environment-jsdom@npm%3A29.7.0#~/.yarn/patches/jest-environment-jsdom-npm-29.7.0-0b72dd0e0b.patch" jest-junit: "npm:^14.0.1" jsdom: "npm:^16.7.0" - json-rpc-middleware-stream: "npm:^5.0.1" json-schema-to-ts: "npm:^3.0.1" koa: "npm:^2.7.0" labeled-stream-splicer: "npm:^2.0.2" From ad3acdc188fea7f9c129478339dec1e69644493e Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Thu, 24 Oct 2024 05:19:32 +0000 Subject: [PATCH 2/2] chore: update lavamoat policies --- lavamoat/browserify/beta/policy.json | 34 ++++++++++----------------- lavamoat/browserify/flask/policy.json | 34 ++++++++++----------------- lavamoat/browserify/main/policy.json | 34 ++++++++++----------------- lavamoat/browserify/mmi/policy.json | 34 ++++++++++----------------- 4 files changed, 48 insertions(+), 88 deletions(-) diff --git a/lavamoat/browserify/beta/policy.json b/lavamoat/browserify/beta/policy.json index d5c71923eebf..cb78ea51f04f 100644 --- a/lavamoat/browserify/beta/policy.json +++ b/lavamoat/browserify/beta/policy.json @@ -1276,6 +1276,17 @@ "@metamask/utils": true } }, + "@metamask/json-rpc-middleware-stream": { + "globals": { + "console.warn": true, + "setTimeout": true + }, + "packages": { + "@metamask/safe-event-emitter": true, + "@metamask/utils": true, + "readable-stream": true + } + }, "@metamask/keyring-api": { "globals": { "URL": true @@ -2538,11 +2549,11 @@ "setTimeout": true }, "packages": { + "@metamask/json-rpc-middleware-stream": true, "@metamask/object-multiplex": true, "@metamask/post-message-stream": true, "@metamask/snaps-controllers>@metamask/base-controller": true, "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-controllers>@metamask/json-rpc-middleware-stream": true, "@metamask/snaps-controllers>@metamask/permission-controller": true, "@metamask/snaps-controllers>@metamask/rpc-errors": true, "@metamask/snaps-controllers>@xstate/fsm": true, @@ -2582,17 +2593,6 @@ "@metamask/utils": true } }, - "@metamask/snaps-controllers>@metamask/json-rpc-middleware-stream": { - "globals": { - "console.warn": true, - "setTimeout": true - }, - "packages": { - "@metamask/safe-event-emitter": true, - "@metamask/utils": true, - "readable-stream": true - } - }, "@metamask/snaps-controllers>@metamask/permission-controller": { "globals": { "console.error": true @@ -4582,16 +4582,6 @@ "stream-http": true } }, - "json-rpc-middleware-stream": { - "globals": { - "console.warn": true, - "setTimeout": true - }, - "packages": { - "@metamask/safe-event-emitter": true, - "readable-stream": true - } - }, "koa>content-disposition>safe-buffer": { "packages": { "browserify>buffer": true diff --git a/lavamoat/browserify/flask/policy.json b/lavamoat/browserify/flask/policy.json index d5c71923eebf..cb78ea51f04f 100644 --- a/lavamoat/browserify/flask/policy.json +++ b/lavamoat/browserify/flask/policy.json @@ -1276,6 +1276,17 @@ "@metamask/utils": true } }, + "@metamask/json-rpc-middleware-stream": { + "globals": { + "console.warn": true, + "setTimeout": true + }, + "packages": { + "@metamask/safe-event-emitter": true, + "@metamask/utils": true, + "readable-stream": true + } + }, "@metamask/keyring-api": { "globals": { "URL": true @@ -2538,11 +2549,11 @@ "setTimeout": true }, "packages": { + "@metamask/json-rpc-middleware-stream": true, "@metamask/object-multiplex": true, "@metamask/post-message-stream": true, "@metamask/snaps-controllers>@metamask/base-controller": true, "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-controllers>@metamask/json-rpc-middleware-stream": true, "@metamask/snaps-controllers>@metamask/permission-controller": true, "@metamask/snaps-controllers>@metamask/rpc-errors": true, "@metamask/snaps-controllers>@xstate/fsm": true, @@ -2582,17 +2593,6 @@ "@metamask/utils": true } }, - "@metamask/snaps-controllers>@metamask/json-rpc-middleware-stream": { - "globals": { - "console.warn": true, - "setTimeout": true - }, - "packages": { - "@metamask/safe-event-emitter": true, - "@metamask/utils": true, - "readable-stream": true - } - }, "@metamask/snaps-controllers>@metamask/permission-controller": { "globals": { "console.error": true @@ -4582,16 +4582,6 @@ "stream-http": true } }, - "json-rpc-middleware-stream": { - "globals": { - "console.warn": true, - "setTimeout": true - }, - "packages": { - "@metamask/safe-event-emitter": true, - "readable-stream": true - } - }, "koa>content-disposition>safe-buffer": { "packages": { "browserify>buffer": true diff --git a/lavamoat/browserify/main/policy.json b/lavamoat/browserify/main/policy.json index d5c71923eebf..cb78ea51f04f 100644 --- a/lavamoat/browserify/main/policy.json +++ b/lavamoat/browserify/main/policy.json @@ -1276,6 +1276,17 @@ "@metamask/utils": true } }, + "@metamask/json-rpc-middleware-stream": { + "globals": { + "console.warn": true, + "setTimeout": true + }, + "packages": { + "@metamask/safe-event-emitter": true, + "@metamask/utils": true, + "readable-stream": true + } + }, "@metamask/keyring-api": { "globals": { "URL": true @@ -2538,11 +2549,11 @@ "setTimeout": true }, "packages": { + "@metamask/json-rpc-middleware-stream": true, "@metamask/object-multiplex": true, "@metamask/post-message-stream": true, "@metamask/snaps-controllers>@metamask/base-controller": true, "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-controllers>@metamask/json-rpc-middleware-stream": true, "@metamask/snaps-controllers>@metamask/permission-controller": true, "@metamask/snaps-controllers>@metamask/rpc-errors": true, "@metamask/snaps-controllers>@xstate/fsm": true, @@ -2582,17 +2593,6 @@ "@metamask/utils": true } }, - "@metamask/snaps-controllers>@metamask/json-rpc-middleware-stream": { - "globals": { - "console.warn": true, - "setTimeout": true - }, - "packages": { - "@metamask/safe-event-emitter": true, - "@metamask/utils": true, - "readable-stream": true - } - }, "@metamask/snaps-controllers>@metamask/permission-controller": { "globals": { "console.error": true @@ -4582,16 +4582,6 @@ "stream-http": true } }, - "json-rpc-middleware-stream": { - "globals": { - "console.warn": true, - "setTimeout": true - }, - "packages": { - "@metamask/safe-event-emitter": true, - "readable-stream": true - } - }, "koa>content-disposition>safe-buffer": { "packages": { "browserify>buffer": true diff --git a/lavamoat/browserify/mmi/policy.json b/lavamoat/browserify/mmi/policy.json index 230d55331aae..f0af5a124e57 100644 --- a/lavamoat/browserify/mmi/policy.json +++ b/lavamoat/browserify/mmi/policy.json @@ -1368,6 +1368,17 @@ "@metamask/utils": true } }, + "@metamask/json-rpc-middleware-stream": { + "globals": { + "console.warn": true, + "setTimeout": true + }, + "packages": { + "@metamask/safe-event-emitter": true, + "@metamask/utils": true, + "readable-stream": true + } + }, "@metamask/keyring-api": { "globals": { "URL": true @@ -2630,11 +2641,11 @@ "setTimeout": true }, "packages": { + "@metamask/json-rpc-middleware-stream": true, "@metamask/object-multiplex": true, "@metamask/post-message-stream": true, "@metamask/snaps-controllers>@metamask/base-controller": true, "@metamask/snaps-controllers>@metamask/json-rpc-engine": true, - "@metamask/snaps-controllers>@metamask/json-rpc-middleware-stream": true, "@metamask/snaps-controllers>@metamask/permission-controller": true, "@metamask/snaps-controllers>@metamask/rpc-errors": true, "@metamask/snaps-controllers>@xstate/fsm": true, @@ -2674,17 +2685,6 @@ "@metamask/utils": true } }, - "@metamask/snaps-controllers>@metamask/json-rpc-middleware-stream": { - "globals": { - "console.warn": true, - "setTimeout": true - }, - "packages": { - "@metamask/safe-event-emitter": true, - "@metamask/utils": true, - "readable-stream": true - } - }, "@metamask/snaps-controllers>@metamask/permission-controller": { "globals": { "console.error": true @@ -4674,16 +4674,6 @@ "stream-http": true } }, - "json-rpc-middleware-stream": { - "globals": { - "console.warn": true, - "setTimeout": true - }, - "packages": { - "@metamask/safe-event-emitter": true, - "readable-stream": true - } - }, "koa>content-disposition>safe-buffer": { "packages": { "browserify>buffer": true