diff --git a/jest.config.ts b/jest.config.ts index 82f169b9de..e6c29b792d 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -46,6 +46,7 @@ const config: Config = { ], collectCoverageFrom: [ "/src/**/*.{js,ts,tsx}", + "/packages/**/*.{js,ts,tsx}", // getSessionLock is piped into a different JS context via stringification, and the coverage functionality is // not available in that contest. So, turn off coverage instrumentation for it. "!/src/utils/SessionLock.ts", diff --git a/package.json b/package.json index 4b5eb021f0..4b5456f4ec 100644 --- a/package.json +++ b/package.json @@ -68,10 +68,10 @@ "postinstall": "patch-package" }, "resolutions": { - "**/pretty-format/react-is": "19.1.1", + "**/pretty-format/react-is": "19.2.0", "@playwright/test": "1.56.0", - "@types/react": "19.1.14", - "@types/react-dom": "19.1.9", + "@types/react": "19.2.2", + "@types/react-dom": "19.2.1", "oidc-client-ts": "3.3.0", "jwt-decode": "4.0.0", "caniuse-lite": "1.0.30001750", @@ -214,9 +214,9 @@ "@types/node-fetch": "^2.6.2", "@types/pako": "^2.0.0", "@types/qrcode": "^1.3.5", - "@types/react": "19.1.14", + "@types/react": "19.2.2", "@types/react-beautiful-dnd": "^13.0.0", - "@types/react-dom": "19.1.9", + "@types/react-dom": "19.2.1", "@types/react-transition-group": "^4.4.0", "@types/sanitize-html": "2.16.0", "@types/sdp-transform": "^2.4.10", @@ -242,12 +242,12 @@ "eslint-config-prettier": "^10.0.0", "eslint-plugin-deprecate": "0.8.7", "eslint-plugin-import": "^2.25.4", - "eslint-plugin-jest": "^28.0.0", + "eslint-plugin-jest": "^29.0.0", "eslint-plugin-jsx-a11y": "^6.5.1", "eslint-plugin-matrix-org": "^3.0.0", "eslint-plugin-react": "^7.28.0", "eslint-plugin-react-compiler": "^19.0.0-beta-df7b47d-20241124", - "eslint-plugin-react-hooks": "^5.0.0", + "eslint-plugin-react-hooks": "^7.0.0", "eslint-plugin-unicorn": "^56.0.0", "express": "^5.0.0", "fake-indexeddb": "^6.0.0", diff --git a/packages/shared-components/package.json b/packages/shared-components/package.json index df770b1491..4fabf2d83c 100644 --- a/packages/shared-components/package.json +++ b/packages/shared-components/package.json @@ -43,7 +43,8 @@ }, "dependencies": { "matrix-web-i18n": "^3.4.0", - "patch-package": "^8.0.1" + "patch-package": "^8.0.1", + "counterpart": "^0.18.6" }, "devDependencies": { "@storybook/addon-a11y": "^9.1.10", @@ -54,7 +55,6 @@ "@storybook/test-runner": "^0.23.0", "concurrently": "^9.2.1", "eslint": "8", - "jest-image-snapshot": "^6.5.1", "eslint-plugin-storybook": "^9.1.10", "jest-image-snapshot": "^6.5.1", "patch-package": "^8.0.1", diff --git a/packages/shared-components/src/ViewWrapper.tsx b/packages/shared-components/src/ViewWrapper.tsx index 57b81bd5b9..d0d445ea5c 100644 --- a/packages/shared-components/src/ViewWrapper.tsx +++ b/packages/shared-components/src/ViewWrapper.tsx @@ -8,8 +8,8 @@ import React, { type JSX, useMemo, type ComponentType } from "react"; import { omitBy, pickBy } from "lodash"; -import { MockViewModel } from "./MockViewModel"; -import { type ViewModel } from "./ViewModel"; +import { MockViewModel } from "./viewmodel/MockViewModel"; +import { type ViewModel } from "./viewmodel/ViewModel"; interface ViewWrapperProps { /** diff --git a/packages/shared-components/src/audio/AudioPlayerView/AudioPlayerView.test.tsx b/packages/shared-components/src/audio/AudioPlayerView/AudioPlayerView.test.tsx index 3f08eec28c..018b388f6b 100644 --- a/packages/shared-components/src/audio/AudioPlayerView/AudioPlayerView.test.tsx +++ b/packages/shared-components/src/audio/AudioPlayerView/AudioPlayerView.test.tsx @@ -13,7 +13,7 @@ import { fireEvent } from "@testing-library/dom"; import * as stories from "./AudioPlayerView.stories.tsx"; import { AudioPlayerView, type AudioPlayerViewActions, type AudioPlayerViewSnapshot } from "./AudioPlayerView"; -import { MockViewModel } from "../../MockViewModel"; +import { MockViewModel } from "../../viewmodel/MockViewModel.ts"; const { Default, NoMediaName, NoSize, HasError } = composeStories(stories); diff --git a/packages/shared-components/src/audio/AudioPlayerView/AudioPlayerView.tsx b/packages/shared-components/src/audio/AudioPlayerView/AudioPlayerView.tsx index f963c8b2cf..29fb02ba34 100644 --- a/packages/shared-components/src/audio/AudioPlayerView/AudioPlayerView.tsx +++ b/packages/shared-components/src/audio/AudioPlayerView/AudioPlayerView.tsx @@ -7,7 +7,7 @@ import React, { type ChangeEventHandler, type JSX, type KeyboardEventHandler, type MouseEventHandler } from "react"; -import { type ViewModel } from "../../ViewModel"; +import { type ViewModel } from "../../viewmodel/ViewModel"; import { useViewModel } from "../../useViewModel"; import { MediaBody } from "../../message-body/MediaBody"; import { Flex } from "../../utils/Flex"; diff --git a/packages/shared-components/src/audio/AudioPlayerView/__snapshots__/AudioPlayerView.test.tsx.snap b/packages/shared-components/src/audio/AudioPlayerView/__snapshots__/AudioPlayerView.test.tsx.snap index 790ab16870..0687ea44a8 100644 --- a/packages/shared-components/src/audio/AudioPlayerView/__snapshots__/AudioPlayerView.test.tsx.snap +++ b/packages/shared-components/src/audio/AudioPlayerView/__snapshots__/AudioPlayerView.test.tsx.snap @@ -15,7 +15,7 @@ exports[`AudioPlayerView renders the audio player in default state 1`] = `