Bump matrix-js-sdk to v36.1.0 (#2967)

Co-authored-by: Hugh Nimmo-Smith <hughns@element.io>
This commit is contained in:
Timo
2025-02-03 13:28:12 +01:00
committed by GitHub
parent 1dde54daa9
commit bff2b73c85
7 changed files with 18 additions and 17 deletions

View File

@@ -90,7 +90,7 @@
"livekit-client": "^2.5.7", "livekit-client": "^2.5.7",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"loglevel": "^1.9.1", "loglevel": "^1.9.1",
"matrix-js-sdk": "matrix-org/matrix-js-sdk#develop", "matrix-js-sdk": "^36.1.0",
"matrix-widget-api": "^1.10.0", "matrix-widget-api": "^1.10.0",
"normalize.css": "^8.0.1", "normalize.css": "^8.0.1",
"observable-hooks": "^4.2.3", "observable-hooks": "^4.2.3",

View File

@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
*/ */
import { useEffect, useCallback, useRef, useState } from "react"; import { useEffect, useCallback, useRef, useState } from "react";
import { randomString } from "matrix-js-sdk/src/randomstring"; import { secureRandomString } from "matrix-js-sdk/src/randomstring";
import { useTranslation } from "react-i18next"; import { useTranslation } from "react-i18next";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/src/logger";
@@ -31,7 +31,7 @@ export function useRecaptcha(sitekey?: string): {
recaptchaId: string; recaptchaId: string;
} { } {
const { t } = useTranslation(); const { t } = useTranslation();
const [recaptchaId] = useState(() => randomString(16)); const [recaptchaId] = useState(() => secureRandomString(16));
const promiseRef = useRef<RecaptchaPromiseRef | undefined>(undefined); const promiseRef = useRef<RecaptchaPromiseRef | undefined>(undefined);
useEffect(() => { useEffect(() => {

View File

@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
*/ */
import { useCallback } from "react"; import { useCallback } from "react";
import { randomString } from "matrix-js-sdk/src/randomstring"; import { secureRandomString } from "matrix-js-sdk/src/randomstring";
import { useClient } from "../ClientContext"; import { useClient } from "../ClientContext";
import { useInteractiveRegistration } from "../auth/useInteractiveRegistration"; import { useInteractiveRegistration } from "../auth/useInteractiveRegistration";
@@ -42,7 +42,7 @@ export function useRegisterPasswordlessUser(): UseRegisterPasswordlessUserType {
const userName = generateRandomName(); const userName = generateRandomName();
const [client, session] = await register( const [client, session] = await register(
userName, userName,
randomString(16), secureRandomString(16),
displayName, displayName,
recaptchaResponse, recaptchaResponse,
true, true,

View File

@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
*/ */
import { type FC, useCallback, useState, type FormEventHandler } from "react"; import { type FC, useCallback, useState, type FormEventHandler } from "react";
import { randomString } from "matrix-js-sdk/src/randomstring"; import { secureRandomString } from "matrix-js-sdk/src/randomstring";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { Button, Heading, Text } from "@vector-im/compound-web"; import { Button, Heading, Text } from "@vector-im/compound-web";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/src/logger";
@@ -67,7 +67,7 @@ export const UnauthenticatedView: FC = () => {
const userName = generateRandomName(); const userName = generateRandomName();
const [client, session] = await register( const [client, session] = await register(
userName, userName,
randomString(16), secureRandomString(16),
displayName, displayName,
recaptchaResponse, recaptchaResponse,
true, true,

View File

@@ -6,7 +6,7 @@ Please see LICENSE in the repository root for full details.
*/ */
import { type ChangeEvent, type FC, useCallback } from "react"; import { type ChangeEvent, type FC, useCallback } from "react";
import { randomString } from "matrix-js-sdk/src/randomstring"; import { secureRandomString } from "matrix-js-sdk/src/randomstring";
import { Trans, useTranslation } from "react-i18next"; import { Trans, useTranslation } from "react-i18next";
import { Button, Text } from "@vector-im/compound-web"; import { Button, Text } from "@vector-im/compound-web";
import { logger } from "matrix-js-sdk/src/logger"; import { logger } from "matrix-js-sdk/src/logger";
@@ -36,7 +36,7 @@ export const FeedbackSettingsTab: FC<Props> = ({ roomId }) => {
const description = const description =
typeof descriptionData === "string" ? descriptionData : ""; typeof descriptionData === "string" ? descriptionData : "";
const sendLogs = Boolean(data.get("sendLogs")); const sendLogs = Boolean(data.get("sendLogs"));
const rageshakeRequestId = randomString(16); const rageshakeRequestId = secureRandomString(16);
submitRageshake({ submitRageshake({
description, description,

View File

@@ -30,7 +30,7 @@ Please see LICENSE in the repository root for full details.
import EventEmitter from "events"; import EventEmitter from "events";
import { throttle } from "lodash-es"; import { throttle } from "lodash-es";
import { type Logger, logger } from "matrix-js-sdk/src/logger"; import { type Logger, logger } from "matrix-js-sdk/src/logger";
import { randomString } from "matrix-js-sdk/src/randomstring"; import { secureRandomString } from "matrix-js-sdk/src/randomstring";
import { type LoggingMethod } from "loglevel"; import { type LoggingMethod } from "loglevel";
import type loglevel from "loglevel"; import type loglevel from "loglevel";
@@ -128,7 +128,7 @@ class IndexedDBLogStore {
private indexedDB: IDBFactory, private indexedDB: IDBFactory,
private loggerInstance: ConsoleLogger, private loggerInstance: ConsoleLogger,
) { ) {
this.id = "instance-" + randomString(16); this.id = "instance-" + secureRandomString(16);
loggerInstance.on(ConsoleLoggerEvent.Log, this.onLoggerLog); loggerInstance.on(ConsoleLoggerEvent.Log, this.onLoggerLog);
window.addEventListener("beforeunload", () => { window.addEventListener("beforeunload", () => {

View File

@@ -6317,9 +6317,10 @@ matrix-events-sdk@0.0.1:
resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd" resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd"
integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA== integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA==
matrix-js-sdk@matrix-org/matrix-js-sdk#develop: matrix-js-sdk@^36.1.0:
version "35.1.0" version "36.1.0"
resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/9134471dc72a14b29eb207f1c5ef207521f40bd3" resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-36.1.0.tgz#3685a85c0c1adf4e2c3622bce76c11430963f23d"
integrity sha512-KNPswMSAGKDxBybJedxRpWadaRes9paxmjTCUsQT8t1Jg3ZENraAt6ynIaxh6PxazAH9D5ly6EYKHaLMLbZ1Dg==
dependencies: dependencies:
"@babel/runtime" "^7.12.5" "@babel/runtime" "^7.12.5"
"@matrix-org/matrix-sdk-crypto-wasm" "^12.1.0" "@matrix-org/matrix-sdk-crypto-wasm" "^12.1.0"
@@ -6338,9 +6339,9 @@ matrix-js-sdk@matrix-org/matrix-js-sdk#develop:
uuid "11" uuid "11"
matrix-widget-api@^1.10.0: matrix-widget-api@^1.10.0:
version "1.11.0" version "1.13.0"
resolved "https://registry.yarnpkg.com/matrix-widget-api/-/matrix-widget-api-1.11.0.tgz#2f548b11a7c0df789d5d4fdb5cc9ef7af8aef3da" resolved "https://registry.yarnpkg.com/matrix-widget-api/-/matrix-widget-api-1.13.0.tgz#40344b264b08d6d98ab9d547a41eb74dd6d8c3f7"
integrity sha512-ED/9hrJqDWVLeED0g1uJnYRhINh3ZTquwurdM+Hc8wLVJIQ8G/r7A7z74NC+8bBIHQ1Jo7i1Uq5CoJp/TzFYrA== integrity sha512-+LrvwkR1izL4h2euX8PDrvG/3PZZDEd6As+lmnR3jAVwbFJtU5iTnwmZGnCca9ddngCvXvAHkcpJBEPyPTZneQ==
dependencies: dependencies:
"@types/events" "^3.0.0" "@types/events" "^3.0.0"
events "^3.2.0" events "^3.2.0"