diff --git a/package.json b/package.json index 78b0a32..95defa1 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "prepare": "husky install" }, "dependencies": { - "eventemitter3": "^5.0.1", + "emittery": "^1.0.3", "nostr-tools": "^1.17.0" }, "devDependencies": { diff --git a/src/OAuth2User.ts b/src/OAuth2User.ts index facefe3..97f23fd 100644 --- a/src/OAuth2User.ts +++ b/src/OAuth2User.ts @@ -7,7 +7,7 @@ import { GenerateAuthUrlOptions, } from "./types"; import { RequestOptions, rest } from "./request"; -import EventEmitter from "eventemitter3"; +import Emittery from "emittery"; const AUTHORIZE_URL = "https://getalby.com/oauth"; @@ -50,10 +50,10 @@ export class OAuth2User implements OAuthClient { code_verifier?: string; code_challenge?: string; private _refreshAccessTokenPromise: Promise<{ token: Token }> | null; - private _tokenEvents: EventEmitter; + private _tokenEvents: Emittery; constructor(options: OAuth2UserOptions) { - this._tokenEvents = new EventEmitter(); + this._tokenEvents = new Emittery(); const { token, ...defaultOptions } = options; this.options = { client_secret: "", ...defaultOptions }; this.token = token; diff --git a/yarn.lock b/yarn.lock index 1acbe28..eef7ff9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3549,6 +3549,11 @@ emittery@^0.13.1: resolved "https://registry.npmjs.org/emittery/-/emittery-0.13.1.tgz" integrity sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ== +emittery@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/emittery/-/emittery-1.0.3.tgz#c9d2a9c689870f15251bb13b31c67715c26d69ac" + integrity sha512-tJdCJitoy2lrC2ldJcqN4vkqJ00lT+tOWNT1hBJjO/3FDMJa5TTIiYGCKGkn/WfCyOzUMObeohbVTj00fhiLiA== + emoji-regex@^10.3.0: version "10.4.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-10.4.0.tgz#03553afea80b3975749cfcb36f776ca268e413d4"