diff --git a/package.json b/package.json index 37ec08c576..6e77d759a1 100644 --- a/package.json +++ b/package.json @@ -56,6 +56,7 @@ }, "dependencies": { "@babel/runtime": "^7.12.5", + "@matrix-org/analytics-events": "^0.1.1", "@sentry/browser": "^6.11.0", "@sentry/tracing": "^6.11.0", "@testing-library/react": "^12.1.5", @@ -89,7 +90,6 @@ "linkifyjs": "4.0.0-beta.4", "lodash": "^4.17.20", "maplibre-gl": "^1.15.2", - "matrix-analytics-events": "github:matrix-org/matrix-analytics-events.git#a0687ca6fbdb7258543d49b99fb88b9201e900b0", "matrix-encrypt-attachment": "^1.0.3", "matrix-events-sdk": "^0.0.1-beta.7", "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", diff --git a/scripts/ci/install-deps.sh b/scripts/ci/install-deps.sh index c10884361e..7121e7a36c 100755 --- a/scripts/ci/install-deps.sh +++ b/scripts/ci/install-deps.sh @@ -19,8 +19,9 @@ scripts/fetchdep.sh matrix-org matrix-analytics-events main pushd matrix-analytics-events yarn link yarn install --pure-lockfile $@ +yarn build:ts popd yarn link matrix-js-sdk -yarn link matrix-analytics-events +yarn link @matrix-org/analytics-events yarn install --pure-lockfile $@ diff --git a/scripts/ci/layered.sh b/scripts/ci/layered.sh index e66eddf9aa..fdde9dd828 100755 --- a/scripts/ci/layered.sh +++ b/scripts/ci/layered.sh @@ -24,11 +24,12 @@ scripts/fetchdep.sh matrix-org matrix-analytics-events main pushd matrix-analytics-events yarn link yarn install --pure-lockfile +yarn build:ts popd # Now set up the react-sdk yarn link matrix-js-sdk -yarn link matrix-analytics-events +yarn link @matrix-org/analytics-events yarn link yarn install --pure-lockfile diff --git a/src/DecryptionFailureTracker.ts b/src/DecryptionFailureTracker.ts index c56b245f25..eb1090f67d 100644 --- a/src/DecryptionFailureTracker.ts +++ b/src/DecryptionFailureTracker.ts @@ -16,7 +16,7 @@ limitations under the License. import { MatrixError } from "matrix-js-sdk/src/http-api"; import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { Error as ErrorEvent } from "matrix-analytics-events/types/typescript/Error"; +import { Error as ErrorEvent } from "@matrix-org/analytics-events/types/typescript/Error"; import Analytics from "./Analytics"; import { PosthogAnalytics } from './PosthogAnalytics'; diff --git a/src/PosthogAnalytics.ts b/src/PosthogAnalytics.ts index 3ce8707d1c..b4e3a463bd 100644 --- a/src/PosthogAnalytics.ts +++ b/src/PosthogAnalytics.ts @@ -17,8 +17,8 @@ limitations under the License. import posthog, { PostHog } from 'posthog-js'; import { MatrixClient } from "matrix-js-sdk/src/client"; import { logger } from "matrix-js-sdk/src/logger"; -import { UserProperties } from "matrix-analytics-events/types/typescript/UserProperties"; -import { Signup } from 'matrix-analytics-events/types/typescript/Signup'; +import { UserProperties } from "@matrix-org/analytics-events/types/typescript/UserProperties"; +import { Signup } from '@matrix-org/analytics-events/types/typescript/Signup'; import PlatformPeg from './PlatformPeg'; import SdkConfig from './SdkConfig'; diff --git a/src/PosthogTrackers.ts b/src/PosthogTrackers.ts index 434d142c8c..f0cb75f368 100644 --- a/src/PosthogTrackers.ts +++ b/src/PosthogTrackers.ts @@ -15,8 +15,8 @@ limitations under the License. */ import { PureComponent, SyntheticEvent } from "react"; -import { WebScreen as ScreenEvent } from "matrix-analytics-events/types/typescript/WebScreen"; -import { Interaction as InteractionEvent } from "matrix-analytics-events/types/typescript/Interaction"; +import { WebScreen as ScreenEvent } from "@matrix-org/analytics-events/types/typescript/WebScreen"; +import { Interaction as InteractionEvent } from "@matrix-org/analytics-events/types/typescript/Interaction"; import PageType from "./PageTypes"; import Views from "./Views"; diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 4227577d20..75c9e078e4 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -25,7 +25,7 @@ import * as ContentHelpers from 'matrix-js-sdk/src/content-helpers'; import { Element as ChildElement, parseFragment as parseHtml } from "parse5"; import { logger } from "matrix-js-sdk/src/logger"; import { IContent } from 'matrix-js-sdk/src/models/event'; -import { SlashCommand as SlashCommandEvent } from "matrix-analytics-events/types/typescript/SlashCommand"; +import { SlashCommand as SlashCommandEvent } from "@matrix-org/analytics-events/types/typescript/SlashCommand"; import { MatrixClientPeg } from './MatrixClientPeg'; import dis from './dispatcher/dispatcher'; diff --git a/src/components/views/dialogs/SpotlightDialog.tsx b/src/components/views/dialogs/SpotlightDialog.tsx index f5efc0b8dc..3287a9b95a 100644 --- a/src/components/views/dialogs/SpotlightDialog.tsx +++ b/src/components/views/dialogs/SpotlightDialog.tsx @@ -30,7 +30,7 @@ import { normalize } from "matrix-js-sdk/src/utils"; import { IHierarchyRoom } from "matrix-js-sdk/src/@types/spaces"; import { RoomHierarchy } from "matrix-js-sdk/src/room-hierarchy"; import { RoomType } from "matrix-js-sdk/src/@types/event"; -import { WebSearch as WebSearchEvent } from "matrix-analytics-events/types/typescript/WebSearch"; +import { WebSearch as WebSearchEvent } from "@matrix-org/analytics-events/types/typescript/WebSearch"; import { IDialogProps } from "./IDialogProps"; import { _t } from "../../../languageHandler"; diff --git a/src/components/views/elements/SSOButtons.tsx b/src/components/views/elements/SSOButtons.tsx index 16f860792b..666e55eab4 100644 --- a/src/components/views/elements/SSOButtons.tsx +++ b/src/components/views/elements/SSOButtons.tsx @@ -18,7 +18,7 @@ import React from "react"; import { chunk } from "lodash"; import classNames from "classnames"; import { MatrixClient } from "matrix-js-sdk/src/client"; -import { Signup } from "matrix-analytics-events/types/typescript/Signup"; +import { Signup } from "@matrix-org/analytics-events/types/typescript/Signup"; import PlatformPeg from "../../../PlatformPeg"; import AccessibleButton from "./AccessibleButton"; diff --git a/src/components/views/rooms/EditMessageComposer.tsx b/src/components/views/rooms/EditMessageComposer.tsx index de1bdc9c85..913dd9ec14 100644 --- a/src/components/views/rooms/EditMessageComposer.tsx +++ b/src/components/views/rooms/EditMessageComposer.tsx @@ -20,7 +20,7 @@ import { EventStatus, IContent, MatrixEvent } from 'matrix-js-sdk/src/models/eve import { MsgType } from 'matrix-js-sdk/src/@types/event'; import { Room } from 'matrix-js-sdk/src/models/room'; import { logger } from "matrix-js-sdk/src/logger"; -import { Composer as ComposerEvent } from "matrix-analytics-events/types/typescript/Composer"; +import { Composer as ComposerEvent } from "@matrix-org/analytics-events/types/typescript/Composer"; import { _t } from '../../../languageHandler'; import dis from '../../../dispatcher/dispatcher'; diff --git a/src/components/views/rooms/SendMessageComposer.tsx b/src/components/views/rooms/SendMessageComposer.tsx index c115aa0813..212c976ded 100644 --- a/src/components/views/rooms/SendMessageComposer.tsx +++ b/src/components/views/rooms/SendMessageComposer.tsx @@ -21,7 +21,7 @@ import { DebouncedFunc, throttle } from 'lodash'; import { EventType, RelationType } from "matrix-js-sdk/src/@types/event"; import { logger } from "matrix-js-sdk/src/logger"; import { Room } from 'matrix-js-sdk/src/models/room'; -import { Composer as ComposerEvent } from "matrix-analytics-events/types/typescript/Composer"; +import { Composer as ComposerEvent } from "@matrix-org/analytics-events/types/typescript/Composer"; import { THREAD_RELATION_TYPE } from 'matrix-js-sdk/src/models/thread'; import dis from '../../../dispatcher/dispatcher'; diff --git a/src/dispatcher/payloads/JoinRoomPayload.ts b/src/dispatcher/payloads/JoinRoomPayload.ts index 5937475e2d..61a1ca0e66 100644 --- a/src/dispatcher/payloads/JoinRoomPayload.ts +++ b/src/dispatcher/payloads/JoinRoomPayload.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { JoinedRoom as JoinedRoomEvent } from "matrix-analytics-events/types/typescript/JoinedRoom"; +import { JoinedRoom as JoinedRoomEvent } from "@matrix-org/analytics-events/types/typescript/JoinedRoom"; import { IJoinRoomOpts } from "matrix-js-sdk/src/@types/requests"; import { ActionPayload } from "../payloads"; diff --git a/src/dispatcher/payloads/JoinRoomReadyPayload.ts b/src/dispatcher/payloads/JoinRoomReadyPayload.ts index 2f16028bc7..5dc91a18fd 100644 --- a/src/dispatcher/payloads/JoinRoomReadyPayload.ts +++ b/src/dispatcher/payloads/JoinRoomReadyPayload.ts @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -import { JoinedRoom as JoinedRoomEvent } from "matrix-analytics-events/types/typescript/JoinedRoom"; +import { JoinedRoom as JoinedRoomEvent } from "@matrix-org/analytics-events/types/typescript/JoinedRoom"; import { ActionPayload } from "../payloads"; import { Action } from "../actions"; diff --git a/src/dispatcher/payloads/ViewRoomPayload.ts b/src/dispatcher/payloads/ViewRoomPayload.ts index 376fce2d58..d3412ab3a2 100644 --- a/src/dispatcher/payloads/ViewRoomPayload.ts +++ b/src/dispatcher/payloads/ViewRoomPayload.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { MatrixEvent } from "matrix-js-sdk/src/models/event"; -import { ViewRoom as ViewRoomEvent } from "matrix-analytics-events/types/typescript/ViewRoom"; +import { ViewRoom as ViewRoomEvent } from "@matrix-org/analytics-events/types/typescript/ViewRoom"; import { ActionPayload } from "../payloads"; import { Action } from "../actions"; diff --git a/src/stores/RoomViewStore.tsx b/src/stores/RoomViewStore.tsx index d8259097a2..2a72f518bf 100644 --- a/src/stores/RoomViewStore.tsx +++ b/src/stores/RoomViewStore.tsx @@ -20,8 +20,8 @@ import React, { ReactNode } from "react"; import { Store } from 'flux/utils'; import { MatrixError } from "matrix-js-sdk/src/http-api"; import { logger } from "matrix-js-sdk/src/logger"; -import { ViewRoom as ViewRoomEvent } from "matrix-analytics-events/types/typescript/ViewRoom"; -import { JoinedRoom as JoinedRoomEvent } from "matrix-analytics-events/types/typescript/JoinedRoom"; +import { ViewRoom as ViewRoomEvent } from "@matrix-org/analytics-events/types/typescript/ViewRoom"; +import { JoinedRoom as JoinedRoomEvent } from "@matrix-org/analytics-events/types/typescript/JoinedRoom"; import { JoinRule } from "matrix-js-sdk/src/@types/partials"; import { Room } from "matrix-js-sdk/src/models/room"; import { ClientEvent } from "matrix-js-sdk/src/client"; diff --git a/src/utils/rooms.ts b/src/utils/rooms.ts index 805135be27..3be6c00e67 100644 --- a/src/utils/rooms.ts +++ b/src/utils/rooms.ts @@ -15,7 +15,7 @@ limitations under the License. */ import { IInstance, IProtocol, IPublicRoomsChunkRoom, MatrixClient } from "matrix-js-sdk/src/client"; -import { ViewRoom as ViewRoomEvent } from "matrix-analytics-events/types/typescript/ViewRoom"; +import { ViewRoom as ViewRoomEvent } from "@matrix-org/analytics-events/types/typescript/ViewRoom"; import { Action } from "../dispatcher/actions"; import { ViewRoomPayload } from "../dispatcher/payloads/ViewRoomPayload"; diff --git a/test/components/views/beacon/__snapshots__/BeaconMarker-test.tsx.snap b/test/components/views/beacon/__snapshots__/BeaconMarker-test.tsx.snap index a79a47b589..b82f98dc4e 100644 --- a/test/components/views/beacon/__snapshots__/BeaconMarker-test.tsx.snap +++ b/test/components/views/beacon/__snapshots__/BeaconMarker-test.tsx.snap @@ -33,7 +33,7 @@ exports[` renders marker when beacon has location 1`] = ` }, "_maxListeners": undefined, "clearLatestLocation": [Function], - "livenessWatchInterval": undefined, + "livenessWatchTimeout": undefined, "roomId": "!room:server", "rootEvent": Object { "content": Object { diff --git a/test/components/views/beacon/__snapshots__/BeaconStatus-test.tsx.snap b/test/components/views/beacon/__snapshots__/BeaconStatus-test.tsx.snap index b27f9ee191..4e565b3fb9 100644 --- a/test/components/views/beacon/__snapshots__/BeaconStatus-test.tsx.snap +++ b/test/components/views/beacon/__snapshots__/BeaconStatus-test.tsx.snap @@ -19,7 +19,7 @@ exports[` active state renders without children 1`] = ` "_latestLocationState": undefined, "_maxListeners": undefined, "clearLatestLocation": [Function], - "livenessWatchInterval": undefined, + "livenessWatchTimeout": undefined, "roomId": "!room:server", "rootEvent": Object { "content": Object { @@ -81,7 +81,7 @@ exports[` active state renders without children 1`] = ` "_latestLocationState": undefined, "_maxListeners": undefined, "clearLatestLocation": [Function], - "livenessWatchInterval": undefined, + "livenessWatchTimeout": undefined, "roomId": "!room:server", "rootEvent": Object { "content": Object { diff --git a/yarn.lock b/yarn.lock index bad8e9ca76..bd1bf6feec 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1468,6 +1468,11 @@ resolved "https://registry.yarnpkg.com/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz#497c67a1cef50d1a2459ba60f315e448d2ad87fe" integrity sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q== +"@matrix-org/analytics-events@^0.1.1": + version "0.1.1" + resolved "https://registry.yarnpkg.com/@matrix-org/analytics-events/-/analytics-events-0.1.1.tgz#ae95b0c1fb86a094c5f51d121f10e6a1b1ddca68" + integrity sha512-PIDkfYMNmph6x/rfgtIeQXUWj9hGzTLnOCFUYZFBnoTiS4UXkH73bz77Ho12uoUezUz4v40mxTXdrFxp8Zo6zA== + "@matrix-org/olm@https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.8.tgz": version "3.2.8" resolved "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.8.tgz#8d53636d045e1776e2a2ec6613e57330dd9ce856" @@ -6851,10 +6856,6 @@ mathml-tag-names@^2.1.3: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== -"matrix-analytics-events@github:matrix-org/matrix-analytics-events.git#a0687ca6fbdb7258543d49b99fb88b9201e900b0": - version "0.0.1" - resolved "https://codeload.github.com/matrix-org/matrix-analytics-events/tar.gz/a0687ca6fbdb7258543d49b99fb88b9201e900b0" - matrix-encrypt-attachment@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/matrix-encrypt-attachment/-/matrix-encrypt-attachment-1.0.3.tgz#6e016587728c396549c833985f39cbf6c07ee97b"