Merge branch 'master' into danisharora/improve-cursor-api

This commit is contained in:
Danish Arora 2022-11-21 17:56:18 +05:30 committed by GitHub
commit 2215e44985
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 76 additions and 39 deletions

35
package-lock.json generated
View File

@ -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": {

View File

@ -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

View File

@ -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"
},

View File

@ -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",

View File

@ -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",

View File

@ -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",

View File

@ -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(),

View File

@ -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"] } },
});

View File

@ -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,
});

View File

@ -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,
});