This commit is contained in:
Timo
2025-03-13 16:58:14 +01:00
committed by Robin
parent adb5934f0b
commit 46f5c44db0
43 changed files with 87 additions and 84 deletions

View File

@@ -14,14 +14,14 @@ import { mockMatrixRoom } from "./test";
// Ideally these tests would be in ./displayname.test.ts but I can't figure out how to
// just spy on the removeHiddenChars() function without impacting the other tests.
// So, these tests are in this separate test file.
vi.mock("matrix-js-sdk/src/utils");
vi.mock("matrix-js-sdk/lib/utils");
describe("shouldDisambiguate", () => {
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
let jsUtils: typeof import("matrix-js-sdk/src/utils");
let jsUtils: typeof import("matrix-js-sdk/lib/utils");
beforeAll(async () => {
jsUtils = await import("matrix-js-sdk/src/utils");
jsUtils = await import("matrix-js-sdk/lib/utils");
vi.spyOn(jsUtils, "removeHiddenChars").mockImplementation((str) => str);
});
afterEach(() => {

View File

@@ -8,7 +8,7 @@ Please see LICENSE in the repository root for full details.
import {
removeDirectionOverrideChars,
removeHiddenChars as removeHiddenCharsUncached,
} from "matrix-js-sdk/src/utils";
} from "matrix-js-sdk/lib/utils";
import type { Room } from "matrix-js-sdk";
import type { CallMembership } from "matrix-js-sdk/lib/matrixrtc";

View File

@@ -5,8 +5,8 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
import { IndexedDBStore } from "matrix-js-sdk/src/store/indexeddb";
import { MemoryStore } from "matrix-js-sdk/src/store/memory";
import { IndexedDBStore } from "matrix-js-sdk";
import { MemoryStore } from "matrix-js-sdk";
import {
createClient,
type ICreateClientOpts,
@@ -14,12 +14,11 @@ import {
Visibility,
} from "matrix-js-sdk";
import { ClientEvent } from "matrix-js-sdk";
import { type ISyncStateData, type SyncState } from "matrix-js-sdk/src/sync";
import { type ISyncStateData, type SyncState } from "matrix-js-sdk/lib/sync";
import { logger } from "matrix-js-sdk/lib/logger";
import { secureRandomBase64Url } from "matrix-js-sdk/src/randomstring";
import { secureRandomBase64Url } from "matrix-js-sdk";
import type { MatrixClient } from "matrix-js-sdk";
import type { Room } from "matrix-js-sdk/src/models/room";
import type { MatrixClient, Room } from "matrix-js-sdk";
import IndexedDBWorker from "../IndexedDBWorker?worker";
import { generateUrlSearchParams, getUrlParams } from "../UrlParams";
import { Config } from "../config/Config";

View File

@@ -5,8 +5,7 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE in the repository root for full details.
*/
import { type ICreateClientOpts } from "matrix-js-sdk";
import { MatrixError } from "matrix-js-sdk/src/http-api";
import { type ICreateClientOpts, MatrixError } from "matrix-js-sdk";
import { logger } from "matrix-js-sdk/lib/logger";
import { Config } from "../config/Config";

View File

@@ -8,10 +8,13 @@ Please see LICENSE in the repository root for full details.
import { ConnectionState } from "livekit-client";
import { type MatrixClient } from "matrix-js-sdk";
import { type RoomMember } from "matrix-js-sdk";
import { type CallMembership, type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc";
import {
type CallMembership,
type MatrixRTCSession,
} from "matrix-js-sdk/lib/matrixrtc";
import { BehaviorSubject, of } from "rxjs";
import { vitest } from "vitest";
import { type RelationsContainer } from "matrix-js-sdk/src/models/relations-container";
import { type RelationsContainer } from "matrix-js-sdk";
import EventEmitter from "events";
import { E2eeType } from "../e2ee/e2eeType";