From 86ee4fd9d83026390712ef0c43c1a79ddd68f662 Mon Sep 17 00:00:00 2001 From: masatohoshino Date: Sat, 18 Apr 2026 10:12:09 +0000 Subject: [PATCH] fix(matrix): also pin test imports to matrix-js-sdk subpath Two companion test files still used the bare matrix-js-sdk import while the production code in event-helpers.ts had been migrated to the matrix-js-sdk/lib/matrix.js subpath: - extensions/matrix/src/matrix/sdk/event-helpers.test.ts (flagged by greptile P2) - extensions/matrix/src/matrix/client/file-sync-store.test.ts (found via grep while addressing the P2) After this commit, all matrix-js-sdk imports across extensions/matrix/src go through the same subpath. Verified with: grep -rn 'from "matrix-js-sdk"' extensions/matrix/src/ | grep -v lib returns no results. Addresses greptile P2 finding on PR #68498. --- extensions/matrix/src/matrix/client/file-sync-store.test.ts | 2 +- extensions/matrix/src/matrix/sdk/event-helpers.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/matrix/src/matrix/client/file-sync-store.test.ts b/extensions/matrix/src/matrix/client/file-sync-store.test.ts index 665925798b6..8404a1eefdf 100644 --- a/extensions/matrix/src/matrix/client/file-sync-store.test.ts +++ b/extensions/matrix/src/matrix/client/file-sync-store.test.ts @@ -1,7 +1,7 @@ import fs from "node:fs"; import os from "node:os"; import path from "node:path"; -import type { ISyncResponse } from "matrix-js-sdk"; +import type { ISyncResponse } from "matrix-js-sdk/lib/matrix.js"; import * as jsonStore from "openclaw/plugin-sdk/json-store"; import { afterEach, describe, expect, it, vi } from "vitest"; import { FileBackedMatrixSyncStore } from "./file-sync-store.js"; diff --git a/extensions/matrix/src/matrix/sdk/event-helpers.test.ts b/extensions/matrix/src/matrix/sdk/event-helpers.test.ts index b768262cd24..9020b1e8b7b 100644 --- a/extensions/matrix/src/matrix/sdk/event-helpers.test.ts +++ b/extensions/matrix/src/matrix/sdk/event-helpers.test.ts @@ -1,4 +1,4 @@ -import type { MatrixEvent } from "matrix-js-sdk"; +import type { MatrixEvent } from "matrix-js-sdk/lib/matrix.js"; import { describe, expect, it } from "vitest"; import { buildHttpError, matrixEventToRaw, parseMxc } from "./event-helpers.js";