From 976345c8358314066006bebd3f397a3063ca2cad Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 1 Mar 2023 09:12:14 +0000 Subject: [PATCH] Downgrade matrix-events-sdk, update yarn.lock, remove stub package (#10262) * Update yarn.lock, remove stub package, fix peer deps * iterate * Iterate * Resolutions * Apply resolution for @types/react * Fix more types * Fix strict types * Unbreak jest --- package.json | 11 ++-- src/components/structures/SpaceHierarchy.tsx | 1 + src/components/views/spaces/SpacePanel.tsx | 1 + .../views/spaces/SpaceTreeLevel.tsx | 2 +- .../LegacyCallView/LegacyCallViewButtons.tsx | 4 +- yarn.lock | 50 ++++--------------- 6 files changed, 22 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 491c113568..e0df58362a 100644 --- a/package.json +++ b/package.json @@ -54,6 +54,10 @@ "test:cypress:open": "cypress open", "coverage": "yarn test --coverage" }, + "resolutions": { + "@types/react-dom": "17.0.19", + "@types/react": "17.0.53" + }, "dependencies": { "@babel/runtime": "^7.12.5", "@matrix-org/analytics-events": "^0.4.0", @@ -92,7 +96,7 @@ "lodash": "^4.17.20", "maplibre-gl": "^2.0.0", "matrix-encrypt-attachment": "^1.0.3", - "matrix-events-sdk": "2.0.0", + "matrix-events-sdk": "0.0.1", "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", "matrix-widget-api": "^1.1.1", "minimist": "^1.2.5", @@ -143,7 +147,6 @@ "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^12.1.5", "@testing-library/user-event": "^14.4.3", - "@types/classnames": "^2.2.11", "@types/commonmark": "^0.27.4", "@types/counterpart": "^0.18.1", "@types/css-font-loading-module": "^0.0.7", @@ -164,9 +167,9 @@ "@types/pako": "^2.0.0", "@types/parse5": "^6.0.0", "@types/qrcode": "^1.3.5", - "@types/react": "17.0.49", + "@types/react": "17.0.53", "@types/react-beautiful-dnd": "^13.0.0", - "@types/react-dom": "17.0.17", + "@types/react-dom": "17.0.19", "@types/react-transition-group": "^4.4.0", "@types/sanitize-html": "2.8.0", "@types/tar-js": "^0.3.2", diff --git a/src/components/structures/SpaceHierarchy.tsx b/src/components/structures/SpaceHierarchy.tsx index 8968f9c785..94cd6c5638 100644 --- a/src/components/structures/SpaceHierarchy.tsx +++ b/src/components/structures/SpaceHierarchy.tsx @@ -332,6 +332,7 @@ const Tile: React.FC = ({
  • { onExpand?: Function; parents?: Set; innerRef?: LegacyRef; - dragHandleProps?: DraggableProvidedDragHandleProps; + dragHandleProps?: DraggableProvidedDragHandleProps | null; } interface IItemState { diff --git a/src/components/views/voip/LegacyCallView/LegacyCallViewButtons.tsx b/src/components/views/voip/LegacyCallView/LegacyCallViewButtons.tsx index 0ff66fc4e8..471bcb03a0 100644 --- a/src/components/views/voip/LegacyCallView/LegacyCallViewButtons.tsx +++ b/src/components/views/voip/LegacyCallView/LegacyCallViewButtons.tsx @@ -34,6 +34,7 @@ import { import { _t } from "../../../../languageHandler"; import DeviceContextMenu from "../../context_menus/DeviceContextMenu"; import { MediaDeviceKindEnum } from "../../../../MediaDeviceHandler"; +import { ButtonEvent } from "../../elements/AccessibleButton"; // Height of the header duplicated from CSS because we need to subtract it from our max // height to get the max height of the video @@ -46,7 +47,6 @@ interface IButtonProps extends Omit void; } const LegacyCallViewToggleButton: React.FC = ({ @@ -86,7 +86,7 @@ const LegacyCallViewDropdownButton: React.FC = ({ state, d mx_LegacyCallViewButtons_dropdownButton_collapsed: !menuDisplayed, }); - const onClick = (event: React.MouseEvent): void => { + const onClick = (event: ButtonEvent): void => { event.stopPropagation(); openMenu(); }; diff --git a/yarn.lock b/yarn.lock index 29cc9e81f9..871f105ab4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2130,13 +2130,6 @@ dependencies: "@types/node" "*" -"@types/classnames@^2.2.11": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@types/classnames/-/classnames-2.3.1.tgz#3c2467aa0f1a93f1f021e3b9bcf938bd5dfdc0dd" - integrity sha512-zeOWb0JGBoVmlQoznvqXbE0tEC/HONsnoUNH19Hc96NFsTAwTXbTqb8FMYkru1F/iqp7a18Ws3nWJvtA1sHD1A== - dependencies: - classnames "*" - "@types/commonmark@^0.27.4": version "0.27.5" resolved "https://registry.yarnpkg.com/@types/commonmark/-/commonmark-0.27.5.tgz#008f2e8fb845c906146aa97510d66953d916aed2" @@ -2385,10 +2378,10 @@ dependencies: "@types/react" "*" -"@types/react-dom@17.0.17", "@types/react-dom@<18.0.0": - version "17.0.17" - resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.17.tgz#2e3743277a793a96a99f1bf87614598289da68a1" - integrity sha512-VjnqEmqGnasQKV0CWLevqMTXBYG9GbwuE6x3VetERLh0cq2LTptFE73MrQi2S7GkKXCf2GgwItB/melLnxfnsg== +"@types/react-dom@17.0.19", "@types/react-dom@<18.0.0": + version "17.0.19" + resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-17.0.19.tgz#36feef3aa35d045cacd5ed60fe0eef5272f19492" + integrity sha512-PiYG40pnQRdPHnlf7tZnp0aQ6q9tspYr72vD61saO6zFCybLfMqwUCN0va1/P+86DXn18ZWeW30Bk7xlC5eEAQ== dependencies: "@types/react" "^17" @@ -2409,10 +2402,10 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@17.0.49", "@types/react@^17": - version "17.0.49" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.49.tgz#df87ba4ca8b7942209c3dc655846724539dc1049" - integrity sha512-CCBPMZaPhcKkYUTqFs/hOWqKjPxhTEmnZWjlHHgIMop67DsXywf9B5Os9Hz8KSacjNOgIdnZVJamwl232uxoPg== +"@types/react@*", "@types/react@17.0.53", "@types/react@^17": + version "17.0.53" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.53.tgz#10d4d5999b8af3d6bc6a9369d7eb953da82442ab" + integrity sha512-1yIpQR2zdYu1Z/dc1OxC+MA6GR240u3gcnP4l6mvj/PJiVaqHsQPmWttsvHsfnhfPbU2FuGmo0wSITPygjBmsw== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" @@ -2650,11 +2643,6 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv-errors@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ajv-errors/-/ajv-errors-3.0.0.tgz#e54f299f3a3d30fe144161e5f0d8d51196c527bc" - integrity sha512-V3wD15YHfHz6y0KdhYFjyy9vWtEVALT9UrxfN3zqlI6dMioHnJrqOYfyPKol3oqrnCM9uwkcdCwkJ0WUcbLMTQ== - ajv-keywords@^3.5.2: version "3.5.2" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" @@ -2670,17 +2658,7 @@ ajv@^6.10.0, ajv@^6.12.4, ajv@^6.12.5: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.1: - version "8.11.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.11.2.tgz#aecb20b50607acf2569b6382167b65a96008bb78" - integrity sha512-E4bfmKAhGiSTvMfL1Myyycaub+cUEU2/IvpylXkUu7CHBkBj1f/ikdzbD7YQ6FKUbixDxeYvB/xY4fvyroDlQg== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - -ajv@^8.11.2, ajv@^8.6.2: +ajv@^8.0.1, ajv@^8.6.2: version "8.12.0" resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== @@ -3296,7 +3274,7 @@ cjs-module-lexer@^1.0.0: resolved "https://registry.yarnpkg.com/cjs-module-lexer/-/cjs-module-lexer-1.2.2.tgz#9f84ba3244a512f3a54e5277e8eef4c489864e40" integrity sha512-cOU9usZw8/dXIXKtwa8pM0OTJQuJkxMN6w30csNRUerHfeQ5R6U3kkU/FtJeIf3M202OHfY2U8ccInBG7/xogA== -classnames@*, classnames@^2.2.6: +classnames@^2.2.6: version "2.3.2" resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.2.tgz#351d813bf0137fcc6a76a16b88208d2560a0d924" integrity sha512-CSbhY4cFEJRe6/GQzIk5qXZ4Jeg5pcsP7b5peFSDpffpe1cqjASH/n9UTjBwOp6XpMSTwQ8Za2K5V02ueA7Tmw== @@ -6574,14 +6552,6 @@ matrix-events-sdk@0.0.1: resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd" integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA== -matrix-events-sdk@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-2.0.0.tgz#f5f8dafbe4eae07fdbb628627f430ca5b1fd8c7a" - integrity sha512-UZbifYIO2o9+sNn4YuGjhMof/88TG68PyecKnH/pt8V3MFq0RZsbBUe+3/k5ZeVcEtr0pQLmcKB7d8aQVsVO/w== - dependencies: - ajv "^8.11.2" - ajv-errors "^3.0.0" - "matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": version "23.4.0" resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/437128d11b7043c1b71371f201af6f7c5f451589"