From e2ab0b8e91b850dfb188c7b0b9106aacce814ab0 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 31 Jan 2023 05:43:29 -0500 Subject: [PATCH] *Switch to eventemitter2 --- package.json | 1 + pnpm-lock.yaml | 6 ++++++ src/index.ts | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 5a36a4c..1f081d6 100644 --- a/package.json +++ b/package.json @@ -18,6 +18,7 @@ "@hyperswarm/dht-relay": "^0.3.0", "@lumeweb/kernel-peer-discovery-client": "git+https://git.lumeweb.com/LumeWeb/kernel-peer-discovery-client.git", "@lumeweb/libkernel-universal": "git+https://git.lumeweb.com/LumeWeb/libkernel-universal.git", + "eventemitter2": "^6.4.9", "hyperswarm": "^4.3.7" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7daead0..a01307f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,7 @@ specifiers: '@types/random-number-csprng': ^1.0.0 '@types/ws': ^8.5.4 esbuild: ^0.14.54 + eventemitter2: ^6.4.9 hyperswarm: ^4.3.7 prettier: ^2.8.3 rimraf: ^3.0.2 @@ -16,6 +17,7 @@ dependencies: '@hyperswarm/dht-relay': 0.3.0 '@lumeweb/kernel-peer-discovery-client': git.lumeweb.com/LumeWeb/kernel-peer-discovery-client/ad426dafb19be8f79c64bb11c1c014b1031c96d0 '@lumeweb/libkernel-universal': git.lumeweb.com/LumeWeb/libkernel-universal/ae9c6eeb60cd5e350012c3e393ff8b846326e468 + eventemitter2: 6.4.9 hyperswarm: 4.3.7 devDependencies: @@ -394,6 +396,10 @@ packages: esbuild-windows-arm64: 0.14.54 dev: true + /eventemitter2/6.4.9: + resolution: {integrity: sha512-JEPTiaOt9f04oa6NOkc4aH+nVp5I3wEjpHbIPqfgCdD5v5bUzy7xQqwcVO2aDQgOWhI28da57HksMrzK9HlRxg==} + dev: false + /events/3.3.0: resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} engines: {node: '>=0.8.x'} diff --git a/src/index.ts b/src/index.ts index b55cb4e..89e8d47 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,7 +12,7 @@ import { load } from "@lumeweb/libkernel-universal"; // @ts-ignore import Hyperswarm from "hyperswarm"; import randomNumber from "random-number-csprng"; -import EventEmitter from "node:events"; +import EventEmitter from "eventemitter2"; export default class HyperswarmWeb extends EventEmitter { private _options: any;