From 46f5c44db06f48672b856d8621278cbd69985db2 Mon Sep 17 00:00:00 2001 From: Timo Date: Thu, 13 Mar 2025 16:58:14 +0100 Subject: [PATCH] temp2 --- package.json | 3 +-- renovate.json | 5 ----- src/@types/matrix-js-sdk.d.ts | 2 +- src/ClientContext.tsx | 2 +- src/auth/RegisterPage.tsx | 2 +- src/auth/useInteractiveLogin.ts | 2 +- src/auth/useInteractiveRegistration.ts | 2 +- src/auth/useRecaptcha.ts | 2 +- src/auth/useRegisterPasswordlessUser.ts | 2 +- src/home/CallList.tsx | 4 ++-- src/home/UnauthenticatedView.tsx | 2 +- src/home/useGroupCallRooms.ts | 21 ++++++++++++------- src/otel/OTelCall.ts | 4 ++-- src/otel/OTelCallAbstractMediaStreamSpan.ts | 2 +- src/otel/OTelCallFeedMediaStreamSpan.ts | 2 +- src/otel/OTelCallMediaStreamTrackSpan.ts | 2 +- .../OTelCallTransceiverMediaStreamSpan.ts | 2 +- src/otel/OTelGroupCallMembership.ts | 6 +++--- src/otel/ObjectFlattener.test.ts | 4 ++-- src/otel/ObjectFlattener.ts | 6 +++--- src/profile/useProfile.ts | 9 +++++--- src/reactions/ReactionsReader.ts | 2 +- src/reactions/index.ts | 2 +- src/room/GroupCallView.tsx | 2 +- src/room/InCallView.tsx | 2 +- src/room/MuteStates.ts | 2 +- src/room/RoomPage.tsx | 2 +- src/room/checkForParallelCalls.test.ts | 2 +- src/room/checkForParallelCalls.ts | 3 +-- src/room/useActiveFocus.ts | 7 ++----- src/room/useLoadGroupCall.ts | 14 +++++++------ src/settings/FeedbackSettingsTab.tsx | 2 +- src/settings/rageshake.ts | 2 +- src/settings/submit-rageshake.ts | 2 +- src/useTheme.test.ts | 2 +- src/useTheme.ts | 4 ++-- src/utils/displayname-integration.test.ts | 6 +++--- src/utils/displayname.ts | 2 +- src/utils/matrix.ts | 11 +++++----- src/utils/spa.ts | 3 +-- src/utils/test-viewmodel.ts | 7 +++++-- src/widget.ts | 4 ++-- yarn.lock | 2 +- 43 files changed, 87 insertions(+), 84 deletions(-) diff --git a/package.json b/package.json index cacd969b..2cf05609 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,6 @@ "vitest-axe": "^1.0.0-pre.3" }, "resolutions": { - "@livekit/components-core/rxjs": "^7.8.1", - "matrix-widget-api": "1.11.0" + "@livekit/components-core/rxjs": "^7.8.1" } } diff --git a/renovate.json b/renovate.json index 31709cf0..23ed1be2 100644 --- a/renovate.json +++ b/renovate.json @@ -24,11 +24,6 @@ "matchDepNames": ["matrix-js-sdk"], "enabled": false }, - { - "groupName": "matrix-widget-api", - "matchDepNames": ["matrix-widget-api"], - "extends": ["schedule:weekly"] - }, { "groupName": "Compound", "matchPackageNames": ["@vector-im/compound-{/,}**"], diff --git a/src/@types/matrix-js-sdk.d.ts b/src/@types/matrix-js-sdk.d.ts index faebc4fa..a9f2e066 100644 --- a/src/@types/matrix-js-sdk.d.ts +++ b/src/@types/matrix-js-sdk.d.ts @@ -11,7 +11,7 @@ import { } from "../reactions"; // Extend Matrix JS SDK types via Typescript declaration merging to support unspecced event fields and types -declare module "matrix-js-sdk/src/types" { +declare module "matrix-js-sdk/lib/types" { export interface TimelineEvents { [ElementCallReactionEventType]: ECallReactionEventContent; } diff --git a/src/ClientContext.tsx b/src/ClientContext.tsx index 25db3ca0..01f5e848 100644 --- a/src/ClientContext.tsx +++ b/src/ClientContext.tsx @@ -21,7 +21,7 @@ import { logger } from "matrix-js-sdk/lib/logger"; import { type ISyncStateData, type SyncState } from "matrix-js-sdk/lib/sync"; import { ClientEvent, type MatrixClient } from "matrix-js-sdk"; -import type { WidgetApi } from "matrix-widget-api"; +import type { WidgetApi } from "matrix-js-sdk/lib/matrix-widget-api"; import { ErrorPage } from "./FullScreenView"; import { widget } from "./widget"; import { diff --git a/src/auth/RegisterPage.tsx b/src/auth/RegisterPage.tsx index bad7b7e6..bd056d08 100644 --- a/src/auth/RegisterPage.tsx +++ b/src/auth/RegisterPage.tsx @@ -16,7 +16,7 @@ import { } from "react"; import { useNavigate, useLocation } from "react-router-dom"; import { captureException } from "@sentry/react"; -import { sleep } from "matrix-js-sdk/src/utils"; +import { sleep } from "matrix-js-sdk/lib/utils"; import { Trans, useTranslation } from "react-i18next"; import { logger } from "matrix-js-sdk/lib/logger"; import { Button, Text } from "@vector-im/compound-web"; diff --git a/src/auth/useInteractiveLogin.ts b/src/auth/useInteractiveLogin.ts index b255c1bf..85a43752 100644 --- a/src/auth/useInteractiveLogin.ts +++ b/src/auth/useInteractiveLogin.ts @@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details. */ import { useCallback } from "react"; -import { InteractiveAuth } from "matrix-js-sdk/src/interactive-auth"; +import { InteractiveAuth } from "matrix-js-sdk"; import { createClient, type LoginResponse, diff --git a/src/auth/useInteractiveRegistration.ts b/src/auth/useInteractiveRegistration.ts index 983d0a71..4972c031 100644 --- a/src/auth/useInteractiveRegistration.ts +++ b/src/auth/useInteractiveRegistration.ts @@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details. */ import { useState, useEffect, useCallback, useRef } from "react"; -import { InteractiveAuth } from "matrix-js-sdk/src/interactive-auth"; +import { InteractiveAuth } from "matrix-js-sdk"; import { createClient, type MatrixClient, diff --git a/src/auth/useRecaptcha.ts b/src/auth/useRecaptcha.ts index 9d24eb83..738d5569 100644 --- a/src/auth/useRecaptcha.ts +++ b/src/auth/useRecaptcha.ts @@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details. */ import { useEffect, useCallback, useRef, useState } from "react"; -import { secureRandomString } from "matrix-js-sdk/src/randomstring"; +import { secureRandomString } from "matrix-js-sdk"; import { useTranslation } from "react-i18next"; import { logger } from "matrix-js-sdk/lib/logger"; diff --git a/src/auth/useRegisterPasswordlessUser.ts b/src/auth/useRegisterPasswordlessUser.ts index 6dad6ebd..e1160a89 100644 --- a/src/auth/useRegisterPasswordlessUser.ts +++ b/src/auth/useRegisterPasswordlessUser.ts @@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details. */ import { useCallback } from "react"; -import { secureRandomString } from "matrix-js-sdk/src/randomstring"; +import { secureRandomString } from "matrix-js-sdk"; import { useClient } from "../ClientContext"; import { useInteractiveRegistration } from "../auth/useInteractiveRegistration"; diff --git a/src/home/CallList.tsx b/src/home/CallList.tsx index a176b14d..b80ff8da 100644 --- a/src/home/CallList.tsx +++ b/src/home/CallList.tsx @@ -7,8 +7,8 @@ Please see LICENSE in the repository root for full details. import { Link } from "react-router-dom"; import { type MatrixClient } from "matrix-js-sdk"; -import { type RoomMember } from "matrix-js-sdk/src/models/room-member"; -import { type Room } from "matrix-js-sdk/src/models/room"; +import { type RoomMember } from "matrix-js-sdk"; +import { type Room } from "matrix-js-sdk"; import { type FC, useCallback, type MouseEvent, useState } from "react"; import { useTranslation } from "react-i18next"; import { IconButton, Text } from "@vector-im/compound-web"; diff --git a/src/home/UnauthenticatedView.tsx b/src/home/UnauthenticatedView.tsx index f3d56668..be34f8f6 100644 --- a/src/home/UnauthenticatedView.tsx +++ b/src/home/UnauthenticatedView.tsx @@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details. */ import { type FC, useCallback, useState, type FormEventHandler } from "react"; -import { secureRandomString } from "matrix-js-sdk/src/randomstring"; +import { secureRandomString } from "matrix-js-sdk"; import { Trans, useTranslation } from "react-i18next"; import { Button, Heading, Text } from "@vector-im/compound-web"; import { logger } from "matrix-js-sdk/lib/logger"; diff --git a/src/home/useGroupCallRooms.ts b/src/home/useGroupCallRooms.ts index 799b287c..45b893e3 100644 --- a/src/home/useGroupCallRooms.ts +++ b/src/home/useGroupCallRooms.ts @@ -5,14 +5,21 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE in the repository root for full details. */ -import { type MatrixClient } from "matrix-js-sdk"; -import { type Room, RoomEvent } from "matrix-js-sdk/src/models/room"; -import { type RoomMember } from "matrix-js-sdk/src/models/room-member"; +import { + type MatrixClient, + type RoomMember, + type Room, + RoomEvent, + EventTimeline, + EventType, + JoinRule, + KnownMembership, +} from "matrix-js-sdk"; import { useState, useEffect } from "react"; -import { EventTimeline, EventType, JoinRule } from "matrix-js-sdk"; -import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc"; -import { MatrixRTCSessionManagerEvents } from "matrix-js-sdk/lib/matrixrtcManager"; -import { KnownMembership } from "matrix-js-sdk/src/types"; +import { + MatrixRTCSessionManagerEvents, + type MatrixRTCSession, +} from "matrix-js-sdk/lib/matrixrtc"; import { getKeyForRoom } from "../e2ee/sharedKeyManagement"; diff --git a/src/otel/OTelCall.ts b/src/otel/OTelCall.ts index f212ef67..e70cedf2 100644 --- a/src/otel/OTelCall.ts +++ b/src/otel/OTelCall.ts @@ -7,11 +7,11 @@ Please see LICENSE in the repository root for full details. import { type Span } from "@opentelemetry/api"; import { type MatrixCall } from "matrix-js-sdk"; -import { CallEvent } from "matrix-js-sdk/src/webrtc/call"; +import { CallEvent } from "matrix-js-sdk/lib/webrtc/call"; import { type TransceiverStats, type CallFeedStats, -} from "matrix-js-sdk/src/webrtc/stats/statsReport"; +} from "matrix-js-sdk/lib/webrtc/stats/statsReport"; import { ObjectFlattener } from "./ObjectFlattener"; import { ElementCallOpenTelemetry } from "./otel"; diff --git a/src/otel/OTelCallAbstractMediaStreamSpan.ts b/src/otel/OTelCallAbstractMediaStreamSpan.ts index b6718d72..69e41547 100644 --- a/src/otel/OTelCallAbstractMediaStreamSpan.ts +++ b/src/otel/OTelCallAbstractMediaStreamSpan.ts @@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details. */ import opentelemetry, { type Span } from "@opentelemetry/api"; -import { type TrackStats } from "matrix-js-sdk/src/webrtc/stats/statsReport"; +import { type TrackStats } from "matrix-js-sdk/lib/webrtc/stats/statsReport"; import { type ElementCallOpenTelemetry } from "./otel"; import { OTelCallMediaStreamTrackSpan } from "./OTelCallMediaStreamTrackSpan"; diff --git a/src/otel/OTelCallFeedMediaStreamSpan.ts b/src/otel/OTelCallFeedMediaStreamSpan.ts index 0ea3a37a..59c780a5 100644 --- a/src/otel/OTelCallFeedMediaStreamSpan.ts +++ b/src/otel/OTelCallFeedMediaStreamSpan.ts @@ -9,7 +9,7 @@ import { type Span } from "@opentelemetry/api"; import { type CallFeedStats, type TrackStats, -} from "matrix-js-sdk/src/webrtc/stats/statsReport"; +} from "matrix-js-sdk/lib/webrtc/stats/statsReport"; import { type ElementCallOpenTelemetry } from "./otel"; import { OTelCallAbstractMediaStreamSpan } from "./OTelCallAbstractMediaStreamSpan"; diff --git a/src/otel/OTelCallMediaStreamTrackSpan.ts b/src/otel/OTelCallMediaStreamTrackSpan.ts index 830a64b2..c81acd4f 100644 --- a/src/otel/OTelCallMediaStreamTrackSpan.ts +++ b/src/otel/OTelCallMediaStreamTrackSpan.ts @@ -5,7 +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 TrackStats } from "matrix-js-sdk/src/webrtc/stats/statsReport"; +import { type TrackStats } from "matrix-js-sdk/lib/webrtc/stats/statsReport"; import opentelemetry, { type Span } from "@opentelemetry/api"; import { type ElementCallOpenTelemetry } from "./otel"; diff --git a/src/otel/OTelCallTransceiverMediaStreamSpan.ts b/src/otel/OTelCallTransceiverMediaStreamSpan.ts index 6eb7ed91..675d793e 100644 --- a/src/otel/OTelCallTransceiverMediaStreamSpan.ts +++ b/src/otel/OTelCallTransceiverMediaStreamSpan.ts @@ -9,7 +9,7 @@ import { type Span } from "@opentelemetry/api"; import { type TrackStats, type TransceiverStats, -} from "matrix-js-sdk/src/webrtc/stats/statsReport"; +} from "matrix-js-sdk/lib/webrtc/stats/statsReport"; import { type ElementCallOpenTelemetry } from "./otel"; import { OTelCallAbstractMediaStreamSpan } from "./OTelCallAbstractMediaStreamSpan"; diff --git a/src/otel/OTelGroupCallMembership.ts b/src/otel/OTelGroupCallMembership.ts index 7445a2cb..668b989c 100644 --- a/src/otel/OTelGroupCallMembership.ts +++ b/src/otel/OTelGroupCallMembership.ts @@ -22,19 +22,19 @@ import { type CallState, type MatrixCall, type VoipEvent, -} from "matrix-js-sdk/src/webrtc/call"; +} from "matrix-js-sdk/lib/webrtc/call"; import { type CallsByUserAndDevice, type GroupCallError, GroupCallEvent, type GroupCallStatsReport, -} from "matrix-js-sdk/src/webrtc/groupCall"; +} from "matrix-js-sdk/lib/webrtc/groupCall"; import { type ConnectionStatsReport, type ByteSentStatsReport, type SummaryStatsReport, type CallFeedReport, -} from "matrix-js-sdk/src/webrtc/stats/statsReport"; +} from "matrix-js-sdk/lib/webrtc/stats/statsReport"; import { ElementCallOpenTelemetry } from "./otel"; import { ObjectFlattener } from "./ObjectFlattener"; diff --git a/src/otel/ObjectFlattener.test.ts b/src/otel/ObjectFlattener.test.ts index 4c2cb07a..5685617c 100644 --- a/src/otel/ObjectFlattener.test.ts +++ b/src/otel/ObjectFlattener.test.ts @@ -5,12 +5,12 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE in the repository root for full details. */ -import { type GroupCallStatsReport } from "matrix-js-sdk/src/webrtc/groupCall"; +import { type GroupCallStatsReport } from "matrix-js-sdk/lib/webrtc/groupCall"; import { type AudioConcealment, type ByteSentStatsReport, type ConnectionStatsReport, -} from "matrix-js-sdk/src/webrtc/stats/statsReport"; +} from "matrix-js-sdk/lib/webrtc/stats/statsReport"; import { describe, expect, it } from "vitest"; import { ObjectFlattener } from "../../src/otel/ObjectFlattener"; diff --git a/src/otel/ObjectFlattener.ts b/src/otel/ObjectFlattener.ts index e36c269e..a963c743 100644 --- a/src/otel/ObjectFlattener.ts +++ b/src/otel/ObjectFlattener.ts @@ -5,13 +5,13 @@ SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial Please see LICENSE in the repository root for full details. */ import { type Attributes } from "@opentelemetry/api"; -import { type VoipEvent } from "matrix-js-sdk/src/webrtc/call"; -import { type GroupCallStatsReport } from "matrix-js-sdk/src/webrtc/groupCall"; +import { type VoipEvent } from "matrix-js-sdk/lib/webrtc/call"; +import { type GroupCallStatsReport } from "matrix-js-sdk/lib/webrtc/groupCall"; import { type ByteSentStatsReport, type ConnectionStatsReport, type SummaryStatsReport, -} from "matrix-js-sdk/src/webrtc/stats/statsReport"; +} from "matrix-js-sdk/lib/webrtc/stats/statsReport"; export class ObjectFlattener { public static flattenReportObject( diff --git a/src/profile/useProfile.ts b/src/profile/useProfile.ts index bc68d30b..8f68747f 100644 --- a/src/profile/useProfile.ts +++ b/src/profile/useProfile.ts @@ -6,9 +6,12 @@ Please see LICENSE in the repository root for full details. */ import { type MatrixClient } from "matrix-js-sdk"; -import { type MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { type User, UserEvent } from "matrix-js-sdk/src/models/user"; -import { type FileType } from "matrix-js-sdk/src/http-api"; +import { + type MatrixEvent, + type User, + UserEvent, + type FileType, +} from "matrix-js-sdk"; import { useState, useCallback, useEffect } from "react"; import { logger } from "matrix-js-sdk/lib/logger"; diff --git a/src/reactions/ReactionsReader.ts b/src/reactions/ReactionsReader.ts index ae9fa4e3..b630f4b9 100644 --- a/src/reactions/ReactionsReader.ts +++ b/src/reactions/ReactionsReader.ts @@ -12,7 +12,7 @@ import { } from "matrix-js-sdk/lib/matrixrtc"; import { logger } from "matrix-js-sdk/lib/logger"; import { type MatrixEvent, MatrixEventEvent } from "matrix-js-sdk"; -import { type ReactionEventContent } from "matrix-js-sdk/src/types"; +import { type ReactionEventContent } from "matrix-js-sdk/lib/types"; import { RelationType, EventType, diff --git a/src/reactions/index.ts b/src/reactions/index.ts index 31b28fe5..d3c2d9c9 100644 --- a/src/reactions/index.ts +++ b/src/reactions/index.ts @@ -5,7 +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 RelationType } from "matrix-js-sdk/src/types"; +import { type RelationType } from "matrix-js-sdk"; import catSoundOgg from "../sound/reactions/cat.ogg?url"; import catSoundMp3 from "../sound/reactions/cat.mp3?url"; diff --git a/src/room/GroupCallView.tsx b/src/room/GroupCallView.tsx index 06fcfa4e..c6e7e3a8 100644 --- a/src/room/GroupCallView.tsx +++ b/src/room/GroupCallView.tsx @@ -26,7 +26,7 @@ import { import { JoinRule, type Room } from "matrix-js-sdk"; import { useNavigate } from "react-router-dom"; -import type { IWidgetApiRequest } from "matrix-widget-api"; +import type { IWidgetApiRequest } from "matrix-js-sdk/lib/matrix-widget-api"; import { ElementWidgetActions, type JoinCallData, diff --git a/src/room/InCallView.tsx b/src/room/InCallView.tsx index 53742fc2..99f8a282 100644 --- a/src/room/InCallView.tsx +++ b/src/room/InCallView.tsx @@ -34,7 +34,7 @@ import { logger } from "matrix-js-sdk/lib/logger"; import LogoMark from "../icons/LogoMark.svg?react"; import LogoType from "../icons/LogoType.svg?react"; -import type { IWidgetApiRequest } from "matrix-widget-api"; +import type { IWidgetApiRequest } from "matrix-js-sdk/lib/matrix-widget-api"; import { EndCallButton, MicButton, diff --git a/src/room/MuteStates.ts b/src/room/MuteStates.ts index e57ba7d5..af78d2eb 100644 --- a/src/room/MuteStates.ts +++ b/src/room/MuteStates.ts @@ -12,7 +12,7 @@ import { useEffect, useMemo, } from "react"; -import { type IWidgetApiRequest } from "matrix-widget-api"; +import { type IWidgetApiRequest } from "matrix-js-sdk/lib/matrix-widget-api"; import { logger } from "matrix-js-sdk/lib/logger"; import { diff --git a/src/room/RoomPage.tsx b/src/room/RoomPage.tsx index 58039aaa..f502407c 100644 --- a/src/room/RoomPage.tsx +++ b/src/room/RoomPage.tsx @@ -13,13 +13,13 @@ import { useRef, type JSX, } from "react"; +import { type MatrixError } from "matrix-js-sdk"; import { logger } from "matrix-js-sdk/lib/logger"; import { Trans, useTranslation } from "react-i18next"; import { CheckIcon, UnknownSolidIcon, } from "@vector-im/compound-design-tokens/assets/web/icons"; -import { type MatrixError } from "matrix-js-sdk/src/http-api"; import { useClientLegacy } from "../ClientContext"; import { ErrorPage, FullScreenView, LoadingPage } from "../FullScreenView"; diff --git a/src/room/checkForParallelCalls.test.ts b/src/room/checkForParallelCalls.test.ts index 932cba98..2d14c79a 100644 --- a/src/room/checkForParallelCalls.test.ts +++ b/src/room/checkForParallelCalls.test.ts @@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details. */ import { vi, type Mocked, test, expect } from "vitest"; -import { type RoomState } from "matrix-js-sdk/src/models/room-state"; +import { type RoomState } from "matrix-js-sdk"; import { PosthogAnalytics } from "../../src/analytics/PosthogAnalytics"; import { checkForParallelCalls } from "../../src/room/checkForParallelCalls"; diff --git a/src/room/checkForParallelCalls.ts b/src/room/checkForParallelCalls.ts index d8c91ea0..ab947176 100644 --- a/src/room/checkForParallelCalls.ts +++ b/src/room/checkForParallelCalls.ts @@ -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 { EventType } from "matrix-js-sdk/src/@types/event"; -import { type RoomState } from "matrix-js-sdk/src/models/room-state"; +import { EventType, type RoomState } from "matrix-js-sdk"; import { PosthogAnalytics } from "../analytics/PosthogAnalytics"; diff --git a/src/room/useActiveFocus.ts b/src/room/useActiveFocus.ts index 28012643..a8dfa836 100644 --- a/src/room/useActiveFocus.ts +++ b/src/room/useActiveFocus.ts @@ -10,12 +10,9 @@ import { MatrixRTCSessionEvent, } from "matrix-js-sdk/lib/matrixrtc"; import { useCallback, useEffect, useState } from "react"; -import { deepCompare } from "matrix-js-sdk/src/utils"; +import { deepCompare } from "matrix-js-sdk/lib/utils"; import { logger } from "matrix-js-sdk/lib/logger"; -import { - type LivekitFocus, - isLivekitFocus, -} from "matrix-js-sdk/lib/matrixrtc"; +import { type LivekitFocus, isLivekitFocus } from "matrix-js-sdk/lib/matrixrtc"; /** * Gets the currently active (livekit) focus for a MatrixRTC session diff --git a/src/room/useLoadGroupCall.ts b/src/room/useLoadGroupCall.ts index e53dc3b5..ab6ccf64 100644 --- a/src/room/useLoadGroupCall.ts +++ b/src/room/useLoadGroupCall.ts @@ -13,18 +13,20 @@ import { type ComponentType, type SVGAttributes, } from "react"; -import { logger } from "matrix-js-sdk/lib/logger"; -import { EventType } from "matrix-js-sdk/src/@types/event"; import { + JoinRule, + EventType, + SyncState, + MatrixError, + KnownMembership, ClientEvent, type MatrixClient, type RoomSummary, + RoomEvent, + type Room, } from "matrix-js-sdk"; -import { SyncState } from "matrix-js-sdk/src/sync"; +import { logger } from "matrix-js-sdk/lib/logger"; import { type MatrixRTCSession } from "matrix-js-sdk/lib/matrixrtc"; -import { RoomEvent, type Room } from "matrix-js-sdk/src/models/room"; -import { KnownMembership } from "matrix-js-sdk/src/types"; -import { JoinRule, MatrixError } from "matrix-js-sdk"; import { useTranslation } from "react-i18next"; import { AdminIcon, diff --git a/src/settings/FeedbackSettingsTab.tsx b/src/settings/FeedbackSettingsTab.tsx index ee9911b8..2e330a28 100644 --- a/src/settings/FeedbackSettingsTab.tsx +++ b/src/settings/FeedbackSettingsTab.tsx @@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details. */ import { type ChangeEvent, type FC, useCallback } from "react"; -import { secureRandomString } from "matrix-js-sdk/src/randomstring"; +import { secureRandomString } from "matrix-js-sdk"; import { Trans, useTranslation } from "react-i18next"; import { Button, Text } from "@vector-im/compound-web"; import { logger } from "matrix-js-sdk/lib/logger"; diff --git a/src/settings/rageshake.ts b/src/settings/rageshake.ts index 1d5e581d..5e37d5b7 100644 --- a/src/settings/rageshake.ts +++ b/src/settings/rageshake.ts @@ -30,7 +30,7 @@ Please see LICENSE in the repository root for full details. import EventEmitter from "events"; import { throttle } from "lodash-es"; import { type Logger, logger } from "matrix-js-sdk/lib/logger"; -import { secureRandomString } from "matrix-js-sdk/src/randomstring"; +import { secureRandomString } from "matrix-js-sdk"; import { type LoggingMethod } from "loglevel"; import type loglevel from "loglevel"; diff --git a/src/settings/submit-rageshake.ts b/src/settings/submit-rageshake.ts index b7b91a58..c1b7d659 100644 --- a/src/settings/submit-rageshake.ts +++ b/src/settings/submit-rageshake.ts @@ -12,7 +12,7 @@ import { type MatrixClient, type MatrixEvent, } from "matrix-js-sdk"; -import { type CryptoApi } from "matrix-js-sdk/src/crypto-api"; +import { type CryptoApi } from "matrix-js-sdk/lib/crypto-api"; import { getLogsForReport } from "./rageshake"; import { useClient } from "../ClientContext"; diff --git a/src/useTheme.test.ts b/src/useTheme.test.ts index 6e471462..7e8868fa 100644 --- a/src/useTheme.test.ts +++ b/src/useTheme.test.ts @@ -16,7 +16,7 @@ import { vi, } from "vitest"; import EventEmitter from "events"; -import { WidgetApiToWidgetAction } from "matrix-widget-api"; +import { WidgetApiToWidgetAction } from "matrix-js-sdk/lib/matrix-widget-api"; import { useTheme } from "./useTheme"; import { getUrlParams } from "./UrlParams"; diff --git a/src/useTheme.ts b/src/useTheme.ts index c1cad176..93ee55d4 100644 --- a/src/useTheme.ts +++ b/src/useTheme.ts @@ -6,8 +6,8 @@ Please see LICENSE in the repository root for full details. */ import { useEffect, useLayoutEffect, useRef, useState } from "react"; -import { WidgetApiToWidgetAction } from "matrix-widget-api"; -import { type IThemeChangeActionRequest } from "matrix-widget-api/lib/interfaces/ThemeChangeAction"; +import { WidgetApiToWidgetAction } from "matrix-js-sdk/lib/matrix-widget-api"; +import { type IThemeChangeActionRequest } from "matrix-js-sdk/lib/matrix-widget-api"; import { getUrlParams } from "./UrlParams"; import { widget } from "./widget"; diff --git a/src/utils/displayname-integration.test.ts b/src/utils/displayname-integration.test.ts index 8dd72d8c..5ba42e70 100644 --- a/src/utils/displayname-integration.test.ts +++ b/src/utils/displayname-integration.test.ts @@ -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(() => { diff --git a/src/utils/displayname.ts b/src/utils/displayname.ts index 1e175368..d2375897 100644 --- a/src/utils/displayname.ts +++ b/src/utils/displayname.ts @@ -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"; diff --git a/src/utils/matrix.ts b/src/utils/matrix.ts index b5f35f94..27bc3bc8 100644 --- a/src/utils/matrix.ts +++ b/src/utils/matrix.ts @@ -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"; diff --git a/src/utils/spa.ts b/src/utils/spa.ts index a826c542..e97d7810 100644 --- a/src/utils/spa.ts +++ b/src/utils/spa.ts @@ -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"; diff --git a/src/utils/test-viewmodel.ts b/src/utils/test-viewmodel.ts index e9982d3d..9723d8ed 100644 --- a/src/utils/test-viewmodel.ts +++ b/src/utils/test-viewmodel.ts @@ -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"; diff --git a/src/widget.ts b/src/widget.ts index 8bb920ad..f7fe053d 100644 --- a/src/widget.ts +++ b/src/widget.ts @@ -12,10 +12,10 @@ import { WidgetApi, MatrixCapabilities, WidgetApiToWidgetAction, -} from "matrix-widget-api"; +} from "matrix-js-sdk/lib/matrix-widget-api"; import type { MatrixClient } from "matrix-js-sdk"; -import type { IWidgetApiRequest } from "matrix-widget-api"; +import type { IWidgetApiRequest } from "matrix-js-sdk/lib/matrix-widget-api"; import { LazyEventEmitter } from "./LazyEventEmitter"; import { getUrlParams } from "./UrlParams"; import { Config } from "./config/Config"; diff --git a/yarn.lock b/yarn.lock index c6b9c56b..9b560160 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6512,7 +6512,7 @@ matrix-events-sdk@0.0.1: unhomoglyph "^1.0.6" uuid "11" -matrix-widget-api@1.11.0, matrix-widget-api@^1.10.0: +matrix-widget-api@^1.10.0: version "1.11.0" resolved "https://registry.yarnpkg.com/matrix-widget-api/-/matrix-widget-api-1.11.0.tgz#2f548b11a7c0df789d5d4fdb5cc9ef7af8aef3da" integrity sha512-ED/9hrJqDWVLeED0g1uJnYRhINh3ZTquwurdM+Hc8wLVJIQ8G/r7A7z74NC+8bBIHQ1Jo7i1Uq5CoJp/TzFYrA==