From e0fd4433e76ac444c3391466b92cddb4aaab4513 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Mon, 19 Dec 2022 16:15:00 +1100 Subject: [PATCH 1/3] fix: remove invalid re-export --- packages/core/CHANGELOG.md | 1 + packages/core/src/index.ts | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index c64b76e137..647169b986 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Missing dependency declarations. +- Invalid re-export. ## [@waku/core@0.0.7] - 2022-12-15 diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 427dac0d4e..e704ec4c40 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -14,11 +14,7 @@ export * as waku_filter from "./lib/filter/index.js"; export { wakuFilter } from "./lib/filter/index.js"; export * as waku_light_push from "./lib/light_push/index.js"; -export { - wakuLightPush, - LightPushCodec, - PushResponse, -} from "./lib/light_push/index.js"; +export { wakuLightPush, LightPushCodec } from "./lib/light_push/index.js"; export * as waku_relay from "./lib/relay/index.js"; export { wakuRelay } from "./lib/relay/index.js"; From e292855742c689b9b15e276b03f325900d10ae43 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Mon, 19 Dec 2022 16:16:41 +1100 Subject: [PATCH 2/3] fix: missing dependencies --- package-lock.json | 6 ++++++ packages/create/CHANGELOG.md | 4 ++++ packages/create/package.json | 3 +++ 3 files changed, 13 insertions(+) diff --git a/package-lock.json b/package-lock.json index 8c59fc7074..cc57bf0cff 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27215,6 +27215,8 @@ "@libp2p/interface-transport": "^2.0.1", "@libp2p/mplex": "^7.0.0", "@libp2p/websockets": "^5.0.0", + "@waku/core": "*", + "@waku/peer-exchange": "*", "interface-datastore": "^7.0.1" }, "devDependencies": { @@ -27223,6 +27225,7 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", + "@waku/interfaces": "*", "cspell": "^6.17.0", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", @@ -31299,6 +31302,9 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", + "@waku/core": "*", + "@waku/interfaces": "*", + "@waku/peer-exchange": "*", "cspell": "^6.17.0", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", diff --git a/packages/create/CHANGELOG.md b/packages/create/CHANGELOG.md index 906655db4e..564faae316 100644 --- a/packages/create/CHANGELOG.md +++ b/packages/create/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Fixed + +- Missing dependency declarations. + ## [0.0.5] - 2022-12-15 ### Changed diff --git a/packages/create/package.json b/packages/create/package.json index d97a8ecde2..f242c1ab34 100644 --- a/packages/create/package.json +++ b/packages/create/package.json @@ -67,6 +67,8 @@ "@libp2p/interface-transport": "^2.0.1", "@libp2p/mplex": "^7.0.0", "@libp2p/websockets": "^5.0.0", + "@waku/core": "*", + "@waku/peer-exchange": "*", "interface-datastore": "^7.0.1" }, "devDependencies": { @@ -75,6 +77,7 @@ "@rollup/plugin-node-resolve": "^13.3.0", "@typescript-eslint/eslint-plugin": "^5.8.1", "@typescript-eslint/parser": "^5.8.1", + "@waku/interfaces": "*", "cspell": "^6.17.0", "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", From 75c8e2be8d3ba659e9f00ae3cb46eb32663e9518 Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Mon, 19 Dec 2022 16:24:12 +1100 Subject: [PATCH 3/3] fix: incorrect `proto` import --- package-lock.json | 2 ++ packages/message-encryption/CHANGELOG.md | 1 + packages/message-encryption/package.json | 7 ++++--- packages/message-encryption/src/ecies.ts | 5 +++-- packages/message-encryption/src/symmetric.ts | 5 +++-- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/package-lock.json b/package-lock.json index cc57bf0cff..b3d5b88ab9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27397,6 +27397,7 @@ "@waku/byte-utils": "*", "@waku/core": "*", "@waku/interfaces": "*", + "@waku/proto": "*", "js-sha3": "^0.8.0" }, "devDependencies": { @@ -31449,6 +31450,7 @@ "@waku/byte-utils": "*", "@waku/core": "*", "@waku/interfaces": "*", + "@waku/proto": "*", "chai": "^4.3.6", "cspell": "^6.17.0", "eslint": "^8.6.0", diff --git a/packages/message-encryption/CHANGELOG.md b/packages/message-encryption/CHANGELOG.md index 356407e4ae..89996bcf66 100644 --- a/packages/message-encryption/CHANGELOG.md +++ b/packages/message-encryption/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Type resolution when using `moduleResolution: node`. +- Incorrect `proto` import. ## [0.0.5] - 2022-12-15 diff --git a/packages/message-encryption/package.json b/packages/message-encryption/package.json index 02ccb5527e..728e8bc283 100644 --- a/packages/message-encryption/package.json +++ b/packages/message-encryption/package.json @@ -75,12 +75,12 @@ "dependencies": { "@noble/secp256k1": "^1.3.4", "@waku/byte-utils": "*", + "@waku/core": "*", "@waku/interfaces": "*", - "js-sha3": "^0.8.0", - "@waku/core": "*" + "@waku/proto": "*", + "js-sha3": "^0.8.0" }, "devDependencies": { - "fast-check": "^2.14.0", "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-json": "^4.1.0", "@rollup/plugin-node-resolve": "^13.3.0", @@ -94,6 +94,7 @@ "eslint-plugin-functional": "^4.0.2", "eslint-plugin-import": "^2.25.3", "eslint-plugin-prettier": "^4.0.0", + "fast-check": "^2.14.0", "npm-run-all": "^4.1.5", "prettier": "^2.1.1", "rollup": "^2.75.0", diff --git a/packages/message-encryption/src/ecies.ts b/packages/message-encryption/src/ecies.ts index 1d0ac45a8e..f93f6fc38a 100644 --- a/packages/message-encryption/src/ecies.ts +++ b/packages/message-encryption/src/ecies.ts @@ -1,10 +1,11 @@ -import { Decoder as DecoderV0, proto } from "@waku/core/lib/message/version_0"; +import { Decoder as DecoderV0 } from "@waku/core/lib/message/version_0"; import type { IDecoder, IEncoder, IMessage, IProtoMessage, } from "@waku/interfaces"; +import { WakuMessage } from "@waku/proto"; import debug from "debug"; import { @@ -38,7 +39,7 @@ class Encoder implements IEncoder { const protoMessage = await this.toProtoObj(message); if (!protoMessage) return; - return proto.WakuMessage.encode(protoMessage); + return WakuMessage.encode(protoMessage); } async toProtoObj(message: IMessage): Promise { diff --git a/packages/message-encryption/src/symmetric.ts b/packages/message-encryption/src/symmetric.ts index e52d0a1273..3e2981af18 100644 --- a/packages/message-encryption/src/symmetric.ts +++ b/packages/message-encryption/src/symmetric.ts @@ -1,10 +1,11 @@ -import { Decoder as DecoderV0, proto } from "@waku/core/lib/message/version_0"; +import { Decoder as DecoderV0 } from "@waku/core/lib/message/version_0"; import type { IDecoder, IEncoder, IMessage, IProtoMessage, } from "@waku/interfaces"; +import { WakuMessage } from "@waku/proto"; import debug from "debug"; import { @@ -37,7 +38,7 @@ class Encoder implements IEncoder { const protoMessage = await this.toProtoObj(message); if (!protoMessage) return; - return proto.WakuMessage.encode(protoMessage); + return WakuMessage.encode(protoMessage); } async toProtoObj(message: IMessage): Promise {