1
0
Fork 0
mirror of https://github.com/mat-1/variance.git synced 2025-08-02 15:26:04 +00:00

upgrade deps

This commit is contained in:
mat 2025-04-21 15:09:45 -13:45
parent 9aada82b85
commit f00612a462
9 changed files with 887 additions and 889 deletions

View file

@ -3,7 +3,3 @@ compressionLevel: mixed
enableGlobalCache: false
nodeLinker: node-modules
npmScopes:
matrix-org:
npmRegistryServer: 'https://gitlab.matrix.org/api/v4/projects/27/packages/npm/'

View file

@ -19,72 +19,72 @@
"author": "Variance and Cinny contributors",
"license": "AGPL-3.0-only",
"dependencies": {
"@floating-ui/react": "^0.27.3",
"@fontsource/atkinson-hyperlegible": "5.1.1",
"@khanacademy/simple-markdown": "0.13.13",
"@matrix-org/olm": "^3.2.15",
"@floating-ui/react": "^0.27.7",
"@fontsource/atkinson-hyperlegible": "5.2.5",
"@khanacademy/simple-markdown": "2.0.2",
"@matrix-org/matrix-sdk-crypto-wasm": "^14.1.0",
"@tippyjs/react": "4.2.6",
"@types/dateformat": "^5.0.3",
"@types/highlight.js": "^10.1.0",
"@types/prop-types": "^15.7.14",
"blurhash": "2.0.5",
"dateformat": "5.0.3",
"emojibase-data": "16.0.2",
"emojibase-data": "16.0.3",
"file-saver": "2.0.5",
"flux": "4.0.4",
"formik": "2.4.6",
"highlight.js": "^11.11.1",
"html-react-parser": "5.2.2",
"katex": "0.16.19",
"html-react-parser": "5.2.3",
"katex": "0.16.22",
"linkify-html": "4.2.0",
"linkifyjs": "4.2.0",
"matrix-encrypt-attachment": "^1.0.3",
"matrix-js-sdk": "35.1.0",
"matrix-js-sdk": "37.3.0",
"prop-types": "15.8.1",
"react": "19.0.0",
"react": "19.1.0",
"react-autosize-textarea": "7.1.0",
"react-blurhash": "0.3.0",
"react-dnd": "16.0.1",
"react-dnd-html5-backend": "16.0.1",
"react-dom": "19.0.0",
"react-dom": "19.1.0",
"react-google-recaptcha": "3.1.0",
"react-modal": "3.16.3",
"sanitize-html": "2.14.0",
"sanitize-html": "2.16.0",
"slate": "0.112.0",
"slate-dom": "^0.111.0",
"slate-history": "0.110.3",
"slate-react": "0.112.0",
"slate-dom": "^0.112.2",
"slate-history": "0.113.1",
"slate-react": "0.112.1",
"tippy.js": "6.3.7"
},
"devDependencies": {
"@esbuild-plugins/node-globals-polyfill": "0.2.3",
"@eslint/compat": "^1.2.4",
"@eslint/compat": "^1.2.8",
"@rollup/plugin-inject": "5.0.5",
"@rollup/plugin-wasm": "6.2.2",
"@types/node": "22.10.5",
"@types/react": "19.0.3",
"@types/react-dom": "19.0.2",
"@types/node": "22.14.1",
"@types/react": "19.1.2",
"@types/react-dom": "19.1.2",
"@types/react-modal": "^3.16.3",
"@typescript-eslint/eslint-plugin": "8.19.1",
"@typescript-eslint/parser": "8.19.1",
"@vitejs/plugin-react": "4.3.4",
"@typescript-eslint/eslint-plugin": "8.31.0",
"@typescript-eslint/parser": "8.31.0",
"@vitejs/plugin-react": "4.4.1",
"buffer": "6.0.3",
"eslint": "9.17.0",
"eslint": "9.25.1",
"eslint-config-airbnb": "19.0.4",
"eslint-config-prettier": "9.1.0",
"eslint-config-prettier": "10.1.2",
"eslint-plugin-deprecation": "^3.0.0",
"eslint-plugin-import": "2.31.0",
"eslint-plugin-jsx-a11y": "6.10.2",
"eslint-plugin-react": "7.37.3",
"eslint-plugin-react-hooks": "5.1.0",
"globals": "^15.14.0",
"eslint-plugin-react": "7.37.5",
"eslint-plugin-react-hooks": "5.2.0",
"globals": "^16.0.0",
"mini-svg-data-uri": "1.4.4",
"prettier": "3.4.2",
"sass": "1.83.1",
"typescript": "5.7.2",
"vite": "6.0.7",
"vite-plugin-static-copy": "2.2.0"
"prettier": "3.5.3",
"sass": "1.87.0",
"typescript": "5.8.3",
"vite": "6.3.2",
"vite-plugin-static-copy": "2.3.1"
},
"packageManager": "yarn@4.4.1",
"packageManager": "yarn@4.9.1+sha512.f95ce356460e05be48d66401c1ae64ef84d163dd689964962c6888a9810865e39097a5e9de748876c2e0bf89b232d583c33982773e9903ae7a76257270986538",
"type": "module"
}

View file

@ -1,6 +1,7 @@
import { useState, useEffect } from 'react';
import { CryptoEvent, type IMyDevice } from 'matrix-js-sdk';
import { type IMyDevice } from 'matrix-js-sdk';
import { CryptoEvent } from 'matrix-js-sdk/lib/crypto-api';
import initMatrix from '../../client/initMatrix';
export function useDeviceList(): IMyDevice[] | null {

View file

@ -1,6 +1,4 @@
/* eslint-disable react/prop-types */
import React, { useState, useEffect } from 'react';
import PropTypes from 'prop-types';
import './EmojiVerification.scss';
import {
CrossSigningKey,

View file

@ -2,7 +2,8 @@ import React, { useState, useEffect } from 'react';
import './DeviceManage.scss';
import dateFormat from 'dateformat';
import { AuthDict, CryptoEvent, IMyDevice } from 'matrix-js-sdk';
import { CryptoEvent } from 'matrix-js-sdk/lib/crypto-api';
import { AuthDict, IMyDevice } from 'matrix-js-sdk';
import { OwnDeviceKeys } from 'matrix-js-sdk/lib/crypto-api';
import initMatrix from '../../../client/initMatrix';
@ -159,9 +160,7 @@ function DeviceManage() {
if (newName.trim() === device.display_name) return;
addToProcessing(device);
try {
await mx.setDeviceDetails(device.device_id, {
display_name: newName,
});
await mx.setDeviceDetails(device.device_id, { display_name: newName });
} catch (err) {
// ignore errors
console.error("Couldn't rename device:", err);

View file

@ -1,8 +1,7 @@
import React, { FormEvent, useState } from 'react';
import PropTypes from 'prop-types';
import './SecretStorageAccess.scss';
import { deriveKey } from 'matrix-js-sdk/lib/crypto/key_passphrase';
import { decodeRecoveryKey } from 'matrix-js-sdk/lib/crypto-api';
import { decodeRecoveryKey, deriveRecoveryKeyFromPassphrase } from 'matrix-js-sdk/lib/crypto-api';
import { AuthDict, UIAResponse } from 'matrix-js-sdk';
import initMatrix from '../../../client/initMatrix';
@ -49,7 +48,9 @@ function SecretStorageAccess({ onComplete }: { onComplete: (_data: KeyData) => v
}
const { salt, iterations } = sSKeyInfo.passphrase || {};
const privateKey = key ? decodeRecoveryKey(key) : await deriveKey(phrase!, salt, iterations);
const privateKey = key
? decodeRecoveryKey(key)
: await deriveRecoveryKeyFromPassphrase(phrase!, salt, iterations);
const isCorrect = await mx.secretStorage.checkKey(privateKey, sSKeyInfo);
if (!mountStore.getItem()) return;
@ -59,12 +60,7 @@ function SecretStorageAccess({ onComplete }: { onComplete: (_data: KeyData) => v
return;
}
onComplete({
keyId: sSKeyId,
key,
phrase,
privateKey,
});
onComplete({ keyId: sSKeyId, key, phrase, privateKey });
} catch (e) {
console.error("[secretstorage] couldn't validate security key/phrase:", e);
if (!mountStore.getItem()) return;
@ -113,9 +109,7 @@ function SecretStorageAccess({ onComplete }: { onComplete: (_data: KeyData) => v
</div>
);
}
SecretStorageAccess.propTypes = {
onComplete: PropTypes.func.isRequired,
};
SecretStorageAccess.propTypes = { onComplete: PropTypes.func.isRequired };
interface KeyInput {
key?: string;
@ -141,9 +135,7 @@ export const accessSecretStorage = (title: string) =>
storePrivateKey(keyData.keyId, keyData.privateKey);
console.log('[secretstorage] calling bootstrapCrossSigning');
await mx.getCrypto()!.bootstrapCrossSigning({
authUploadDeviceSigningKeys,
});
await mx.getCrypto()!.bootstrapCrossSigning({ authUploadDeviceSigningKeys });
resolve(keyData);
};

View file

@ -1,6 +1,5 @@
import EventEmitter from 'events';
import * as sdk from 'matrix-js-sdk';
import Olm from '@matrix-org/olm';
import { secret } from './state/auth';
import RoomList from './state/RoomList';
@ -10,8 +9,6 @@ import Notifications from './state/Notifications';
import { cryptoCallbacks } from './state/secretStorageKeys';
import navigation from './state/navigation';
global.Olm = Olm;
// logger.disableAll();
export class InitMatrix extends EventEmitter {
@ -63,7 +60,7 @@ export class InitMatrix extends EventEmitter {
});
// variance doesn't support voip / turn, so disable it to avoid the unnecessary requests
(this.matrixClient as any).canSupportVoip = false;
(this.matrixClient as unknown).canSupportVoip = false;
await indexedDBStore.startup();
await this.matrixClient.initRustCrypto();
@ -74,7 +71,8 @@ export class InitMatrix extends EventEmitter {
// slidingSync: new SlidingSync(),
});
this.matrixClient.setGlobalErrorOnUnknownDevices(false);
const crypto = this.matrixClient.getCrypto();
if (crypto) crypto.globalBlacklistUnverifiedDevices = false;
}
setupSync() {

View file

@ -8,34 +8,12 @@ import { svgLoader } from './viteSvgLoader';
const copyFiles = {
targets: [
{
src: 'node_modules/@matrix-org/olm/olm.wasm',
dest: '',
},
{
src: '_redirects',
dest: '',
},
{
src: 'config.json',
dest: '',
},
{
src: 'public/res/android',
dest: 'public/',
},
{
src: 'public/res/emoji',
dest: 'public/',
},
{
src: 'public/manifest.json',
dest: '',
},
{
src: 'public/favicon.ico',
dest: '',
},
{ src: '_redirects', dest: '' },
{ src: 'config.json', dest: '' },
{ src: 'public/res/android', dest: 'public/' },
{ src: 'public/res/emoji', dest: 'public/' },
{ src: 'public/manifest.json', dest: '' },
{ src: 'public/favicon.ico', dest: '' },
],
};
@ -43,32 +21,24 @@ export default defineConfig({
appType: 'spa',
publicDir: false,
base: '',
server: {
port: 8080,
host: true,
},
server: { port: 8080, host: true },
plugins: [viteStaticCopy(copyFiles), svgLoader(), wasm(), react()],
optimizeDeps: {
esbuildOptions: {
define: {
global: 'globalThis',
},
define: { global: 'globalThis' },
plugins: [
// Enable esbuild polyfill plugins
NodeGlobalsPolyfillPlugin({
process: false,
buffer: true,
}),
NodeGlobalsPolyfillPlugin({ process: false, buffer: true }),
],
},
// required to make the wasm get loaded
exclude: ['@matrix-org/matrix-sdk-crypto-wasm'],
},
build: {
outDir: 'dist',
sourcemap: true,
copyPublicDir: false,
rollupOptions: {
plugins: [inject({ Buffer: ['buffer', 'Buffer'] })],
},
rollupOptions: { plugins: [inject({ Buffer: ['buffer', 'Buffer'] })] },
target: 'esnext',
},
});

1612
yarn.lock

File diff suppressed because it is too large Load diff