From ce4361e7fcabb44d6004b42c7d64dfedd99648a7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 23:45:30 +0000 Subject: [PATCH 1/2] deps: bump emittery from 1.2.1 to 2.0.0 Bumps [emittery](https://github.com/sindresorhus/emittery) from 1.2.1 to 2.0.0. - [Release notes](https://github.com/sindresorhus/emittery/releases) - [Commits](https://github.com/sindresorhus/emittery/compare/v1.2.1...v2.0.0) --- updated-dependencies: - dependency-name: emittery dependency-version: 2.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 79cbe0be..c2598cdb 100644 --- a/package.json +++ b/package.json @@ -38,7 +38,7 @@ "cookie": "^1.0.1", "cookie-parser": "^1.4.4", "cors": "^2.8.5", - "emittery": "^1.2.0", + "emittery": "^2.0.0", "escape-string-regexp": "^5.0.0", "explain-error": "^1.0.4", "express": "^5.0.0", From 994033a11ebbe5b2c03c9a0ce054fa6d76ca5338 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9e=20Kooi?= Date: Tue, 17 Mar 2026 09:57:50 +0100 Subject: [PATCH 2/2] update --- src/SocketServer.js | 10 +++++----- src/plugins/configStore.js | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/SocketServer.js b/src/SocketServer.js index edf90aac..9cf8d585 100644 --- a/src/SocketServer.js +++ b/src/SocketServer.js @@ -174,8 +174,8 @@ class SocketServer { port: options.server ? undefined : options.port, }); - this.#unsubscribe = uw.events.onAny((command, data) => { - this.#onServerMessage(command, data); + this.#unsubscribe = uw.events.onAny(({ name, data }) => { + this.#onServerMessage(name, data); }); this.#wss.on('error', (error) => { @@ -536,7 +536,7 @@ class SocketServer { connection.on('close', () => { this.remove(connection); }); - connection.on('authenticate', async ({ user, sessionID, lastEventID }) => { + connection.on('authenticate', async ({ data: { user, sessionID, lastEventID } }) => { const isReconnect = await connection.isReconnect(sessionID); this.#logger.info({ userId: user.id, isReconnect, lastEventID }, 'authenticated socket'); if (isReconnect) { @@ -565,7 +565,7 @@ class SocketServer { */ createAuthedConnection(socket, user, sessionID, lastEventID) { const connection = new AuthedConnection(this.#uw, socket, user, sessionID, lastEventID); - connection.on('close', ({ banned, lastEventID }) => { + connection.on('close', ({ data: { banned, lastEventID } }) => { if (banned) { this.#logger.info({ userId: user.id }, 'removing connection after ban'); disconnectUser(this.#uw, user.id); @@ -577,7 +577,7 @@ class SocketServer { }); connection.on( 'command', - ({ command, data }) => { + ({ data: { command, data } }) => { this.#logger.trace({ userId: user.id, command, data }, 'command'); if (has(this.#clientActions, command)) { // Ignore incorrect input diff --git a/src/plugins/configStore.js b/src/plugins/configStore.js index 590f2d20..85493b4c 100644 --- a/src/plugins/configStore.js +++ b/src/plugins/configStore.js @@ -57,7 +57,7 @@ class ConfigStore { fs.readFileSync(new URL('../schemas/definitions.json', import.meta.url), 'utf8'), )); - this.#unsubscribe = uw.events.on(CONFIG_UPDATE_MESSAGE, async (data) => { + this.#unsubscribe = uw.events.on(CONFIG_UPDATE_MESSAGE, async ({ data }) => { this.#logger.trace({ data }, 'handle config update'); try {