From f90345dad206b86bc4717714fb57eee4fafa1295 Mon Sep 17 00:00:00 2001 From: Danish Arora Date: Thu, 10 Oct 2024 14:30:54 +0530 Subject: [PATCH] chore: update polyfills --- .release-please-manifest.json | 3 +- package-lock.json | 5 +++ packages/core/package.json | 3 +- packages/core/src/index.ts | 2 + packages/custom-event-polyfill/package.json | 43 --------------------- packages/discovery/package.json | 3 +- packages/discovery/src/index.ts | 2 + packages/relay/package.json | 3 +- packages/relay/src/index.ts | 1 + packages/sdk/package.json | 3 +- packages/sdk/src/index.ts | 2 + packages/tests/src/utils/index.ts | 1 + packages/utils/package.json | 3 +- release-please-config.json | 3 +- 14 files changed, 27 insertions(+), 50 deletions(-) delete mode 100644 packages/custom-event-polyfill/package.json diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 776ec63ae9..34d6e42f6b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -9,5 +9,6 @@ "packages/relay": "0.0.15", "packages/sdk": "0.0.28", "packages/discovery": "0.0.5", - "packages/react-native-polyfills": "0.0.1" + "packages/react-native-polyfills": "0.0.1", + "packages/custom-event-polyfill": "0.0.1" } diff --git a/package-lock.json b/package-lock.json index 9e48d2df55..f5d383c028 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39086,6 +39086,7 @@ "license": "MIT OR Apache-2.0", "dependencies": { "@libp2p/ping": "^1.1.2", + "@waku/custom-event-polyfill": "0.0.1", "@waku/enr": "^0.0.26", "@waku/interfaces": "0.0.27", "@waku/proto": "0.0.8", @@ -39161,6 +39162,7 @@ "license": "MIT OR Apache-2.0", "dependencies": { "@waku/core": "0.0.32", + "@waku/custom-event-polyfill": "0.0.1", "@waku/enr": "0.0.26", "@waku/interfaces": "0.0.27", "@waku/proto": "^0.0.8", @@ -39377,6 +39379,7 @@ "@chainsafe/libp2p-gossipsub": "^13.1.0", "@noble/hashes": "^1.3.2", "@waku/core": "0.0.32", + "@waku/custom-event-polyfill": "0.0.1", "@waku/interfaces": "0.0.27", "@waku/proto": "0.0.8", "@waku/sdk": "0.0.28", @@ -39418,6 +39421,7 @@ "@libp2p/websockets": "^8.1.4", "@noble/hashes": "^1.3.3", "@waku/core": "0.0.32", + "@waku/custom-event-polyfill": "0.0.1", "@waku/discovery": "0.0.5", "@waku/interfaces": "0.0.27", "@waku/message-hash": "0.1.16", @@ -39508,6 +39512,7 @@ "license": "MIT OR Apache-2.0", "dependencies": { "@noble/hashes": "^1.3.2", + "@waku/custom-event-polyfill": "0.0.1", "@waku/interfaces": "0.0.27", "chai": "^4.3.10", "debug": "^4.3.4", diff --git a/packages/core/package.json b/packages/core/package.json index b7f8e7d471..67130803af 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -78,7 +78,8 @@ "it-length-prefixed": "^9.0.4", "it-pipe": "^3.0.1", "uint8arraylist": "^2.4.3", - "uuid": "^9.0.0" + "uuid": "^9.0.0", + "@waku/custom-event-polyfill": "0.0.1" }, "devDependencies": { "@multiformats/multiaddr": "^12.0.0", diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 9b4acf2eae..0abc0b1e5b 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,3 +1,5 @@ +import "@waku/custom-event-polyfill"; + export { createEncoder, createDecoder } from "./lib/message/version_0.js"; export type { Encoder, diff --git a/packages/custom-event-polyfill/package.json b/packages/custom-event-polyfill/package.json deleted file mode 100644 index bdcec1b42f..0000000000 --- a/packages/custom-event-polyfill/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "@waku/custom-event-polyfill", - "version": "0.0.1", - "description": "CustomEvent polyfill for environments that don't support it natively", - "module": "./dist/index.js", - "exports": { - ".": "./dist/index.js" - }, - "type": "module", - "homepage": "https://github.com/waku-org/js-waku/tree/master/packages/custom-event-polyfill#readme", - "repository": { - "type": "git", - "url": "https://github.com/waku-org/js-waku.git" - }, - "bugs": { - "url": "https://github.com/waku-org/js-waku/issues" - }, - "license": "MIT OR Apache-2.0", - "keywords": [ - "waku", - "custom-event", - "polyfill", - "web3" - ], - "scripts": { - "build": "tsc", - "check": "run-s check:*", - "check:tsc": "tsc -p tsconfig.dev.json", - "check:spelling": "cspell \"{README.md,src/**/*.ts}\"", - "prepublish": "npm run build" - }, - "engines": { - "node": ">=18" - }, - "files": [ - "dist", - "src/**/*.ts", - "!**/*.json", - "CHANGELOG.md", - "LICENSE", - "README.md" - ] -} diff --git a/packages/discovery/package.json b/packages/discovery/package.json index 1541377cb1..62296b02ba 100644 --- a/packages/discovery/package.json +++ b/packages/discovery/package.json @@ -59,7 +59,8 @@ "debug": "^4.3.4", "dns-query": "^0.11.2", "hi-base32": "^0.5.1", - "uint8arrays": "^5.0.1" + "uint8arrays": "^5.0.1", + "@waku/custom-event-polyfill": "0.0.1" }, "devDependencies": { "@libp2p/peer-id": "^4.2.1", diff --git a/packages/discovery/src/index.ts b/packages/discovery/src/index.ts index eb9ba8ea2c..7c57fffaf6 100644 --- a/packages/discovery/src/index.ts +++ b/packages/discovery/src/index.ts @@ -1,3 +1,5 @@ +import "@waku/custom-event-polyfill"; + // DNS Discovery export { PeerDiscoveryDns, wakuDnsDiscovery } from "./dns/dns_discovery.js"; export { enrTree } from "./dns/constants.js"; diff --git a/packages/relay/package.json b/packages/relay/package.json index 1d25d68454..3edb09eddc 100644 --- a/packages/relay/package.json +++ b/packages/relay/package.json @@ -59,7 +59,8 @@ "chai": "^4.3.10", "debug": "^4.3.4", "fast-check": "^3.19.0", - "p-event": "^6.0.1" + "p-event": "^6.0.1", + "@waku/custom-event-polyfill": "0.0.1" }, "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7", diff --git a/packages/relay/src/index.ts b/packages/relay/src/index.ts index be614733b9..1855a19ceb 100644 --- a/packages/relay/src/index.ts +++ b/packages/relay/src/index.ts @@ -1,2 +1,3 @@ +import "@waku/custom-event-polyfill"; export * from "./relay.js"; export * from "./create.js"; diff --git a/packages/sdk/package.json b/packages/sdk/package.json index 75fb159f91..0a3b642780 100644 --- a/packages/sdk/package.json +++ b/packages/sdk/package.json @@ -73,7 +73,8 @@ "@waku/proto": "^0.0.8", "@waku/utils": "0.0.20", "@waku/message-hash": "0.1.16", - "libp2p": "^1.8.1" + "libp2p": "^1.8.1", + "@waku/custom-event-polyfill": "0.0.1" }, "devDependencies": { "@types/mocha": "^10.0.6", diff --git a/packages/sdk/src/index.ts b/packages/sdk/src/index.ts index 4bf636e6b1..923c5d7607 100644 --- a/packages/sdk/src/index.ts +++ b/packages/sdk/src/index.ts @@ -1,3 +1,5 @@ +import "@waku/custom-event-polyfill"; + export { createEncoder, createDecoder } from "@waku/core"; export { DecodedMessage, diff --git a/packages/tests/src/utils/index.ts b/packages/tests/src/utils/index.ts index 1347e2d7e9..6dcd08f5c1 100644 --- a/packages/tests/src/utils/index.ts +++ b/packages/tests/src/utils/index.ts @@ -1,3 +1,4 @@ +import "@waku/custom-event-polyfill"; export * from "./generate_test_data.js"; export * from "./teardown.js"; export * from "./random_array.js"; diff --git a/packages/utils/package.json b/packages/utils/package.json index e403ba1657..fa75abe290 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -71,7 +71,8 @@ "@waku/interfaces": "0.0.27", "chai": "^4.3.10", "debug": "^4.3.4", - "uint8arrays": "^5.0.1" + "uint8arrays": "^5.0.1", + "@waku/custom-event-polyfill": "0.0.1" }, "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7", diff --git a/release-please-config.json b/release-please-config.json index 35ca5c7ebd..7ca81d36af 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -22,6 +22,7 @@ "packages/sdk": {}, "packages/relay": {}, "packages/discovery": {}, - "packages/react-native-polyfills": {} + "packages/react-native-polyfills": {}, + "packages/custom-event-polyfill": {} } } \ No newline at end of file