1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 09:57:02 +01:00

Update json-rpc-middleware-stream from v2 to v4 (#17588)

This package has been updated to reduce the bundle size (we already use
the v4 version indirectly). The only breaking change applicable to the
usage of this package in the extension is to the package's exports. The
one import line has been updated accordingly.

This update comes with types (v3 was the TypeScript migration).
This commit is contained in:
Mark Stacey 2023-02-08 11:15:00 -03:30 committed by GitHub
parent 3be1fc6d0c
commit 1d0522fd88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 19 additions and 24 deletions

View File

@ -4,7 +4,7 @@ import { ObservableStore } from '@metamask/obs-store';
import { storeAsStream } from '@metamask/obs-store/dist/asStream'; import { storeAsStream } from '@metamask/obs-store/dist/asStream';
import { JsonRpcEngine } from 'json-rpc-engine'; import { JsonRpcEngine } from 'json-rpc-engine';
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import createEngineStream from 'json-rpc-middleware-stream/engineStream'; import { createEngineStream } from 'json-rpc-middleware-stream';
import { providerAsMiddleware } from 'eth-json-rpc-middleware'; import { providerAsMiddleware } from 'eth-json-rpc-middleware';
import { import {
KeyringController, KeyringController,

View File

@ -3498,7 +3498,12 @@
} }
}, },
"json-rpc-middleware-stream": { "json-rpc-middleware-stream": {
"globals": {
"console.warn": true,
"setTimeout": true
},
"packages": { "packages": {
"json-rpc-engine>@metamask/safe-event-emitter": true,
"readable-stream": true "readable-stream": true
} }
}, },

View File

@ -1472,7 +1472,6 @@
"@metamask/snaps-controllers>@xstate/fsm": true, "@metamask/snaps-controllers>@xstate/fsm": true,
"@metamask/snaps-controllers>concat-stream": true, "@metamask/snaps-controllers>concat-stream": true,
"@metamask/snaps-controllers>gunzip-maybe": true, "@metamask/snaps-controllers>gunzip-maybe": true,
"@metamask/snaps-controllers>json-rpc-middleware-stream": true,
"@metamask/snaps-controllers>nanoid": true, "@metamask/snaps-controllers>nanoid": true,
"@metamask/snaps-controllers>readable-web-to-node-stream": true, "@metamask/snaps-controllers>readable-web-to-node-stream": true,
"@metamask/snaps-controllers>tar-stream": true, "@metamask/snaps-controllers>tar-stream": true,
@ -1481,6 +1480,7 @@
"@metamask/utils": true, "@metamask/utils": true,
"eth-rpc-errors": true, "eth-rpc-errors": true,
"json-rpc-engine": true, "json-rpc-engine": true,
"json-rpc-middleware-stream": true,
"pump": true "pump": true
} }
}, },
@ -1580,16 +1580,6 @@
"watchify>xtend": true "watchify>xtend": true
} }
}, },
"@metamask/snaps-controllers>json-rpc-middleware-stream": {
"globals": {
"console.warn": true,
"setTimeout": true
},
"packages": {
"json-rpc-engine>@metamask/safe-event-emitter": true,
"readable-stream": true
}
},
"@metamask/snaps-controllers>nanoid": { "@metamask/snaps-controllers>nanoid": {
"globals": { "globals": {
"crypto.getRandomValues": true "crypto.getRandomValues": true
@ -3822,7 +3812,12 @@
} }
}, },
"json-rpc-middleware-stream": { "json-rpc-middleware-stream": {
"globals": {
"console.warn": true,
"setTimeout": true
},
"packages": { "packages": {
"json-rpc-engine>@metamask/safe-event-emitter": true,
"readable-stream": true "readable-stream": true
} }
}, },

View File

@ -3498,7 +3498,12 @@
} }
}, },
"json-rpc-middleware-stream": { "json-rpc-middleware-stream": {
"globals": {
"console.warn": true,
"setTimeout": true
},
"packages": { "packages": {
"json-rpc-engine>@metamask/safe-event-emitter": true,
"readable-stream": true "readable-stream": true
} }
}, },

View File

@ -304,7 +304,7 @@
"is-retry-allowed": "^2.2.0", "is-retry-allowed": "^2.2.0",
"jest-junit": "^14.0.1", "jest-junit": "^14.0.1",
"json-rpc-engine": "^6.1.0", "json-rpc-engine": "^6.1.0",
"json-rpc-middleware-stream": "^2.1.1", "json-rpc-middleware-stream": "^4.2.1",
"jsonschema": "^1.2.4", "jsonschema": "^1.2.4",
"labeled-stream-splicer": "^2.0.2", "labeled-stream-splicer": "^2.0.2",
"localforage": "^1.9.0", "localforage": "^1.9.0",

View File

@ -22260,16 +22260,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"json-rpc-middleware-stream@npm:^2.1.1":
version: 2.1.1
resolution: "json-rpc-middleware-stream@npm:2.1.1"
dependencies:
readable-stream: ^2.3.3
safe-event-emitter: ^1.0.1
checksum: e3c1c25c4b46b25e3c5a577e751ad3cabe3f1a387b5a8f345618563cb0ca24bc26eb25f170cf7ccb1e2c36d759947861cca0debb913b672ddf352b0f8add4ecf
languageName: node
linkType: hard
"json-rpc-middleware-stream@npm:^4.2.0, json-rpc-middleware-stream@npm:^4.2.1": "json-rpc-middleware-stream@npm:^4.2.0, json-rpc-middleware-stream@npm:^4.2.1":
version: 4.2.1 version: 4.2.1
resolution: "json-rpc-middleware-stream@npm:4.2.1" resolution: "json-rpc-middleware-stream@npm:4.2.1"
@ -24370,7 +24360,7 @@ __metadata:
js-yaml: ^4.1.0 js-yaml: ^4.1.0
jsdom: ^11.2.0 jsdom: ^11.2.0
json-rpc-engine: ^6.1.0 json-rpc-engine: ^6.1.0
json-rpc-middleware-stream: ^2.1.1 json-rpc-middleware-stream: ^4.2.1
jsonschema: ^1.2.4 jsonschema: ^1.2.4
junit-report-merger: ^4.0.0 junit-report-merger: ^4.0.0
koa: ^2.7.0 koa: ^2.7.0