diff --git a/package-lock.json b/package-lock.json index aba730c2b7..ff0c1ce6f2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -21837,7 +21837,7 @@ }, "packages/core": { "name": "@waku/core", - "version": "0.0.5", + "version": "0.0.6", "license": "MIT OR Apache-2.0", "dependencies": { "@chainsafe/libp2p-gossipsub": "^5.2.1", @@ -21863,7 +21863,7 @@ "protons-runtime": "^3.1.0", "uint8arraylist": "^2.3.2", "uint8arrays": "^4.0.2", - "uuid": "^8.3.2" + "uuid": "^9.0.0" }, "devDependencies": { "@rollup/plugin-commonjs": "^22.0.0", @@ -21913,11 +21913,27 @@ }, "engines": { "node": ">=16" + }, + "peerDependencies": { + "@multiformats/multiaddr": "^11.0.6" + }, + "peerDependenciesMeta": { + "@multiformats/multiaddr": { + "optional": true + } + } + }, + "packages/core/node_modules/uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "bin": { + "uuid": "dist/bin/uuid" } }, "packages/create": { "name": "@waku/create", - "version": "0.0.3", + "version": "0.0.4", "license": "MIT OR Apache-2.0", "dependencies": { "@chainsafe/libp2p-noise": "^10.1.0", @@ -22033,7 +22049,7 @@ }, "packages/interfaces": { "name": "@waku/interfaces", - "version": "0.0.4", + "version": "0.0.5", "license": "MIT OR Apache-2.0", "dependencies": { "@chainsafe/libp2p-gossipsub": "^5.2.1", @@ -22063,7 +22079,7 @@ }, "packages/message-encryption": { "name": "@waku/message-encryption", - "version": "0.0.3", + "version": "0.0.4", "license": "MIT OR Apache-2.0", "dependencies": { "@noble/secp256k1": "^1.3.4", @@ -26144,7 +26160,14 @@ "typescript": "^4.6.3", "uint8arraylist": "^2.3.2", "uint8arrays": "^4.0.2", - "uuid": "^8.3.2" + "uuid": "^9.0.0" + }, + "dependencies": { + "uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" + } } }, "@waku/create": { diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index e4cffa6b22..3f3fe3e0e8 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -9,6 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added +- Add `@multiformats/multiaddr` as peer dependency. + +## @waku/core [0.0.6](https://github.com/waku-org/js-waku/compare/@waku/core@0.0.5...@waku/core@0.0.6) (2022-11-18) + +### Added + - Waku Message `ephemeral` field to mark messages as do-not-store. ### Changed diff --git a/packages/core/package.json b/packages/core/package.json index 6d6b9a5ddd..2ff0fa38a9 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@waku/core", - "version": "0.0.5", + "version": "0.0.6", "description": "TypeScript implementation of the Waku v2 protocol", "types": "./dist/index.d.ts", "module": "./dist/index.js", @@ -105,7 +105,7 @@ "protons-runtime": "^3.1.0", "uint8arraylist": "^2.3.2", "uint8arrays": "^4.0.2", - "uuid": "^8.3.2" + "uuid": "^9.0.0" }, "devDependencies": { "@rollup/plugin-commonjs": "^22.0.0", @@ -153,6 +153,14 @@ "ts-node": "^10.9.1", "typescript": "^4.6.3" }, + "peerDependencies": { + "@multiformats/multiaddr": "^11.0.6" + }, + "peerDependenciesMeta": { + "@multiformats/multiaddr": { + "optional": true + } + }, "typedoc": { "entryPoint": "./src/index.ts" }, diff --git a/packages/create/package.json b/packages/create/package.json index 2d44fc7f86..208bb81cda 100644 --- a/packages/create/package.json +++ b/packages/create/package.json @@ -1,6 +1,6 @@ { "name": "@waku/create", - "version": "0.0.3", + "version": "0.0.4", "description": "Easily create a Waku node", "types": "./dist/index.d.ts", "module": "./dist/index.js", diff --git a/packages/interfaces/package.json b/packages/interfaces/package.json index 696954ab28..4f3c6df181 100644 --- a/packages/interfaces/package.json +++ b/packages/interfaces/package.json @@ -1,6 +1,6 @@ { "name": "@waku/interfaces", - "version": "0.0.4", + "version": "0.0.5", "description": "Definition of Waku interfaces", "types": "./dist/index.d.ts", "module": "./dist/index.js", diff --git a/packages/message-encryption/package.json b/packages/message-encryption/package.json index a5396cc930..22ff21bd38 100644 --- a/packages/message-encryption/package.json +++ b/packages/message-encryption/package.json @@ -1,6 +1,6 @@ { "name": "@waku/message-encryption", - "version": "0.0.3", + "version": "0.0.4", "description": "Waku Message Payload Encryption", "types": "./dist/index.d.ts", "module": "./dist/index.js", diff --git a/packages/tests/tests/ephemeral.node.spec.ts b/packages/tests/tests/ephemeral.node.spec.ts index 7526c27ca6..408906a33a 100644 --- a/packages/tests/tests/ephemeral.node.spec.ts +++ b/packages/tests/tests/ephemeral.node.spec.ts @@ -1,7 +1,7 @@ import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils"; import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer"; import { DecoderV0, EncoderV0 } from "@waku/core/lib/waku_message/version_0"; -import { createFullNode, createLightNode } from "@waku/create"; +import { createLightNode } from "@waku/create"; import { DecodedMessage, Protocols, WakuLight } from "@waku/interfaces"; import { AsymDecoder, @@ -83,10 +83,10 @@ describe("Waku Message Ephemeral field", () => { const symDecoder = new SymDecoder(SymContentTopic, symKey); const [waku1, waku2, nimWakuMultiaddr] = await Promise.all([ - createFullNode({ + createLightNode({ staticNoiseKey: NOISE_KEY_1, }).then((waku) => waku.start().then(() => waku)), - createFullNode({ + createLightNode({ staticNoiseKey: NOISE_KEY_2, }).then((waku) => waku.start().then(() => waku)), nwaku.getMultiaddrWithId(), diff --git a/packages/tests/tests/filter.node.spec.ts b/packages/tests/tests/filter.node.spec.ts index f9a62f9663..514250d39b 100644 --- a/packages/tests/tests/filter.node.spec.ts +++ b/packages/tests/tests/filter.node.spec.ts @@ -1,8 +1,8 @@ import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils"; import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer"; import { DecoderV0, EncoderV0 } from "@waku/core/lib/waku_message/version_0"; -import { createFullNode } from "@waku/create"; -import type { DecodedMessage, WakuFull } from "@waku/interfaces"; +import { createLightNode } from "@waku/create"; +import type { DecodedMessage, WakuLight } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces"; import { expect } from "chai"; import debug from "debug"; @@ -17,7 +17,7 @@ const TestEncoder = new EncoderV0(TestContentTopic); const TestDecoder = new DecoderV0(TestContentTopic); describe("Waku Filter", () => { - let waku: WakuFull; + let waku: WakuLight; let nwaku: Nwaku; afterEach(async function () { @@ -29,7 +29,7 @@ describe("Waku Filter", () => { this.timeout(15000); nwaku = new Nwaku(makeLogFileName(this)); await nwaku.start({ filter: true, lightpush: true }); - waku = await createFullNode({ + waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, libp2p: { addresses: { listen: ["/ip4/0.0.0.0/tcp/0/ws"] } }, }); diff --git a/packages/tests/tests/light_push.node.spec.ts b/packages/tests/tests/light_push.node.spec.ts index 3fbb0d6807..e06fb2d3df 100644 --- a/packages/tests/tests/light_push.node.spec.ts +++ b/packages/tests/tests/light_push.node.spec.ts @@ -1,8 +1,8 @@ import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils"; import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer"; import { EncoderV0 } from "@waku/core/lib/waku_message/version_0"; -import { createFullNode } from "@waku/create"; -import type { WakuFull } from "@waku/interfaces"; +import { createLightNode } from "@waku/create"; +import type { WakuLight } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces"; import { expect } from "chai"; import debug from "debug"; @@ -21,7 +21,7 @@ const TestContentTopic = "/test/1/waku-light-push/utf8"; const TestEncoder = new EncoderV0(TestContentTopic); describe("Waku Light Push [node only]", () => { - let waku: WakuFull; + let waku: WakuLight; let nwaku: Nwaku; afterEach(async function () { @@ -35,7 +35,7 @@ describe("Waku Light Push [node only]", () => { nwaku = new Nwaku(makeLogFileName(this)); await nwaku.start({ lightpush: true }); - waku = await createFullNode({ + waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, }); await waku.start(); @@ -68,7 +68,7 @@ describe("Waku Light Push [node only]", () => { nwaku = new Nwaku(makeLogFileName(this)); await nwaku.start({ lightpush: true, topics: customPubSubTopic }); - waku = await createFullNode({ + waku = await createLightNode({ pubSubTopic: customPubSubTopic, staticNoiseKey: NOISE_KEY_1, }); diff --git a/packages/tests/tests/store.node.spec.ts b/packages/tests/tests/store.node.spec.ts index 5b4b653bb2..04db791a0d 100644 --- a/packages/tests/tests/store.node.spec.ts +++ b/packages/tests/tests/store.node.spec.ts @@ -2,8 +2,8 @@ import { bytesToUtf8, utf8ToBytes } from "@waku/byte-utils"; import { createCursor, PageDirection } from "@waku/core"; import { waitForRemotePeer } from "@waku/core/lib/wait_for_remote_peer"; import { DecoderV0, EncoderV0 } from "@waku/core/lib/waku_message/version_0"; -import { createFullNode } from "@waku/create"; -import { DecodedMessage, Message, WakuFull } from "@waku/interfaces"; +import { createLightNode } from "@waku/create"; +import { DecodedMessage, Message, WakuLight } from "@waku/interfaces"; import { Protocols } from "@waku/interfaces"; import { AsymDecoder, @@ -27,7 +27,7 @@ const TestEncoder = new EncoderV0(TestContentTopic); const TestDecoder = new DecoderV0(TestContentTopic); describe("Waku Store", () => { - let waku: WakuFull; + let waku: WakuLight; let nwaku: Nwaku; beforeEach(async function () { @@ -56,7 +56,7 @@ describe("Waku Store", () => { ).to.be.true; } - waku = await createFullNode({ + waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, }); await waku.start(); @@ -87,7 +87,7 @@ describe("Waku Store", () => { it("Generator, no message returned", async function () { this.timeout(15_000); - waku = await createFullNode({ + waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, }); await waku.start(); @@ -126,7 +126,7 @@ describe("Waku Store", () => { ).to.be.true; } - waku = await createFullNode({ + waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, }); await waku.start(); @@ -183,7 +183,7 @@ describe("Waku Store", () => { ).to.be.true; } - waku = await createFullNode({ + waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, }); await waku.start(); @@ -224,7 +224,7 @@ describe("Waku Store", () => { ).to.be.true; } - waku = await createFullNode({ + waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, }); await waku.start(); @@ -264,7 +264,7 @@ describe("Waku Store", () => { await delay(1); // to ensure each timestamp is unique. } - waku = await createFullNode({ + waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, }); await waku.start(); @@ -303,7 +303,7 @@ describe("Waku Store", () => { await delay(1); // to ensure each timestamp is unique. } - waku = await createFullNode({ + waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, }); await waku.start(); @@ -372,10 +372,10 @@ describe("Waku Store", () => { const symDecoder = new SymDecoder(symTopic, symKey); const [waku1, waku2, nimWakuMultiaddr] = await Promise.all([ - createFullNode({ + createLightNode({ staticNoiseKey: NOISE_KEY_1, }).then((waku) => waku.start().then(() => waku)), - createFullNode({ + createLightNode({ staticNoiseKey: NOISE_KEY_2, }).then((waku) => waku.start().then(() => waku)), nwaku.getMultiaddrWithId(), @@ -462,7 +462,7 @@ describe("Waku Store", () => { ).to.be.true; } - waku = await createFullNode({ + waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, }); await waku.start(); @@ -524,7 +524,7 @@ describe("Waku Store", () => { await delay(1); // to ensure each timestamp is unique. } - waku = await createFullNode({ + waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, }); await waku.start(); @@ -548,7 +548,7 @@ describe("Waku Store", () => { describe("Waku Store, custom pubsub topic", () => { const customPubSubTopic = "/waku/2/custom-dapp/proto"; - let waku: WakuFull; + let waku: WakuLight; let nwaku: Nwaku; beforeEach(async function () { @@ -581,7 +581,7 @@ describe("Waku Store, custom pubsub topic", () => { ).to.be.true; } - waku = await createFullNode({ + waku = await createLightNode({ staticNoiseKey: NOISE_KEY_1, pubSubTopic: customPubSubTopic, });