From 817c4ce4fc080b994d2dcf2e4c6926b77c8c3abf Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 1 Jun 2026 04:55:09 +0100 Subject: [PATCH] test(release): stabilize installer and matrix async checks --- extensions/matrix/src/matrix/monitor/auto-join.ts | 8 ++++---- extensions/matrix/src/matrix/monitor/events.ts | 8 ++++---- test/scripts/install-sh.test.ts | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/extensions/matrix/src/matrix/monitor/auto-join.ts b/extensions/matrix/src/matrix/monitor/auto-join.ts index 1c2cc0af3a2..8dc6658f448 100644 --- a/extensions/matrix/src/matrix/monitor/auto-join.ts +++ b/extensions/matrix/src/matrix/monitor/auto-join.ts @@ -60,8 +60,8 @@ export function registerMatrixAutoJoin(params: { }; // Handle invites directly so both "always" and "allowlist" modes share the same path. - client.on("room.invite", (roomId: string, _inviteEvent: unknown) => { - void (async () => { + client.on("room.invite", (roomId: string, _inviteEvent: unknown) => + (async () => { if (autoJoin === "allowlist") { const allowedAliasRoomIds = await resolveAllowedAliasRoomIds(); const allowed = @@ -81,6 +81,6 @@ export function registerMatrixAutoJoin(params: { } catch (err) { runtime.error?.(`matrix: failed to join room ${roomId}: ${String(err)}`); } - })(); - }); + })(), + ); } diff --git a/extensions/matrix/src/matrix/monitor/events.ts b/extensions/matrix/src/matrix/monitor/events.ts index f8032d79d2e..ae859eb3b41 100644 --- a/extensions/matrix/src/matrix/monitor/events.ts +++ b/extensions/matrix/src/matrix/monitor/events.ts @@ -271,8 +271,8 @@ export function registerMatrixMonitorEvents(params: { ); }); - client.on("room.failed_decryption", (roomId: string, event: MatrixRawEvent, error: Error) => { - void (async () => { + client.on("room.failed_decryption", (roomId: string, event: MatrixRawEvent, error: Error) => + (async () => { const failureState = postHealthySyncDecryptFailureTracker.recordFailure(roomId, event, error); const selfUserId = await resolveMatrixSelfUserId(client, logVerboseMessage); const sender = typeof event.sender === "string" ? event.sender : null; @@ -319,8 +319,8 @@ export function registerMatrixMonitorEvents(params: { logVerboseMessage( `matrix: failed decrypt room=${roomId} id=${event.event_id ?? "unknown"} freshAfterHealthySync=${String(failureState.freshAfterHealthySync)} error=${error.message}`, ); - })(); - }); + })(), + ); client.on("verification.summary", (summary) => { void runMonitorTask("verification summary handler", async () => { diff --git a/test/scripts/install-sh.test.ts b/test/scripts/install-sh.test.ts index 00df59048fe..86e6ebe7dc4 100644 --- a/test/scripts/install-sh.test.ts +++ b/test/scripts/install-sh.test.ts @@ -1008,7 +1008,7 @@ describe("install.sh", () => { "set +e", "unset -f node 2>/dev/null || true", "unalias node 2>/dev/null || true", - "hash -r", + 'node() { printf "%s\\n" "${FAKE_NODE_VERSION:-v0.0.0}"; }', `FAKE_NODE_VERSION="v22.${minMinor - 1}.0"`, "export FAKE_NODE_VERSION", "node_is_at_least_required",