From df8e68ff36fddb53325b4ec4750b4a5dfd9f869a Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 6 May 2023 03:31:15 +0000 Subject: [PATCH] chore(deps)(deps): bump it-length-prefixed from 8.0.4 to 9.0.1 Bumps [it-length-prefixed](https://github.com/alanshaw/it-length-prefixed) from 8.0.4 to 9.0.1. - [Release notes](https://github.com/alanshaw/it-length-prefixed/releases) - [Changelog](https://github.com/alanshaw/it-length-prefixed/blob/master/CHANGELOG.md) - [Commits](https://github.com/alanshaw/it-length-prefixed/compare/v8.0.4...v9.0.1) --- updated-dependencies: - dependency-name: it-length-prefixed dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package-lock.json | 222 ++++++++++++++++-- packages/core/package.json | 2 +- packages/core/src/lib/filter/index.ts | 8 +- packages/core/src/lib/light_push/index.ts | 4 +- packages/core/src/lib/store/index.ts | 4 +- packages/peer-exchange/package.json | 2 +- .../peer-exchange/src/waku_peer_exchange.ts | 4 +- 7 files changed, 220 insertions(+), 26 deletions(-) diff --git a/package-lock.json b/package-lock.json index e12185721f..032bced654 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,9 @@ "packages/utils", "packages/proto", "packages/interfaces", - "packages/message-hash", "packages/enr", "packages/core", + "packages/message-hash", "packages/peer-exchange", "packages/dns-discovery", "packages/message-encryption", @@ -1475,6 +1475,22 @@ "npm": ">=8.7.0" } }, + "node_modules/@chainsafe/libp2p-gossipsub/node_modules/it-length-prefixed": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", + "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "dependencies": { + "err-code": "^3.0.1", + "it-stream-types": "^1.0.4", + "uint8-varint": "^1.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, "node_modules/@chainsafe/libp2p-noise": { "version": "11.0.1", "resolved": "https://registry.npmjs.org/@chainsafe/libp2p-noise/-/libp2p-noise-11.0.1.tgz", @@ -1505,6 +1521,22 @@ "npm": ">=7.0.0" } }, + "node_modules/@chainsafe/libp2p-noise/node_modules/it-length-prefixed": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", + "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "dependencies": { + "err-code": "^3.0.1", + "it-stream-types": "^1.0.4", + "uint8-varint": "^1.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, "node_modules/@chainsafe/netmask": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/@chainsafe/netmask/-/netmask-2.0.0.tgz", @@ -3412,6 +3444,22 @@ "npm": ">=7.0.0" } }, + "node_modules/@libp2p/multistream-select/node_modules/it-length-prefixed": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", + "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "dependencies": { + "err-code": "^3.0.1", + "it-stream-types": "^1.0.4", + "uint8-varint": "^1.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, "node_modules/@libp2p/peer-collections": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@libp2p/peer-collections/-/peer-collections-3.0.0.tgz", @@ -3699,6 +3747,22 @@ "npm": ">=7.0.0" } }, + "node_modules/@libp2p/pubsub/node_modules/it-length-prefixed": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", + "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "dependencies": { + "err-code": "^3.0.1", + "it-stream-types": "^1.0.4", + "uint8-varint": "^1.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, "node_modules/@libp2p/topology": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/@libp2p/topology/-/topology-4.0.1.tgz", @@ -14373,12 +14437,12 @@ } }, "node_modules/it-length-prefixed": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", - "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-9.0.1.tgz", + "integrity": "sha512-ZBD8ZFLERj8d1q9CeBtk0eJ4EpeI3qwnkmWtemBSm3ZI2dM8PUweNVk5haZ2vw3EIq2uYQiabV9YwNm6EASM4A==", "dependencies": { "err-code": "^3.0.1", - "it-stream-types": "^1.0.4", + "it-stream-types": "^2.0.1", "uint8-varint": "^1.0.1", "uint8arraylist": "^2.0.0", "uint8arrays": "^4.0.2" @@ -14388,6 +14452,15 @@ "npm": ">=7.0.0" } }, + "node_modules/it-length-prefixed/node_modules/it-stream-types": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.1.tgz", + "integrity": "sha512-6DmOs5r7ERDbvS4q8yLKENcj6Yecr7QQTqWApbZdfAUTEC947d+PEha7PCqhm//9oxaLYL7TWRekwhoXl2s6fg==", + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, "node_modules/it-map": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/it-map/-/it-map-2.0.1.tgz", @@ -14437,6 +14510,22 @@ "npm": ">=7.0.0" } }, + "node_modules/it-pb-stream/node_modules/it-length-prefixed": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", + "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "dependencies": { + "err-code": "^3.0.1", + "it-stream-types": "^1.0.4", + "uint8-varint": "^1.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, "node_modules/it-pipe": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/it-pipe/-/it-pipe-2.0.5.tgz", @@ -15169,6 +15258,22 @@ "npm": ">=7.0.0" } }, + "node_modules/libp2p/node_modules/it-length-prefixed": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", + "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "dependencies": { + "err-code": "^3.0.1", + "it-stream-types": "^1.0.4", + "uint8-varint": "^1.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + }, + "engines": { + "node": ">=16.0.0", + "npm": ">=7.0.0" + } + }, "node_modules/lilconfig": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", @@ -29182,7 +29287,7 @@ "@waku/utils": "0.0.4", "debug": "^4.3.4", "it-all": "^3.0.1", - "it-length-prefixed": "^8.0.4", + "it-length-prefixed": "^9.0.1", "it-pipe": "^2.0.5", "p-event": "^5.0.1", "uint8arraylist": "^2.4.3", @@ -29594,7 +29699,7 @@ }, "packages/message-hash": { "name": "@waku/message-hash", - "version": "0.0.10", + "version": "0.1.0", "license": "MIT OR Apache-2.0", "dependencies": { "@noble/hashes": "^1.2.0", @@ -29653,7 +29758,7 @@ "@waku/utils": "0.0.4", "debug": "^4.3.4", "it-all": "^3.0.1", - "it-length-prefixed": "^8.0.4", + "it-length-prefixed": "^9.0.1", "it-pipe": "^2.0.5" }, "devDependencies": { @@ -30880,6 +30985,20 @@ "protobufjs": "^6.11.2", "uint8arraylist": "^2.3.2", "uint8arrays": "^4.0.2" + }, + "dependencies": { + "it-length-prefixed": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", + "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "requires": { + "err-code": "^3.0.1", + "it-stream-types": "^1.0.4", + "uint8-varint": "^1.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + } + } } }, "@chainsafe/libp2p-noise": { @@ -30906,6 +31025,20 @@ "protons-runtime": "^4.0.1", "uint8arraylist": "^2.3.2", "uint8arrays": "^4.0.2" + }, + "dependencies": { + "it-length-prefixed": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", + "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "requires": { + "err-code": "^3.0.1", + "it-stream-types": "^1.0.4", + "uint8-varint": "^1.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + } + } } }, "@chainsafe/netmask": { @@ -32304,6 +32437,20 @@ "p-defer": "^4.0.0", "uint8arraylist": "^2.3.1", "uint8arrays": "^4.0.2" + }, + "dependencies": { + "it-length-prefixed": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", + "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "requires": { + "err-code": "^3.0.1", + "it-stream-types": "^1.0.4", + "uint8-varint": "^1.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + } + } } }, "@libp2p/peer-collections": { @@ -32532,6 +32679,20 @@ "p-queue": "^7.2.0", "uint8arraylist": "^2.0.0", "uint8arrays": "^4.0.2" + }, + "dependencies": { + "it-length-prefixed": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", + "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "requires": { + "err-code": "^3.0.1", + "it-stream-types": "^1.0.4", + "uint8-varint": "^1.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + } + } } }, "@libp2p/topology": { @@ -34409,7 +34570,7 @@ "ignore-loader": "^0.1.2", "isomorphic-fetch": "^3.0.0", "it-all": "^3.0.1", - "it-length-prefixed": "^8.0.4", + "it-length-prefixed": "^9.0.1", "it-pipe": "^2.0.5", "karma": "^6.4.1", "karma-chrome-launcher": "^3.1.1", @@ -34798,7 +34959,7 @@ "eslint-plugin-import": "^2.27.5", "eslint-plugin-prettier": "^4.2.1", "it-all": "^3.0.1", - "it-length-prefixed": "^8.0.4", + "it-length-prefixed": "^9.0.1", "it-pipe": "^2.0.5", "npm-run-all": "^4.1.5", "prettier": "^2.8.8", @@ -40988,15 +41149,22 @@ } }, "it-length-prefixed": { - "version": "8.0.4", - "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", - "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-9.0.1.tgz", + "integrity": "sha512-ZBD8ZFLERj8d1q9CeBtk0eJ4EpeI3qwnkmWtemBSm3ZI2dM8PUweNVk5haZ2vw3EIq2uYQiabV9YwNm6EASM4A==", "requires": { "err-code": "^3.0.1", - "it-stream-types": "^1.0.4", + "it-stream-types": "^2.0.1", "uint8-varint": "^1.0.1", "uint8arraylist": "^2.0.0", "uint8arrays": "^4.0.2" + }, + "dependencies": { + "it-stream-types": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/it-stream-types/-/it-stream-types-2.0.1.tgz", + "integrity": "sha512-6DmOs5r7ERDbvS4q8yLKENcj6Yecr7QQTqWApbZdfAUTEC947d+PEha7PCqhm//9oxaLYL7TWRekwhoXl2s6fg==" + } } }, "it-map": { @@ -41030,6 +41198,20 @@ "it-length-prefixed": "^8.0.2", "it-stream-types": "^1.0.4", "uint8arraylist": "^2.0.0" + }, + "dependencies": { + "it-length-prefixed": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", + "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "requires": { + "err-code": "^3.0.1", + "it-stream-types": "^1.0.4", + "uint8-varint": "^1.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + } + } } }, "it-pipe": { @@ -41599,6 +41781,18 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/it-all/-/it-all-2.0.1.tgz", "integrity": "sha512-9UuJcCRZsboz+HBQTNOau80Dw+ryGaHYFP/cPYzFBJBFcfDathMYnhHk4t52en9+fcyDGPTdLB+lFc1wzQIroA==" + }, + "it-length-prefixed": { + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/it-length-prefixed/-/it-length-prefixed-8.0.4.tgz", + "integrity": "sha512-5OJ1lxH+IaqJB7lxe8IAIwt9UfSfsmjKJoAI/RO9djYoBDt1Jfy9PeVHUmOfqhqyu/4kJvWBFAJUaG1HhLQ12A==", + "requires": { + "err-code": "^3.0.1", + "it-stream-types": "^1.0.4", + "uint8-varint": "^1.0.1", + "uint8arraylist": "^2.0.0", + "uint8arrays": "^4.0.2" + } } } }, diff --git a/packages/core/package.json b/packages/core/package.json index c0a3ac514c..30e03c9935 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -82,7 +82,7 @@ "@waku/utils": "0.0.4", "debug": "^4.3.4", "it-all": "^3.0.1", - "it-length-prefixed": "^8.0.4", + "it-length-prefixed": "^9.0.1", "it-pipe": "^2.0.5", "p-event": "^5.0.1", "uint8arraylist": "^2.4.3", diff --git a/packages/core/src/lib/filter/index.ts b/packages/core/src/lib/filter/index.ts index 2c36851449..0a03989ffb 100644 --- a/packages/core/src/lib/filter/index.ts +++ b/packages/core/src/lib/filter/index.ts @@ -92,9 +92,9 @@ class Filter extends BaseProtocol implements IFilter { try { const res = await pipe( [request.encode()], - lp.encode(), + lp.encode, stream, - lp.decode(), + lp.decode, async (source) => await all(source) ); @@ -143,7 +143,7 @@ class Filter extends BaseProtocol implements IFilter { private onRequest(streamData: IncomingStreamData): void { log("Receiving message push"); try { - pipe(streamData.stream, lp.decode(), async (source) => { + pipe(streamData.stream, lp.decode, async (source) => { for await (const bytes of source) { const res = FilterRpc.decode(bytes.slice()); if (res.requestId && res.push?.messages?.length) { @@ -225,7 +225,7 @@ class Filter extends BaseProtocol implements IFilter { const stream = await this.newStream(peer); try { - await pipe([unsubscribeRequest.encode()], lp.encode(), stream.sink); + await pipe([unsubscribeRequest.encode()], lp.encode, stream.sink); } catch (e) { log("Error unsubscribing", e); throw e; diff --git a/packages/core/src/lib/light_push/index.ts b/packages/core/src/lib/light_push/index.ts index 52c6fb18fe..2f28f8ab8e 100644 --- a/packages/core/src/lib/light_push/index.ts +++ b/packages/core/src/lib/light_push/index.ts @@ -57,9 +57,9 @@ class LightPush extends BaseProtocol implements ILightPush { const query = PushRpc.createRequest(protoMessage, pubSubTopic); const res = await pipe( [query.encode()], - lp.encode(), + lp.encode, stream, - lp.decode(), + lp.decode, async (source) => await all(source) ); try { diff --git a/packages/core/src/lib/store/index.ts b/packages/core/src/lib/store/index.ts index e02f5ee535..2ab9f1ccf8 100644 --- a/packages/core/src/lib/store/index.ts +++ b/packages/core/src/lib/store/index.ts @@ -274,9 +274,9 @@ async function* paginate( const res = await pipe( [historyRpcQuery.encode()], - lp.encode(), + lp.encode, stream, - lp.decode(), + lp.decode, async (source) => await all(source) ); diff --git a/packages/peer-exchange/package.json b/packages/peer-exchange/package.json index e026e4b5b8..28917007c2 100644 --- a/packages/peer-exchange/package.json +++ b/packages/peer-exchange/package.json @@ -56,7 +56,7 @@ "@waku/utils": "0.0.4", "debug": "^4.3.4", "it-all": "^3.0.1", - "it-length-prefixed": "^8.0.4", + "it-length-prefixed": "^9.0.1", "it-pipe": "^2.0.5" }, "devDependencies": { diff --git a/packages/peer-exchange/src/waku_peer_exchange.ts b/packages/peer-exchange/src/waku_peer_exchange.ts index 2548180774..a891d148b5 100644 --- a/packages/peer-exchange/src/waku_peer_exchange.ts +++ b/packages/peer-exchange/src/waku_peer_exchange.ts @@ -63,9 +63,9 @@ export class WakuPeerExchange extends BaseProtocol implements IPeerExchange { const res = await pipe( [rpcQuery.encode()], - lp.encode(), + lp.encode, stream, - lp.decode(), + lp.decode, async (source) => await all(source) );