From 0609ebc430fe9a5df5edffb4f545298aa0866947 Mon Sep 17 00:00:00 2001 From: Jaiwanth Date: Tue, 27 Jul 2021 14:45:51 +0530 Subject: [PATCH 01/44] Add raw-loader to moduleNameMapper --- package.json | 5 ++++- yarn.lock | 37 +++++++++++++++++++++++++++++++++++-- 2 files changed, 39 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 0043362eb8d..d6c43f88887 100644 --- a/package.json +++ b/package.json @@ -116,6 +116,7 @@ "html-webpack-plugin": "^4.5.2", "jest": "^26.6.3", "jest-environment-jsdom-sixteen": "^1.0.3", + "jest-raw-loader": "^1.0.1", "json-loader": "^0.5.7", "loader-utils": "^1.4.0", "matrix-mock-request": "^1.2.3", @@ -138,6 +139,7 @@ "postcss-scss": "^2.1.1", "postcss-simple-vars": "^5.0.2", "postcss-strip-inline-comments": "^0.1.5", + "raw-loader": "^4.0.2", "rimraf": "^3.0.2", "shell-escape": "^0.2.0", "simple-proxy-agent": "^1.1.0", @@ -173,7 +175,8 @@ "waveWorker\\.min\\.js": "/node_modules/matrix-react-sdk/__mocks__/empty.js", "context-filter-polyfill": "/node_modules/matrix-react-sdk/__mocks__/empty.js", "FontManager.ts": "/node_modules/matrix-react-sdk/__mocks__/FontManager.js", - "workers/(.+)\\.worker\\.ts": "/node_modules/matrix-react-sdk/__mocks__/workerMock.js" + "workers/(.+)\\.worker\\.ts": "/node_modules/matrix-react-sdk/__mocks__/workerMock.js", + "^!!raw-loader!.*": "jest-raw-loader" }, "transformIgnorePatterns": [ "/node_modules/(?!matrix-js-sdk).+$", diff --git a/yarn.lock b/yarn.lock index e85f75b40d6..2b83ea03202 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1454,7 +1454,7 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7": +"@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": version "7.0.8" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.8.tgz#edf1bf1dbf4e04413ca8e5b17b3b7d7d54b59818" integrity sha512-YSBPTLTVm2e2OoQIDYx8HaeWJ5tTToLH67kXR7zYNGupXMEHa2++G8k+DczX2cFVgalypqtyZIcU19AFcmOpmg== @@ -1919,7 +1919,7 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1, ajv-keywords@^3.5.2: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.5.2.tgz#31f29da5ab6e00d1c2d329acf7b5929614d5014d" integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== -ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4: +ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -6666,6 +6666,11 @@ jest-pnp-resolver@^1.2.2: resolved "https://registry.yarnpkg.com/jest-pnp-resolver/-/jest-pnp-resolver-1.2.2.tgz#b704ac0ae028a89108a4d040b3f919dfddc8e33c" integrity sha512-olV41bKSMm8BdnuMsewT4jqlZ8+3TCARAXjZGT9jcoSnrfUnRCqnMoF9XEeoWjbzObpqF9dRhHQj0Xb9QdF6/w== +jest-raw-loader@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/jest-raw-loader/-/jest-raw-loader-1.0.1.tgz#ce9f56d54650f157c4a7d16d224ba5d613bcd626" + integrity sha1-zp9W1UZQ8VfEp9FtIkul1hO81iY= + jest-regex-util@^26.0.0: version "26.0.0" resolved "https://registry.yarnpkg.com/jest-regex-util/-/jest-regex-util-26.0.0.tgz#d25e7184b36e39fd466c3bc41be0971e821fee28" @@ -7130,6 +7135,15 @@ loader-utils@^1.0.0, loader-utils@^1.1.0, loader-utils@^1.2.3, loader-utils@^1.4 emojis-list "^3.0.0" json5 "^1.0.1" +loader-utils@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-2.0.0.tgz#e4cace5b816d425a166b5f097e10cd12b36064b0" + integrity sha512-rP4F0h2RaWSvPEkD7BLDFQnvSf+nK+wr3ESUjNTyAGobqrijmW92zc+SO6d4p4B1wh7+B/Jg1mkQe5NYUEHtHQ== + dependencies: + big.js "^5.2.2" + emojis-list "^3.0.0" + json5 "^2.1.2" + locate-path@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-3.0.0.tgz#dbec3b3ab759758071b58fe59fc41871af21400e" @@ -9566,6 +9580,14 @@ raw-body@2.4.0: iconv-lite "0.4.24" unpipe "1.0.0" +raw-loader@^4.0.2: + version "4.0.2" + resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-4.0.2.tgz#1aac6b7d1ad1501e66efdac1522c73e59a584eb6" + integrity sha512-ZnScIV3ag9A4wPX/ZayxL/jZH+euYb6FcUinPcgiQW0+UBtEv0O6Q3lGd3cqJ+GHH+rksEv3Pj99oxJ3u3VIKA== + dependencies: + loader-utils "^2.0.0" + schema-utils "^3.0.0" + re-resizable@^6.9.0: version "6.9.0" resolved "https://registry.yarnpkg.com/re-resizable/-/re-resizable-6.9.0.tgz#9c3059b389ced6ade602234cc5bb1e12d231cd47" @@ -10196,6 +10218,15 @@ schema-utils@^2.5.0, schema-utils@^2.6.5, schema-utils@^2.6.6, schema-utils@^2.7 ajv "^6.12.4" ajv-keywords "^3.5.2" +schema-utils@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-3.1.1.tgz#bc74c4b6b6995c1d88f76a8b77bea7219e0c8281" + integrity sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + select-hose@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca" @@ -11692,8 +11723,10 @@ watchpack@^1.7.4: resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" integrity sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== dependencies: + chokidar "^3.4.1" graceful-fs "^4.1.2" neo-async "^2.5.0" + watchpack-chokidar2 "^2.0.1" optionalDependencies: chokidar "^3.4.1" watchpack-chokidar2 "^2.0.1" From 714d03524c0a39dd17efed121c73614f60f40e5a Mon Sep 17 00:00:00 2001 From: Jaiwanth Date: Tue, 27 Jul 2021 17:18:17 +0530 Subject: [PATCH 02/44] Add declaration file --- src/@types/raw-loader.d.ts | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 src/@types/raw-loader.d.ts diff --git a/src/@types/raw-loader.d.ts b/src/@types/raw-loader.d.ts new file mode 100644 index 00000000000..ea3df880f67 --- /dev/null +++ b/src/@types/raw-loader.d.ts @@ -0,0 +1,4 @@ +declare module '!!raw-loader!*' { + const contents: string; + export default contents; +} From 42e3fd02821fd0258c917472297b2cbe10b846c7 Mon Sep 17 00:00:00 2001 From: Jaiwanth Date: Wed, 4 Aug 2021 12:45:10 +0530 Subject: [PATCH 03/44] Add extendedAPI plugin to access globals --- webpack.config.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index bb1d5d9ff5f..e6fa9bb0ea1 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -6,6 +6,7 @@ const MiniCssExtractPlugin = require('mini-css-extract-plugin'); const TerserPlugin = require('terser-webpack-plugin'); const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin'); const HtmlWebpackInjectPreload = require('@principalstudio/html-webpack-inject-preload'); +const { ExtendedAPIPlugin } = require('webpack'); let ogImageUrl = process.env.RIOT_OG_IMAGE_URL; if (!ogImageUrl) ogImageUrl = 'https://app.element.io/themes/element/img/logos/opengraph.png'; @@ -219,7 +220,7 @@ module.exports = (env, argv) => { // It's important that this plugin is last otherwise we end // up with broken CSS. - require('postcss-preset-env')({stage: 3, browsers: 'last 2 versions'}), + require('postcss-preset-env')({ stage: 3, browsers: 'last 2 versions' }), ], parser: "postcss-scss", "local-plugins": true, @@ -257,7 +258,7 @@ module.exports = (env, argv) => { // It's important that this plugin is last otherwise we end // up with broken CSS. - require('postcss-preset-env')({stage: 3, browsers: 'last 2 versions'}), + require('postcss-preset-env')({ stage: 3, browsers: 'last 2 versions' }), ], parser: "postcss-scss", "local-plugins": true, @@ -437,6 +438,8 @@ module.exports = (env, argv) => { files: [{ match: /.*Inter.*\.woff2$/ }], }), + new ExtendedAPIPlugin(), + ...additionalPlugins, ], From 2d487972940e7fba1b791ff5b83b0aefd13a3e24 Mon Sep 17 00:00:00 2001 From: James Salter Date: Fri, 10 Sep 2021 11:18:06 +0100 Subject: [PATCH 04/44] Suggest setting Cache-Control: no-cache on / for self-hosters --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 4fd89c018ad..1f1d31f7b92 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,10 @@ Element requires the following URLs not to be cached, when/if you are serving El /index.html ``` +We also recommend that you force browsers to re-validate any cached copy of Element on page load by configuring your +webserver to return `Cache-Control: no-cache` for `/`. This ensures the browser will fetch a new version of Element on +the next page load after it's been deployed. + Development =========== From 0a87baf99d2afd517f1a594d14372223d82459db Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Thu, 2 Sep 2021 20:30:12 +0200 Subject: [PATCH 05/44] Remove accidentally persisted log-level data This commit gets rid of log-level data in localStorage which in some extreme cases could fill up the entire localStorage making the app unusable Followup to https://github.com/matrix-org/matrix-js-sdk/pull/1880 --- src/vector/index.ts | 1 + src/vector/localstorage-fix.ts | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 src/vector/localstorage-fix.ts diff --git a/src/vector/index.ts b/src/vector/index.ts index de68bf0a436..e23fc4b35ac 100644 --- a/src/vector/index.ts +++ b/src/vector/index.ts @@ -33,6 +33,7 @@ require('katex/dist/katex.css'); * On production build it's going to be an empty module, so don't worry about that. */ require('./devcss'); +require('./localstorage-fix'); // These are things that can run before the skin loads - be careful not to reference the react-sdk though. import { parseQsFromFragment } from "./url_utils"; import './modernizr'; diff --git a/src/vector/localstorage-fix.ts b/src/vector/localstorage-fix.ts new file mode 100644 index 00000000000..d0ca05174ff --- /dev/null +++ b/src/vector/localstorage-fix.ts @@ -0,0 +1,12 @@ +/** + * Because we've been saving a lot of additional logger data in the localStorage for no particular reason + * we need to, hopefully, unbrick user's devices by geting rid of unnecessary data. + * */ + +if (window.localStorage) { + Object.keys(window.localStorage).forEach(key => { + if (key.indexOf('loglevel:') === 0) { + window.localStorage.removeItem(key); + } + }); +} From 606fd8b51b90d231e2133aadd2825867a711df19 Mon Sep 17 00:00:00 2001 From: bolbo nare Date: Tue, 21 Sep 2021 21:59:00 +0000 Subject: [PATCH 06/44] Translated using Weblate (Bengali (India)) Currently translated at 8.8% (3 of 34 strings) Translation: Element Web/element-web Translate-URL: https://translate.element.io/projects/element-web/element-web/bn_IN/ --- src/i18n/strings/bn_IN.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/bn_IN.json b/src/i18n/strings/bn_IN.json index 0967ef424bc..19a9d205267 100644 --- a/src/i18n/strings/bn_IN.json +++ b/src/i18n/strings/bn_IN.json @@ -1 +1,5 @@ -{} +{ + "Your Element is misconfigured": "আপনার এলিমেন্ট টি ভুল ভাবে কনফিগার করা হয়েছে", + "Invalid configuration: no default server specified.": "ভুল কনফিগারেশনঃ কোনো মূল সার্ভার উল্লেখ করা হয়নি।", + "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "ভুল কনফিগারেশনঃ এদের মধ্যে কেবলমাত্র একটাই উল্লেখ করা যেতে পারেঃ default_server_config, default_server_name অথবা default_hs_url." +} From 3628dfd3f0cf8ea3be13fec98c346914503f6e56 Mon Sep 17 00:00:00 2001 From: Kim Tae Kyeong Date: Wed, 22 Sep 2021 00:36:19 +0000 Subject: [PATCH 07/44] Translated using Weblate (Korean) Currently translated at 100.0% (34 of 34 strings) Translation: Element Web/element-web Translate-URL: https://translate.element.io/projects/element-web/element-web/ko/ --- src/i18n/strings/ko.json | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/i18n/strings/ko.json b/src/i18n/strings/ko.json index 6d2d7106115..0decc6387ea 100644 --- a/src/i18n/strings/ko.json +++ b/src/i18n/strings/ko.json @@ -24,5 +24,14 @@ "You can continue using your current browser, but some or all features may not work and the look and feel of the application may be incorrect.": "현재 사용중이신 브라우저를 계속 사용하셔도 됩니다, 다만 일부 기능들이 작동하지 않을 수 있으며 애플리케이션이 잘못돼 보일 수 있습니다.", "I understand the risks and wish to continue": "위험하다는 것을 이해했으며 계속하고 싶습니다", "Go to element.io": "element.io으로 가기", - "Failed to start": "시작 실패" + "Failed to start": "시작 실패", + "%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s 는 당신의 브라우저에서 지원되지 않는 고급 기능을 사용합니다.", + "Your browser can't run %(brand)s": "당신의 브라우저는 %(brand)s 를 작동할 수 없습니다", + "Use %(brand)s on mobile": "모바일에서 %(brand)s 사용", + "Powered by Matrix": "Matrix로 지원됨", + "Switch to space by number": "숫자로 스페이스 전환하기", + "Open": "열기", + "Download Completed": "다운로드 완료", + "Your Element configuration contains invalid JSON. Please correct the problem and reload the page.": "당신의 Element 설정은 유효하지 않은 JSON을 포함합니다. 이 문제를 해결하고 페이지를 새로고침해주세요.", + "Your Element is misconfigured": "당신의 Element가 잘못 설정되었습니다" } From 017e4bd84bd7d16b401ecd2cfd884aa0136aeb19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0imon=20Brandner?= Date: Fri, 24 Sep 2021 20:51:02 +0200 Subject: [PATCH 08/44] Convert index to TS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Šimon Brandner --- webpack.config.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 484fe700336..444dfcb2eea 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -90,7 +90,7 @@ module.exports = (env, argv) => { "bundle": "./src/vector/index.ts", "mobileguide": "./src/vector/mobile_guide/index.ts", "jitsi": "./src/vector/jitsi/index.ts", - "usercontent": "./node_modules/matrix-react-sdk/src/usercontent/index.js", + "usercontent": "./node_modules/matrix-react-sdk/src/usercontent/index.ts", ...(useHMR ? {} : cssThemes), }, From 2f008459570768a5c9fad762cae156a144178be1 Mon Sep 17 00:00:00 2001 From: jelv Date: Sat, 25 Sep 2021 08:05:29 +0000 Subject: [PATCH 09/44] Translated using Weblate (Dutch) Currently translated at 100.0% (34 of 34 strings) Translation: Element Web/element-web Translate-URL: https://translate.element.io/projects/element-web/element-web/nl/ --- src/i18n/strings/nl.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/nl.json b/src/i18n/strings/nl.json index 2ff894c6b2c..8376ab5e2b0 100644 --- a/src/i18n/strings/nl.json +++ b/src/i18n/strings/nl.json @@ -7,7 +7,7 @@ "Decentralised, encrypted chat & collaboration powered by [matrix]": "Gedecentraliseerd en versleuteld chatten & samenwerken dankzij [matrix]", "Sign In": "Inloggen", "Create Account": "Registreren", - "Explore rooms": "Ontdek kamers", + "Explore rooms": "Kamers ontdekken", "Unexpected error preparing the app. See console for details.": "Er is een onverwachte fout opgetreden bij het voorbereiden van de app. Zie de console voor details.", "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Configuratiefout: kan slechts één van default_server_config, default_server_name, of default_hs_url opgeven.", "Invalid configuration: no default server specified.": "Configuratie ongeldig: geen standaardserver opgegeven.", From f85def5f3f048bbedade5e62f7d5843762c7ccf2 Mon Sep 17 00:00:00 2001 From: Linerly Date: Fri, 24 Sep 2021 23:54:17 +0000 Subject: [PATCH 10/44] Translated using Weblate (Indonesian) Currently translated at 100.0% (34 of 34 strings) Translation: Element Web/element-web Translate-URL: https://translate.element.io/projects/element-web/element-web/id/ --- src/i18n/strings/id.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/id.json b/src/i18n/strings/id.json index 71dab68afc3..cdfd278c177 100644 --- a/src/i18n/strings/id.json +++ b/src/i18n/strings/id.json @@ -1,7 +1,7 @@ { "Dismiss": "Abaikan", "powered by Matrix": "didukung oleh Matrix", - "Unknown device": "Perangkat Tidak Diketahui", + "Unknown device": "Perangkat tidak diketahui", "You need to be using HTTPS to place a screen-sharing call.": "Anda perlu menggunakan HTTPS untuk melakukan panggilan berbagi-layar.", "Welcome to Element": "Selamat datang di Element", "Decentralised, encrypted chat & collaboration powered by [matrix]": "Obrolan terenkripsi, terdesentralisasi & kolaborasi didukung oleh [matrix]", From 1ddbed74d3e08d64cbd553a96d386061a77d7680 Mon Sep 17 00:00:00 2001 From: Andrejs Date: Sun, 26 Sep 2021 14:46:42 +0000 Subject: [PATCH 11/44] Translated using Weblate (Latvian) Currently translated at 100.0% (34 of 34 strings) Translation: Element Web/element-web Translate-URL: https://translate.element.io/projects/element-web/element-web/lv/ --- src/i18n/strings/lv.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/lv.json b/src/i18n/strings/lv.json index b3afc2caf9a..8e52ff05404 100644 --- a/src/i18n/strings/lv.json +++ b/src/i18n/strings/lv.json @@ -7,7 +7,7 @@ "Decentralised, encrypted chat & collaboration powered by [matrix]": "Decentralizēta, šifrēta tērziņu & kopdarbības vide uz [matrix] bāzes", "Sign In": "Ierakstīties", "Create Account": "Izveidot kontu", - "Explore rooms": "Pārlūkot telpas", + "Explore rooms": "Pārlūkot istabas", "Unexpected error preparing the app. See console for details.": "Negaidīta kļūda, sagatavojot lietotni. Sīkāku informāciju skatiet konsolē.", "Invalid configuration: can only specify one of default_server_config, default_server_name, or default_hs_url.": "Kļūdaina konfigurācija: var norādīt tikai vienu no parametriem default_server_config, default_server_name, vai default_hs_url.", "Invalid configuration: no default server specified.": "Kļūdaina konfigurācija: nav norādīts noklusējuma serveris.", @@ -23,7 +23,7 @@ "Go to element.io": "Doties uz element.io", "Failed to start": "Neizdevās palaist", "Powered by Matrix": "Griežas uz Matrix tehnoloģijas", - "Previous/next recently visited room or community": "Iepriekšējā/nākošā nesen apmeklētā telpa vai kopiena", + "Previous/next recently visited room or community": "Iepriekšējā/nākošā nesen apmeklētā istaba vai kopiena", "%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s izmanto pārlūku papildfunkcijas, kuras netiek atbalstītas šajā pārlūkā.", "Your browser can't run %(brand)s": "Jūsu pārlūks nevar palaist %(brand)s", "Missing indexeddb worker script!": "Trūkst indexeddb worker skripta!", From 6590debbc6b0ec4b5b8aa9cfa24fc28758623a6b Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 27 Sep 2021 15:16:18 +0100 Subject: [PATCH 12/44] Reset matrix-js-sdk back to develop branch --- package.json | 2 +- yarn.lock | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 35ef5399d8a..cf9bafd7e9c 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "highlight.js": "^10.5.0", "jsrsasign": "^10.2.0", "katex": "^0.12.0", - "matrix-js-sdk": "13.0.0", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", "matrix-react-sdk": "3.31.0", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", diff --git a/yarn.lock b/yarn.lock index d837ad4890d..54434975a69 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7703,6 +7703,21 @@ matrix-js-sdk@13.0.0: request "^2.88.2" unhomoglyph "^1.0.6" +"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": + version "13.0.0" + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/2515d07c8fc3bf5e1afc8352e3e330cca30dde85" + dependencies: + "@babel/runtime" "^7.12.5" + another-json "^0.2.0" + browser-request "^0.3.3" + bs58 "^4.0.1" + content-type "^1.0.4" + loglevel "^1.7.1" + p-retry "^4.5.0" + qs "^6.9.6" + request "^2.88.2" + unhomoglyph "^1.0.6" + matrix-mock-request@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/matrix-mock-request/-/matrix-mock-request-1.2.3.tgz#56b15d86e2601a9b48a854844396d18caab649c8" From cf5cbb1ff97623be1d60539aad372f4b38e68f09 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 27 Sep 2021 15:16:28 +0100 Subject: [PATCH 13/44] Reset matrix-react-sdk back to develop branch --- package.json | 2 +- yarn.lock | 23 +++-------------------- 2 files changed, 4 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index cf9bafd7e9c..767bd9fc25c 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "jsrsasign": "^10.2.0", "katex": "^0.12.0", "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", - "matrix-react-sdk": "3.31.0", + "matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", "react": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 54434975a69..495e84140e8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7687,22 +7687,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-js-sdk@13.0.0: - version "13.0.0" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-13.0.0.tgz#a57a4b73892e98fcd5eb0081e4745fac567211dd" - integrity sha512-VkZhQBd6jlRNjsqjLIoHV3fnjOSljPDuJklKsF4l6yffkra7llxQctyMsrCnoiosdAQWigbLZsKSb+HbSFmcnw== - dependencies: - "@babel/runtime" "^7.12.5" - another-json "^0.2.0" - browser-request "^0.3.3" - bs58 "^4.0.1" - content-type "^1.0.4" - loglevel "^1.7.1" - p-retry "^4.5.0" - qs "^6.9.6" - request "^2.88.2" - unhomoglyph "^1.0.6" - "matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": version "13.0.0" resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/2515d07c8fc3bf5e1afc8352e3e330cca30dde85" @@ -7726,10 +7710,9 @@ matrix-mock-request@^1.2.3: bluebird "^3.5.0" expect "^1.20.2" -matrix-react-sdk@3.31.0: +"matrix-react-sdk@github:matrix-org/matrix-react-sdk#develop": version "3.31.0" - resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.31.0.tgz#5b7bc5705919524aee5224a9f6757777c9eced32" - integrity sha512-Uf9RZQbpVWA+l8WU9TjuqqqLg0JHJmRP9zjxInwApsajLyjCELz7HobLzNn4Ti39yVdsSfgRXoPUY8aDH9WUIg== + resolved "https://codeload.github.com/matrix-org/matrix-react-sdk/tar.gz/b635d017799e198fa0391e51af0b12e9d5843992" dependencies: "@babel/runtime" "^7.12.5" "@sentry/browser" "^6.11.0" @@ -7759,7 +7742,7 @@ matrix-react-sdk@3.31.0: katex "^0.12.0" linkifyjs "^2.1.9" lodash "^4.17.20" - matrix-js-sdk "13.0.0" + matrix-js-sdk "github:matrix-org/matrix-js-sdk#develop" matrix-widget-api "^0.1.0-beta.16" minimist "^1.2.5" opus-recorder "^8.0.3" From a3c4fac375774cf9836a950886d8d4ff4f350336 Mon Sep 17 00:00:00 2001 From: James Salter Date: Tue, 28 Sep 2021 12:15:34 +0100 Subject: [PATCH 14/44] Use custom nginx conf --- Dockerfile | 3 +++ nginx/config.d/default.conf | 46 +++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 nginx/config.d/default.conf diff --git a/Dockerfile b/Dockerfile index e62b867d38c..6032156d6cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,5 +33,8 @@ COPY --from=builder /src/webapp /app # Insert wasm type into Nginx mime.types file so they load correctly. RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types +# Override default nginx config +COPY /nginx/config.d/default.conf /etc/nginx/config.d/default.conf + RUN rm -rf /usr/share/nginx/html \ && ln -s /app /usr/share/nginx/html diff --git a/nginx/config.d/default.conf b/nginx/config.d/default.conf new file mode 100644 index 00000000000..638f80d1249 --- /dev/null +++ b/nginx/config.d/default.conf @@ -0,0 +1,46 @@ +server { + listen 80; + listen [::]:80; + server_name localhost; + + #access_log /var/log/nginx/host.access.log main; + + location / { + root /usr/share/nginx/html; + index index.html index.htm; + add_header Cache-Control "no-cache"; + } + + #error_page 404 /404.html; + + # redirect server error pages to the static page /50x.html + # + error_page 500 502 503 504 /50x.html; + location = /50x.html { + root /usr/share/nginx/html; + } + + # proxy the PHP scripts to Apache listening on 127.0.0.1:80 + # + #location ~ \.php$ { + # proxy_pass http://127.0.0.1; + #} + + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # + #location ~ \.php$ { + # root html; + # fastcgi_pass 127.0.0.1:9000; + # fastcgi_index index.php; + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; + # include fastcgi_params; + #} + + # deny access to .htaccess files, if Apache's document root + # concurs with nginx's one + # + #location ~ /\.ht { + # deny all; + #} +} + From 212138b0176f0aa9d2cd5be054d587245049a1aa Mon Sep 17 00:00:00 2001 From: James Salter Date: Tue, 28 Sep 2021 13:24:44 +0100 Subject: [PATCH 15/44] Fix path --- Dockerfile | 2 +- nginx/{config.d => conf.d}/default.conf | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename nginx/{config.d => conf.d}/default.conf (100%) diff --git a/Dockerfile b/Dockerfile index 6032156d6cc..601f2cdbbb8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -34,7 +34,7 @@ COPY --from=builder /src/webapp /app RUN sed -i '3i\ \ \ \ application/wasm wasm\;' /etc/nginx/mime.types # Override default nginx config -COPY /nginx/config.d/default.conf /etc/nginx/config.d/default.conf +COPY /nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf RUN rm -rf /usr/share/nginx/html \ && ln -s /app /usr/share/nginx/html diff --git a/nginx/config.d/default.conf b/nginx/conf.d/default.conf similarity index 100% rename from nginx/config.d/default.conf rename to nginx/conf.d/default.conf From b4187c61509c48418105d03de50183e5f5f9bf0d Mon Sep 17 00:00:00 2001 From: James Salter Date: Tue, 28 Sep 2021 13:24:54 +0100 Subject: [PATCH 16/44] Fix rule --- nginx/conf.d/default.conf | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index 638f80d1249..b2b539bfe4e 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -5,9 +5,11 @@ server { #access_log /var/log/nginx/host.access.log main; - location / { - root /usr/share/nginx/html; - index index.html index.htm; + root /usr/share/nginx/html; + index index.html index.htm; + + # Set no-cache for the index.html only so that browsers always check for a new copy of Element Web. + location = /index.html { add_header Cache-Control "no-cache"; } @@ -16,9 +18,6 @@ server { # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; - location = /50x.html { - root /usr/share/nginx/html; - } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # From 237bc51cd16aa4e0423d6b5e57833531d7389eab Mon Sep 17 00:00:00 2001 From: James Salter Date: Tue, 28 Sep 2021 13:25:43 +0100 Subject: [PATCH 17/44] Remove commented out cruft --- nginx/conf.d/default.conf | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index b2b539bfe4e..bd2225ba4b7 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -3,8 +3,6 @@ server { listen [::]:80; server_name localhost; - #access_log /var/log/nginx/host.access.log main; - root /usr/share/nginx/html; index index.html index.htm; @@ -13,33 +11,8 @@ server { add_header Cache-Control "no-cache"; } - #error_page 404 /404.html; - # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; - - # proxy the PHP scripts to Apache listening on 127.0.0.1:80 - # - #location ~ \.php$ { - # proxy_pass http://127.0.0.1; - #} - - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 - # - #location ~ \.php$ { - # root html; - # fastcgi_pass 127.0.0.1:9000; - # fastcgi_index index.php; - # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; - # include fastcgi_params; - #} - - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one - # - #location ~ /\.ht { - # deny all; - #} } From 5553cdf3296a17c3bcc97af42f2e2cff412d2bd5 Mon Sep 17 00:00:00 2001 From: Andrejs Date: Tue, 28 Sep 2021 05:44:35 +0000 Subject: [PATCH 18/44] Translated using Weblate (Latvian) Currently translated at 100.0% (34 of 34 strings) Translation: Element Web/element-web Translate-URL: https://translate.element.io/projects/element-web/element-web/lv/ --- src/i18n/strings/lv.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/i18n/strings/lv.json b/src/i18n/strings/lv.json index 8e52ff05404..92ec83c424b 100644 --- a/src/i18n/strings/lv.json +++ b/src/i18n/strings/lv.json @@ -1,5 +1,5 @@ { - "Dismiss": "Aizvērt/atcelt", + "Dismiss": "Aizvērt", "powered by Matrix": "Tiek darbināta ar Matrix", "Unknown device": "Nezināma ierīce", "You need to be using HTTPS to place a screen-sharing call.": "Ekrāna kopīgošanai nepieciešams izmantot HTTPS savienojumu.", From e7caa54e59c7418ee15720c1acaf8a84b94512f8 Mon Sep 17 00:00:00 2001 From: James Salter Date: Wed, 29 Sep 2021 10:32:12 +0100 Subject: [PATCH 19/44] Remove superfluous index.htm --- nginx/conf.d/default.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nginx/conf.d/default.conf b/nginx/conf.d/default.conf index bd2225ba4b7..04b1e8ac6aa 100644 --- a/nginx/conf.d/default.conf +++ b/nginx/conf.d/default.conf @@ -4,7 +4,7 @@ server { server_name localhost; root /usr/share/nginx/html; - index index.html index.htm; + index index.html; # Set no-cache for the index.html only so that browsers always check for a new copy of Element Web. location = /index.html { From 5741baed2547038e3b66eb13023e27ce811462f5 Mon Sep 17 00:00:00 2001 From: James Salter Date: Wed, 29 Sep 2021 13:14:03 +0100 Subject: [PATCH 20/44] Note that caching is configured in he Dockerfile --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1f1d31f7b92..441ce5109be 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,8 @@ Element requires the following URLs not to be cached, when/if you are serving El We also recommend that you force browsers to re-validate any cached copy of Element on page load by configuring your webserver to return `Cache-Control: no-cache` for `/`. This ensures the browser will fetch a new version of Element on -the next page load after it's been deployed. +the next page load after it's been deployed. Note that this is already configured for you in the nginx config of our +Dockerfile. Development =========== From 0142bb04e41d509d1671c846017c07cc0f50224a Mon Sep 17 00:00:00 2001 From: Maximilian Kratz Date: Thu, 30 Sep 2021 13:50:14 +0200 Subject: [PATCH 21/44] Removed iOS Jitsi notice --- docs/jitsi.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/docs/jitsi.md b/docs/jitsi.md index 57d9f064cb5..116f31306d4 100644 --- a/docs/jitsi.md +++ b/docs/jitsi.md @@ -64,10 +64,3 @@ The domain used is the one specified by the `/.well-known/matrix/client` endpoin For active Jitsi widgets in the room, a native Jitsi widget UI is created and points to the instance specified in the `domain` key of the widget content data. Element Android manages allowed native widgets permissions a bit differently than web widgets (as the data shared are different and never shared with the widget URL). For Jitsi widgets, permissions are requested only once per domain (consent saved in account data). - -## Element iOS - -Currently the Element mobile apps do not support custom Jitsi servers and will instead -use the default `jitsi.riot.im` server. When users on the mobile apps join the call, -they will be joining a different conference which has the same name, but not the same -participants. This is a known bug and which needs to be fixed. From 2a4dcd1267864bd0735f0f6ccda7eca46bc302b7 Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 1 Oct 2021 14:56:07 +0200 Subject: [PATCH 22/44] Typescriptify tests --- test/app-tests/{joining-test.js => joining-test.tsx} | 0 test/app-tests/{loading-test.js => loading-test.tsx} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename test/app-tests/{joining-test.js => joining-test.tsx} (100%) rename test/app-tests/{loading-test.js => loading-test.tsx} (100%) diff --git a/test/app-tests/joining-test.js b/test/app-tests/joining-test.tsx similarity index 100% rename from test/app-tests/joining-test.js rename to test/app-tests/joining-test.tsx diff --git a/test/app-tests/loading-test.js b/test/app-tests/loading-test.tsx similarity index 100% rename from test/app-tests/loading-test.js rename to test/app-tests/loading-test.tsx From 04ee4d613793bcc911fb98332aec556f7d2ed88f Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 1 Oct 2021 15:18:29 +0200 Subject: [PATCH 23/44] Add missing jest types --- package.json | 3 ++- yarn.lock | 65 +++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 64 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index d35eeb16b93..598863c6fee 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3", "@principalstudio/html-webpack-inject-preload": "^1.2.7", "@types/flux": "^3.1.9", + "@types/jest": "^27.0.2", "@types/modernizr": "^3.5.3", "@types/node": "^14.14.22", "@types/react": "17.0.14", @@ -166,7 +167,7 @@ "jest": { "testEnvironment": "jest-environment-jsdom-sixteen", "testMatch": [ - "/test/**/*-test.[tj]s" + "/test/**/*-test.[tj]s[x]" ], "setupFilesAfterEnv": [ "/node_modules/matrix-react-sdk/test/setupTests.js" diff --git a/yarn.lock b/yarn.lock index 0bcfa42d16e..458097efe2a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1293,6 +1293,17 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" +"@jest/types@^27.2.4": + version "27.2.4" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.2.4.tgz#2430042a66e00dc5b140c3636f4474d464c21ee8" + integrity sha512-IDO2ezTxeMvQAHxzG/ZvEyA47q0aVfzT95rGFl7bZs/Go0aIucvfDbS2rmnoEdXxlLQhcolmoG/wvL/uKx4tKA== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^16.0.0" + chalk "^4.0.0" + "@matrix-org/olm@https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz": version "3.2.3" resolved "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz#cc332fdd25c08ef0e40f4d33fc3f822a0f98b6f4" @@ -1652,6 +1663,14 @@ dependencies: "@types/istanbul-lib-report" "*" +"@types/jest@^27.0.2": + version "27.0.2" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.0.2.tgz#ac383c4d4aaddd29bbf2b916d8d105c304a5fcd7" + integrity sha512-4dRxkS/AFX0c5XW6IPMNOydLn2tEhNhJV7DnYK+0bjoJZ+QTmfucBlihX7aoEsh/ocYtkLC73UbnBXBXIxsULA== + dependencies: + jest-diff "^27.0.0" + pretty-format "^27.0.0" + "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": version "7.0.9" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" @@ -1822,6 +1841,13 @@ dependencies: "@types/yargs-parser" "*" +"@types/yargs@^16.0.0": + version "16.0.4" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977" + integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw== + dependencies: + "@types/yargs-parser" "*" + "@typescript-eslint/eslint-plugin@^4.17.0": version "4.31.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.1.tgz#e938603a136f01dcabeece069da5fb2e331d4498" @@ -2193,7 +2219,7 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-regex@^5.0.0: +ansi-regex@^5.0.0, ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== @@ -2217,6 +2243,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + anymatch@^1.3.0: version "1.3.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" @@ -4115,6 +4146,11 @@ diff-sequences@^26.6.2: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== +diff-sequences@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.6.tgz#3305cb2e55a033924054695cc66019fd7f8e5723" + integrity sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -6867,6 +6903,16 @@ jest-diff@^26.6.2: jest-get-type "^26.3.0" pretty-format "^26.6.2" +jest-diff@^27.0.0: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.2.4.tgz#171c51d3d2c105c457100fee6e7bf7cee51c8d8c" + integrity sha512-bLAVlDSCR3gqUPGv+4nzVpEXGsHh98HjUL7Vb2hVyyuBDoQmja8eJb0imUABsuxBeUVmf47taJSAd9nDrwWKEg== + dependencies: + chalk "^4.0.0" + diff-sequences "^27.0.6" + jest-get-type "^27.0.6" + pretty-format "^27.2.4" + jest-docblock@^26.0.0: version "26.0.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-26.0.0.tgz#3e2fa20899fc928cb13bd0ff68bd3711a36889b5" @@ -6925,6 +6971,11 @@ jest-get-type@^26.3.0: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== +jest-get-type@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.6.tgz#0eb5c7f755854279ce9b68a9f1a4122f69047cfe" + integrity sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg== + jest-haste-map@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" @@ -9780,6 +9831,16 @@ pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" +pretty-format@^27.0.0, pretty-format@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.4.tgz#08ea39c5eab41b082852d7093059a091f6ddc748" + integrity sha512-NUjw22WJHldzxyps2YjLZkUj6q1HvjqFezkB9Y2cklN8NtVZN/kZEXGZdFw4uny3oENzV5EEMESrkI0YDUH8vg== + dependencies: + "@jest/types" "^27.2.4" + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^17.0.1" + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -12204,10 +12265,8 @@ watchpack@^1.7.4: resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" integrity sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== dependencies: - chokidar "^3.4.1" graceful-fs "^4.1.2" neo-async "^2.5.0" - watchpack-chokidar2 "^2.0.1" optionalDependencies: chokidar "^3.4.1" watchpack-chokidar2 "^2.0.1" From ecf29d9409eaa35da29b0c1be73bd1389f00aae7 Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 1 Oct 2021 15:18:42 +0200 Subject: [PATCH 24/44] Fix joining-test --- test/app-tests/joining-test.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/test/app-tests/joining-test.tsx b/test/app-tests/joining-test.tsx index 744037325ce..b5601875b91 100644 --- a/test/app-tests/joining-test.tsx +++ b/test/app-tests/joining-test.tsx @@ -31,12 +31,12 @@ import {sleep} from "../test-utils"; import * as test_utils from "../test-utils"; import MockHttpBackend from "matrix-mock-request"; import "fake-indexeddb/auto"; +import { RoomView as RoomViewClass } from 'matrix-react-sdk/src/components/structures/RoomView'; const MatrixChat = sdk.getComponent('structures.MatrixChat'); const RoomDirectory = sdk.getComponent('structures.RoomDirectory'); const RoomPreviewBar = sdk.getComponent('rooms.RoomPreviewBar'); -const RoomView = sdk.getComponent('structures.RoomView'); const HS_URL='http://localhost'; const IS_URL='http://localhost'; @@ -50,7 +50,6 @@ describe('joining a room', function() { let matrixChat; beforeEach(function() { - test_utils.beforeEach(this); httpBackend = new MockHttpBackend(); jssdk.request(httpBackend.requestFn); parentDiv = document.createElement('div'); @@ -148,7 +147,7 @@ describe('joining a room', function() { // enter an alias in the input, and simulate enter const input = ReactTestUtils.findRenderedDOMComponentWithTag( - roomDir, 'input'); + roomDir, 'input') as HTMLInputElement; input.value = ROOM_ALIAS; ReactTestUtils.Simulate.change(input); ReactTestUtils.Simulate.keyUp(input, {key: 'Enter'}); @@ -165,7 +164,7 @@ describe('joining a room', function() { // we should now have a roomview roomView = ReactTestUtils.findRenderedComponentWithType( - matrixChat, RoomView); + matrixChat, RoomViewClass); // the preview bar may take a tick to be displayed return sleep(1); @@ -228,7 +227,7 @@ describe('joining a room', function() { return httpBackend.flush(); }).then(() => { // now the room should have loaded - expect(roomView.state.room).toExist(); + expect(roomView.state.room).toBeTruthy(); }); }); }); From 155d80b3fa58feae238153c3ea914abb5bfb17cd Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 1 Oct 2021 15:18:50 +0200 Subject: [PATCH 25/44] Fix loading-test --- test/app-tests/loading-test.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/app-tests/loading-test.tsx b/test/app-tests/loading-test.tsx index f08cb957f51..5bd28706740 100644 --- a/test/app-tests/loading-test.tsx +++ b/test/app-tests/loading-test.tsx @@ -39,6 +39,7 @@ import {sleep} from "../test-utils"; import "fake-indexeddb/auto"; import {cleanLocalstorage} from "../test-utils"; import {IndexedDBCryptoStore} from "matrix-js-sdk/src/crypto/store/indexeddb-crypto-store"; +import { RoomView as RoomViewClass } from 'matrix-react-sdk/src/components/structures/RoomView'; const DEFAULT_HS_URL='http://my_server'; const DEFAULT_IS_URL='http://my_is'; @@ -721,7 +722,7 @@ function awaitRoomView(matrixChat, retryLimit, retryCount) { // state looks good, check the rendered output ReactTestUtils.findRenderedComponentWithType( - matrixChat, sdk.getComponent('structures.RoomView')); + matrixChat, RoomViewClass); return Promise.resolve(); } From 37a095728569fb85a927b8e8d9ec78b348e72b85 Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 1 Oct 2021 15:22:46 +0200 Subject: [PATCH 26/44] Fix typescript errors --- test/app-tests/loading-test.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/test/app-tests/loading-test.tsx b/test/app-tests/loading-test.tsx index 5bd28706740..d2c7697c7bf 100644 --- a/test/app-tests/loading-test.tsx +++ b/test/app-tests/loading-test.tsx @@ -40,6 +40,7 @@ import "fake-indexeddb/auto"; import {cleanLocalstorage} from "../test-utils"; import {IndexedDBCryptoStore} from "matrix-js-sdk/src/crypto/store/indexeddb-crypto-store"; import { RoomView as RoomViewClass } from 'matrix-react-sdk/src/components/structures/RoomView'; +import LoginComponent from 'matrix-react-sdk/src/components/structures/auth/Login'; const DEFAULT_HS_URL='http://my_server'; const DEFAULT_IS_URL='http://my_is'; @@ -95,7 +96,7 @@ describe('loading:', function() { * TODO: it would be nice to factor some of this stuff out of index.js so * that we can test it rather than our own implementation of it. */ - function loadApp(opts) { + function loadApp(opts?) { opts = opts || {}; const queryString = opts.queryString || ""; const uriFragment = opts.uriFragment || ""; @@ -165,7 +166,7 @@ describe('loading:', function() { // http requests until we do. // // returns a promise resolving to the received request - async function expectAndAwaitSync(opts) { + async function expectAndAwaitSync(opts?) { let syncRequest = null; const isGuest = opts && opts.isGuest; if (!isGuest) { @@ -634,7 +635,7 @@ describe('loading:', function() { async function completeLogin(matrixChat) { // we expect a single component const login = ReactTestUtils.findRenderedComponentWithType( - matrixChat, sdk.getComponent('structures.auth.Login')); + matrixChat, LoginComponent); // When we switch to the login component, it'll hit the login endpoint // for proof of life and to get flows. We'll only give it one option. @@ -674,7 +675,7 @@ describe('loading:', function() { // assert that we are on the loading page function assertAtLoadingSpinner(matrixChat) { - const domComponent = ReactDOM.findDOMNode(matrixChat); + const domComponent = ReactDOM.findDOMNode(matrixChat) as Element; expect(domComponent.className).toEqual("mx_MatrixChat_splash"); // just the spinner @@ -692,14 +693,14 @@ function awaitLoggedIn(matrixChat) { } console.log(Date.now() + ": Received on_logged_in action"); dis.unregister(dispatcherRef); - resolve(); + resolve(undefined); }; const dispatcherRef = dis.register(onAction); console.log(Date.now() + ": Waiting for on_logged_in action"); }); } -function awaitRoomView(matrixChat, retryLimit, retryCount) { +function awaitRoomView(matrixChat, retryLimit?, retryCount?) { if (retryLimit === undefined) { retryLimit = 5; } @@ -726,13 +727,13 @@ function awaitRoomView(matrixChat, retryLimit, retryCount) { return Promise.resolve(); } -function awaitLoginComponent(matrixChat, attempts) { +function awaitLoginComponent(matrixChat, attempts?) { return MatrixReactTestUtils.waitForRenderedComponentWithType( matrixChat, sdk.getComponent('structures.auth.Login'), attempts, ); } -function awaitWelcomeComponent(matrixChat, attempts) { +function awaitWelcomeComponent(matrixChat, attempts?) { return MatrixReactTestUtils.waitForRenderedComponentWithType( matrixChat, sdk.getComponent('auth.Welcome'), attempts, ); From 935f95fcded1bd851671c0e2a53596db2de8231b Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 1 Oct 2021 15:41:22 +0200 Subject: [PATCH 27/44] Revert "Fix typescript errors" This reverts commit 37a095728569fb85a927b8e8d9ec78b348e72b85. --- test/app-tests/loading-test.tsx | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/test/app-tests/loading-test.tsx b/test/app-tests/loading-test.tsx index d2c7697c7bf..5bd28706740 100644 --- a/test/app-tests/loading-test.tsx +++ b/test/app-tests/loading-test.tsx @@ -40,7 +40,6 @@ import "fake-indexeddb/auto"; import {cleanLocalstorage} from "../test-utils"; import {IndexedDBCryptoStore} from "matrix-js-sdk/src/crypto/store/indexeddb-crypto-store"; import { RoomView as RoomViewClass } from 'matrix-react-sdk/src/components/structures/RoomView'; -import LoginComponent from 'matrix-react-sdk/src/components/structures/auth/Login'; const DEFAULT_HS_URL='http://my_server'; const DEFAULT_IS_URL='http://my_is'; @@ -96,7 +95,7 @@ describe('loading:', function() { * TODO: it would be nice to factor some of this stuff out of index.js so * that we can test it rather than our own implementation of it. */ - function loadApp(opts?) { + function loadApp(opts) { opts = opts || {}; const queryString = opts.queryString || ""; const uriFragment = opts.uriFragment || ""; @@ -166,7 +165,7 @@ describe('loading:', function() { // http requests until we do. // // returns a promise resolving to the received request - async function expectAndAwaitSync(opts?) { + async function expectAndAwaitSync(opts) { let syncRequest = null; const isGuest = opts && opts.isGuest; if (!isGuest) { @@ -635,7 +634,7 @@ describe('loading:', function() { async function completeLogin(matrixChat) { // we expect a single component const login = ReactTestUtils.findRenderedComponentWithType( - matrixChat, LoginComponent); + matrixChat, sdk.getComponent('structures.auth.Login')); // When we switch to the login component, it'll hit the login endpoint // for proof of life and to get flows. We'll only give it one option. @@ -675,7 +674,7 @@ describe('loading:', function() { // assert that we are on the loading page function assertAtLoadingSpinner(matrixChat) { - const domComponent = ReactDOM.findDOMNode(matrixChat) as Element; + const domComponent = ReactDOM.findDOMNode(matrixChat); expect(domComponent.className).toEqual("mx_MatrixChat_splash"); // just the spinner @@ -693,14 +692,14 @@ function awaitLoggedIn(matrixChat) { } console.log(Date.now() + ": Received on_logged_in action"); dis.unregister(dispatcherRef); - resolve(undefined); + resolve(); }; const dispatcherRef = dis.register(onAction); console.log(Date.now() + ": Waiting for on_logged_in action"); }); } -function awaitRoomView(matrixChat, retryLimit?, retryCount?) { +function awaitRoomView(matrixChat, retryLimit, retryCount) { if (retryLimit === undefined) { retryLimit = 5; } @@ -727,13 +726,13 @@ function awaitRoomView(matrixChat, retryLimit?, retryCount?) { return Promise.resolve(); } -function awaitLoginComponent(matrixChat, attempts?) { +function awaitLoginComponent(matrixChat, attempts) { return MatrixReactTestUtils.waitForRenderedComponentWithType( matrixChat, sdk.getComponent('structures.auth.Login'), attempts, ); } -function awaitWelcomeComponent(matrixChat, attempts?) { +function awaitWelcomeComponent(matrixChat, attempts) { return MatrixReactTestUtils.waitForRenderedComponentWithType( matrixChat, sdk.getComponent('auth.Welcome'), attempts, ); From e15d27b3169265bac80bad9a2e8dc61313442e4e Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 1 Oct 2021 15:41:25 +0200 Subject: [PATCH 28/44] Revert "Fix loading-test" This reverts commit 155d80b3fa58feae238153c3ea914abb5bfb17cd. --- test/app-tests/loading-test.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/app-tests/loading-test.tsx b/test/app-tests/loading-test.tsx index 5bd28706740..f08cb957f51 100644 --- a/test/app-tests/loading-test.tsx +++ b/test/app-tests/loading-test.tsx @@ -39,7 +39,6 @@ import {sleep} from "../test-utils"; import "fake-indexeddb/auto"; import {cleanLocalstorage} from "../test-utils"; import {IndexedDBCryptoStore} from "matrix-js-sdk/src/crypto/store/indexeddb-crypto-store"; -import { RoomView as RoomViewClass } from 'matrix-react-sdk/src/components/structures/RoomView'; const DEFAULT_HS_URL='http://my_server'; const DEFAULT_IS_URL='http://my_is'; @@ -722,7 +721,7 @@ function awaitRoomView(matrixChat, retryLimit, retryCount) { // state looks good, check the rendered output ReactTestUtils.findRenderedComponentWithType( - matrixChat, RoomViewClass); + matrixChat, sdk.getComponent('structures.RoomView')); return Promise.resolve(); } From ef436b8fa77db17d2b916180fe043610a7158fda Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 1 Oct 2021 15:41:28 +0200 Subject: [PATCH 29/44] Revert "Fix joining-test" This reverts commit ecf29d9409eaa35da29b0c1be73bd1389f00aae7. --- test/app-tests/joining-test.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/app-tests/joining-test.tsx b/test/app-tests/joining-test.tsx index b5601875b91..744037325ce 100644 --- a/test/app-tests/joining-test.tsx +++ b/test/app-tests/joining-test.tsx @@ -31,12 +31,12 @@ import {sleep} from "../test-utils"; import * as test_utils from "../test-utils"; import MockHttpBackend from "matrix-mock-request"; import "fake-indexeddb/auto"; -import { RoomView as RoomViewClass } from 'matrix-react-sdk/src/components/structures/RoomView'; const MatrixChat = sdk.getComponent('structures.MatrixChat'); const RoomDirectory = sdk.getComponent('structures.RoomDirectory'); const RoomPreviewBar = sdk.getComponent('rooms.RoomPreviewBar'); +const RoomView = sdk.getComponent('structures.RoomView'); const HS_URL='http://localhost'; const IS_URL='http://localhost'; @@ -50,6 +50,7 @@ describe('joining a room', function() { let matrixChat; beforeEach(function() { + test_utils.beforeEach(this); httpBackend = new MockHttpBackend(); jssdk.request(httpBackend.requestFn); parentDiv = document.createElement('div'); @@ -147,7 +148,7 @@ describe('joining a room', function() { // enter an alias in the input, and simulate enter const input = ReactTestUtils.findRenderedDOMComponentWithTag( - roomDir, 'input') as HTMLInputElement; + roomDir, 'input'); input.value = ROOM_ALIAS; ReactTestUtils.Simulate.change(input); ReactTestUtils.Simulate.keyUp(input, {key: 'Enter'}); @@ -164,7 +165,7 @@ describe('joining a room', function() { // we should now have a roomview roomView = ReactTestUtils.findRenderedComponentWithType( - matrixChat, RoomViewClass); + matrixChat, RoomView); // the preview bar may take a tick to be displayed return sleep(1); @@ -227,7 +228,7 @@ describe('joining a room', function() { return httpBackend.flush(); }).then(() => { // now the room should have loaded - expect(roomView.state.room).toBeTruthy(); + expect(roomView.state.room).toExist(); }); }); }); From 5192f344b1058863045b9c20a1449bdf71014a49 Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 1 Oct 2021 15:41:30 +0200 Subject: [PATCH 30/44] Revert "Add missing jest types" This reverts commit 04ee4d613793bcc911fb98332aec556f7d2ed88f. --- package.json | 3 +-- yarn.lock | 65 +++------------------------------------------------- 2 files changed, 4 insertions(+), 64 deletions(-) diff --git a/package.json b/package.json index 598863c6fee..d35eeb16b93 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,6 @@ "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3", "@principalstudio/html-webpack-inject-preload": "^1.2.7", "@types/flux": "^3.1.9", - "@types/jest": "^27.0.2", "@types/modernizr": "^3.5.3", "@types/node": "^14.14.22", "@types/react": "17.0.14", @@ -167,7 +166,7 @@ "jest": { "testEnvironment": "jest-environment-jsdom-sixteen", "testMatch": [ - "/test/**/*-test.[tj]s[x]" + "/test/**/*-test.[tj]s" ], "setupFilesAfterEnv": [ "/node_modules/matrix-react-sdk/test/setupTests.js" diff --git a/yarn.lock b/yarn.lock index 458097efe2a..0bcfa42d16e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1293,17 +1293,6 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" -"@jest/types@^27.2.4": - version "27.2.4" - resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.2.4.tgz#2430042a66e00dc5b140c3636f4474d464c21ee8" - integrity sha512-IDO2ezTxeMvQAHxzG/ZvEyA47q0aVfzT95rGFl7bZs/Go0aIucvfDbS2rmnoEdXxlLQhcolmoG/wvL/uKx4tKA== - dependencies: - "@types/istanbul-lib-coverage" "^2.0.0" - "@types/istanbul-reports" "^3.0.0" - "@types/node" "*" - "@types/yargs" "^16.0.0" - chalk "^4.0.0" - "@matrix-org/olm@https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz": version "3.2.3" resolved "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz#cc332fdd25c08ef0e40f4d33fc3f822a0f98b6f4" @@ -1663,14 +1652,6 @@ dependencies: "@types/istanbul-lib-report" "*" -"@types/jest@^27.0.2": - version "27.0.2" - resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.0.2.tgz#ac383c4d4aaddd29bbf2b916d8d105c304a5fcd7" - integrity sha512-4dRxkS/AFX0c5XW6IPMNOydLn2tEhNhJV7DnYK+0bjoJZ+QTmfucBlihX7aoEsh/ocYtkLC73UbnBXBXIxsULA== - dependencies: - jest-diff "^27.0.0" - pretty-format "^27.0.0" - "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": version "7.0.9" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" @@ -1841,13 +1822,6 @@ dependencies: "@types/yargs-parser" "*" -"@types/yargs@^16.0.0": - version "16.0.4" - resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977" - integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw== - dependencies: - "@types/yargs-parser" "*" - "@typescript-eslint/eslint-plugin@^4.17.0": version "4.31.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.1.tgz#e938603a136f01dcabeece069da5fb2e331d4498" @@ -2219,7 +2193,7 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-regex@^5.0.0, ansi-regex@^5.0.1: +ansi-regex@^5.0.0: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== @@ -2243,11 +2217,6 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" -ansi-styles@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" - integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== - anymatch@^1.3.0: version "1.3.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" @@ -4146,11 +4115,6 @@ diff-sequences@^26.6.2: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== -diff-sequences@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.6.tgz#3305cb2e55a033924054695cc66019fd7f8e5723" - integrity sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ== - diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -6903,16 +6867,6 @@ jest-diff@^26.6.2: jest-get-type "^26.3.0" pretty-format "^26.6.2" -jest-diff@^27.0.0: - version "27.2.4" - resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.2.4.tgz#171c51d3d2c105c457100fee6e7bf7cee51c8d8c" - integrity sha512-bLAVlDSCR3gqUPGv+4nzVpEXGsHh98HjUL7Vb2hVyyuBDoQmja8eJb0imUABsuxBeUVmf47taJSAd9nDrwWKEg== - dependencies: - chalk "^4.0.0" - diff-sequences "^27.0.6" - jest-get-type "^27.0.6" - pretty-format "^27.2.4" - jest-docblock@^26.0.0: version "26.0.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-26.0.0.tgz#3e2fa20899fc928cb13bd0ff68bd3711a36889b5" @@ -6971,11 +6925,6 @@ jest-get-type@^26.3.0: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== -jest-get-type@^27.0.6: - version "27.0.6" - resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.6.tgz#0eb5c7f755854279ce9b68a9f1a4122f69047cfe" - integrity sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg== - jest-haste-map@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" @@ -9831,16 +9780,6 @@ pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" -pretty-format@^27.0.0, pretty-format@^27.2.4: - version "27.2.4" - resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.4.tgz#08ea39c5eab41b082852d7093059a091f6ddc748" - integrity sha512-NUjw22WJHldzxyps2YjLZkUj6q1HvjqFezkB9Y2cklN8NtVZN/kZEXGZdFw4uny3oENzV5EEMESrkI0YDUH8vg== - dependencies: - "@jest/types" "^27.2.4" - ansi-regex "^5.0.1" - ansi-styles "^5.0.0" - react-is "^17.0.1" - process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -12265,8 +12204,10 @@ watchpack@^1.7.4: resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" integrity sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== dependencies: + chokidar "^3.4.1" graceful-fs "^4.1.2" neo-async "^2.5.0" + watchpack-chokidar2 "^2.0.1" optionalDependencies: chokidar "^3.4.1" watchpack-chokidar2 "^2.0.1" From fe9d0189a0b65bf4cdb7a40440538eb01554cdf3 Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk Date: Fri, 1 Oct 2021 15:41:32 +0200 Subject: [PATCH 31/44] Revert "Typescriptify tests" This reverts commit 2a4dcd1267864bd0735f0f6ccda7eca46bc302b7. --- test/app-tests/{joining-test.tsx => joining-test.js} | 0 test/app-tests/{loading-test.tsx => loading-test.js} | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename test/app-tests/{joining-test.tsx => joining-test.js} (100%) rename test/app-tests/{loading-test.tsx => loading-test.js} (100%) diff --git a/test/app-tests/joining-test.tsx b/test/app-tests/joining-test.js similarity index 100% rename from test/app-tests/joining-test.tsx rename to test/app-tests/joining-test.js diff --git a/test/app-tests/loading-test.tsx b/test/app-tests/loading-test.js similarity index 100% rename from test/app-tests/loading-test.tsx rename to test/app-tests/loading-test.js From 4efa0b215fa4f6fc49c79571e35fd61d707ee5ed Mon Sep 17 00:00:00 2001 From: Dariusz Niemczyk <3636685+Palid@users.noreply.github.com> Date: Fri, 1 Oct 2021 16:48:57 +0200 Subject: [PATCH 32/44] Add typescript support and fix tests after threads work (#19247) * Typescriptify tests * Fix tests after threads work * Add proper types for jest --- package.json | 3 +- .../{joining-test.js => joining-test.tsx} | 9 ++- .../{loading-test.js => loading-test.tsx} | 20 +++--- yarn.lock | 65 ++++++++++++++++++- 4 files changed, 79 insertions(+), 18 deletions(-) rename test/app-tests/{joining-test.js => joining-test.tsx} (97%) rename test/app-tests/{loading-test.js => loading-test.tsx} (97%) diff --git a/package.json b/package.json index d35eeb16b93..27a76219d96 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "@pmmmwh/react-refresh-webpack-plugin": "^0.4.3", "@principalstudio/html-webpack-inject-preload": "^1.2.7", "@types/flux": "^3.1.9", + "@types/jest": "^27.0.2", "@types/modernizr": "^3.5.3", "@types/node": "^14.14.22", "@types/react": "17.0.14", @@ -166,7 +167,7 @@ "jest": { "testEnvironment": "jest-environment-jsdom-sixteen", "testMatch": [ - "/test/**/*-test.[tj]s" + "/test/**/*-test.[tj]s?(x)" ], "setupFilesAfterEnv": [ "/node_modules/matrix-react-sdk/test/setupTests.js" diff --git a/test/app-tests/joining-test.js b/test/app-tests/joining-test.tsx similarity index 97% rename from test/app-tests/joining-test.js rename to test/app-tests/joining-test.tsx index 744037325ce..b5601875b91 100644 --- a/test/app-tests/joining-test.js +++ b/test/app-tests/joining-test.tsx @@ -31,12 +31,12 @@ import {sleep} from "../test-utils"; import * as test_utils from "../test-utils"; import MockHttpBackend from "matrix-mock-request"; import "fake-indexeddb/auto"; +import { RoomView as RoomViewClass } from 'matrix-react-sdk/src/components/structures/RoomView'; const MatrixChat = sdk.getComponent('structures.MatrixChat'); const RoomDirectory = sdk.getComponent('structures.RoomDirectory'); const RoomPreviewBar = sdk.getComponent('rooms.RoomPreviewBar'); -const RoomView = sdk.getComponent('structures.RoomView'); const HS_URL='http://localhost'; const IS_URL='http://localhost'; @@ -50,7 +50,6 @@ describe('joining a room', function() { let matrixChat; beforeEach(function() { - test_utils.beforeEach(this); httpBackend = new MockHttpBackend(); jssdk.request(httpBackend.requestFn); parentDiv = document.createElement('div'); @@ -148,7 +147,7 @@ describe('joining a room', function() { // enter an alias in the input, and simulate enter const input = ReactTestUtils.findRenderedDOMComponentWithTag( - roomDir, 'input'); + roomDir, 'input') as HTMLInputElement; input.value = ROOM_ALIAS; ReactTestUtils.Simulate.change(input); ReactTestUtils.Simulate.keyUp(input, {key: 'Enter'}); @@ -165,7 +164,7 @@ describe('joining a room', function() { // we should now have a roomview roomView = ReactTestUtils.findRenderedComponentWithType( - matrixChat, RoomView); + matrixChat, RoomViewClass); // the preview bar may take a tick to be displayed return sleep(1); @@ -228,7 +227,7 @@ describe('joining a room', function() { return httpBackend.flush(); }).then(() => { // now the room should have loaded - expect(roomView.state.room).toExist(); + expect(roomView.state.room).toBeTruthy(); }); }); }); diff --git a/test/app-tests/loading-test.js b/test/app-tests/loading-test.tsx similarity index 97% rename from test/app-tests/loading-test.js rename to test/app-tests/loading-test.tsx index f08cb957f51..d2c7697c7bf 100644 --- a/test/app-tests/loading-test.js +++ b/test/app-tests/loading-test.tsx @@ -39,6 +39,8 @@ import {sleep} from "../test-utils"; import "fake-indexeddb/auto"; import {cleanLocalstorage} from "../test-utils"; import {IndexedDBCryptoStore} from "matrix-js-sdk/src/crypto/store/indexeddb-crypto-store"; +import { RoomView as RoomViewClass } from 'matrix-react-sdk/src/components/structures/RoomView'; +import LoginComponent from 'matrix-react-sdk/src/components/structures/auth/Login'; const DEFAULT_HS_URL='http://my_server'; const DEFAULT_IS_URL='http://my_is'; @@ -94,7 +96,7 @@ describe('loading:', function() { * TODO: it would be nice to factor some of this stuff out of index.js so * that we can test it rather than our own implementation of it. */ - function loadApp(opts) { + function loadApp(opts?) { opts = opts || {}; const queryString = opts.queryString || ""; const uriFragment = opts.uriFragment || ""; @@ -164,7 +166,7 @@ describe('loading:', function() { // http requests until we do. // // returns a promise resolving to the received request - async function expectAndAwaitSync(opts) { + async function expectAndAwaitSync(opts?) { let syncRequest = null; const isGuest = opts && opts.isGuest; if (!isGuest) { @@ -633,7 +635,7 @@ describe('loading:', function() { async function completeLogin(matrixChat) { // we expect a single component const login = ReactTestUtils.findRenderedComponentWithType( - matrixChat, sdk.getComponent('structures.auth.Login')); + matrixChat, LoginComponent); // When we switch to the login component, it'll hit the login endpoint // for proof of life and to get flows. We'll only give it one option. @@ -673,7 +675,7 @@ describe('loading:', function() { // assert that we are on the loading page function assertAtLoadingSpinner(matrixChat) { - const domComponent = ReactDOM.findDOMNode(matrixChat); + const domComponent = ReactDOM.findDOMNode(matrixChat) as Element; expect(domComponent.className).toEqual("mx_MatrixChat_splash"); // just the spinner @@ -691,14 +693,14 @@ function awaitLoggedIn(matrixChat) { } console.log(Date.now() + ": Received on_logged_in action"); dis.unregister(dispatcherRef); - resolve(); + resolve(undefined); }; const dispatcherRef = dis.register(onAction); console.log(Date.now() + ": Waiting for on_logged_in action"); }); } -function awaitRoomView(matrixChat, retryLimit, retryCount) { +function awaitRoomView(matrixChat, retryLimit?, retryCount?) { if (retryLimit === undefined) { retryLimit = 5; } @@ -721,17 +723,17 @@ function awaitRoomView(matrixChat, retryLimit, retryCount) { // state looks good, check the rendered output ReactTestUtils.findRenderedComponentWithType( - matrixChat, sdk.getComponent('structures.RoomView')); + matrixChat, RoomViewClass); return Promise.resolve(); } -function awaitLoginComponent(matrixChat, attempts) { +function awaitLoginComponent(matrixChat, attempts?) { return MatrixReactTestUtils.waitForRenderedComponentWithType( matrixChat, sdk.getComponent('structures.auth.Login'), attempts, ); } -function awaitWelcomeComponent(matrixChat, attempts) { +function awaitWelcomeComponent(matrixChat, attempts?) { return MatrixReactTestUtils.waitForRenderedComponentWithType( matrixChat, sdk.getComponent('auth.Welcome'), attempts, ); diff --git a/yarn.lock b/yarn.lock index 0bcfa42d16e..458097efe2a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1293,6 +1293,17 @@ "@types/yargs" "^15.0.0" chalk "^4.0.0" +"@jest/types@^27.2.4": + version "27.2.4" + resolved "https://registry.yarnpkg.com/@jest/types/-/types-27.2.4.tgz#2430042a66e00dc5b140c3636f4474d464c21ee8" + integrity sha512-IDO2ezTxeMvQAHxzG/ZvEyA47q0aVfzT95rGFl7bZs/Go0aIucvfDbS2rmnoEdXxlLQhcolmoG/wvL/uKx4tKA== + dependencies: + "@types/istanbul-lib-coverage" "^2.0.0" + "@types/istanbul-reports" "^3.0.0" + "@types/node" "*" + "@types/yargs" "^16.0.0" + chalk "^4.0.0" + "@matrix-org/olm@https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz": version "3.2.3" resolved "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz#cc332fdd25c08ef0e40f4d33fc3f822a0f98b6f4" @@ -1652,6 +1663,14 @@ dependencies: "@types/istanbul-lib-report" "*" +"@types/jest@^27.0.2": + version "27.0.2" + resolved "https://registry.yarnpkg.com/@types/jest/-/jest-27.0.2.tgz#ac383c4d4aaddd29bbf2b916d8d105c304a5fcd7" + integrity sha512-4dRxkS/AFX0c5XW6IPMNOydLn2tEhNhJV7DnYK+0bjoJZ+QTmfucBlihX7aoEsh/ocYtkLC73UbnBXBXIxsULA== + dependencies: + jest-diff "^27.0.0" + pretty-format "^27.0.0" + "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.7", "@types/json-schema@^7.0.8": version "7.0.9" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" @@ -1822,6 +1841,13 @@ dependencies: "@types/yargs-parser" "*" +"@types/yargs@^16.0.0": + version "16.0.4" + resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-16.0.4.tgz#26aad98dd2c2a38e421086ea9ad42b9e51642977" + integrity sha512-T8Yc9wt/5LbJyCaLiHPReJa0kApcIgJ7Bn735GjItUfh08Z1pJvu8QZqb9s+mMvKV6WUQRV7K2R46YbjMXTTJw== + dependencies: + "@types/yargs-parser" "*" + "@typescript-eslint/eslint-plugin@^4.17.0": version "4.31.1" resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.31.1.tgz#e938603a136f01dcabeece069da5fb2e331d4498" @@ -2193,7 +2219,7 @@ ansi-regex@^4.1.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== -ansi-regex@^5.0.0: +ansi-regex@^5.0.0, ansi-regex@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304" integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ== @@ -2217,6 +2243,11 @@ ansi-styles@^4.0.0, ansi-styles@^4.1.0: dependencies: color-convert "^2.0.1" +ansi-styles@^5.0.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-5.2.0.tgz#07449690ad45777d1924ac2abb2fc8895dba836b" + integrity sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA== + anymatch@^1.3.0: version "1.3.2" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a" @@ -4115,6 +4146,11 @@ diff-sequences@^26.6.2: resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-26.6.2.tgz#48ba99157de1923412eed41db6b6d4aa9ca7c0b1" integrity sha512-Mv/TDa3nZ9sbc5soK+OoA74BsS3mL37yixCvUAQkiuA4Wz6YtwP/K47n2rv2ovzHZvoiQeA5FTQOschKkEwB0Q== +diff-sequences@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/diff-sequences/-/diff-sequences-27.0.6.tgz#3305cb2e55a033924054695cc66019fd7f8e5723" + integrity sha512-ag6wfpBFyNXZ0p8pcuIDS//D8H062ZQJ3fzYxjpmeKjnz8W4pekL3AI8VohmyZmsWW2PWaHgjsmqR6L13101VQ== + diffie-hellman@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" @@ -6867,6 +6903,16 @@ jest-diff@^26.6.2: jest-get-type "^26.3.0" pretty-format "^26.6.2" +jest-diff@^27.0.0: + version "27.2.4" + resolved "https://registry.yarnpkg.com/jest-diff/-/jest-diff-27.2.4.tgz#171c51d3d2c105c457100fee6e7bf7cee51c8d8c" + integrity sha512-bLAVlDSCR3gqUPGv+4nzVpEXGsHh98HjUL7Vb2hVyyuBDoQmja8eJb0imUABsuxBeUVmf47taJSAd9nDrwWKEg== + dependencies: + chalk "^4.0.0" + diff-sequences "^27.0.6" + jest-get-type "^27.0.6" + pretty-format "^27.2.4" + jest-docblock@^26.0.0: version "26.0.0" resolved "https://registry.yarnpkg.com/jest-docblock/-/jest-docblock-26.0.0.tgz#3e2fa20899fc928cb13bd0ff68bd3711a36889b5" @@ -6925,6 +6971,11 @@ jest-get-type@^26.3.0: resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-26.3.0.tgz#e97dc3c3f53c2b406ca7afaed4493b1d099199e0" integrity sha512-TpfaviN1R2pQWkIihlfEanwOXK0zcxrKEE4MlU6Tn7keoXdN6/3gK/xl0yEh8DOunn5pOVGKf8hB4R9gVh04ig== +jest-get-type@^27.0.6: + version "27.0.6" + resolved "https://registry.yarnpkg.com/jest-get-type/-/jest-get-type-27.0.6.tgz#0eb5c7f755854279ce9b68a9f1a4122f69047cfe" + integrity sha512-XTkK5exIeUbbveehcSR8w0bhH+c0yloW/Wpl+9vZrjzztCPWrxhHwkIFpZzCt71oRBsgxmuUfxEqOYoZI2macg== + jest-haste-map@^26.6.2: version "26.6.2" resolved "https://registry.yarnpkg.com/jest-haste-map/-/jest-haste-map-26.6.2.tgz#dd7e60fe7dc0e9f911a23d79c5ff7fb5c2cafeaa" @@ -9780,6 +9831,16 @@ pretty-format@^26.6.2: ansi-styles "^4.0.0" react-is "^17.0.1" +pretty-format@^27.0.0, pretty-format@^27.2.4: + version "27.2.4" + resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-27.2.4.tgz#08ea39c5eab41b082852d7093059a091f6ddc748" + integrity sha512-NUjw22WJHldzxyps2YjLZkUj6q1HvjqFezkB9Y2cklN8NtVZN/kZEXGZdFw4uny3oENzV5EEMESrkI0YDUH8vg== + dependencies: + "@jest/types" "^27.2.4" + ansi-regex "^5.0.1" + ansi-styles "^5.0.0" + react-is "^17.0.1" + process-nextick-args@~2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" @@ -12204,10 +12265,8 @@ watchpack@^1.7.4: resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.7.5.tgz#1267e6c55e0b9b5be44c2023aed5437a2c26c453" integrity sha512-9P3MWk6SrKjHsGkLT2KHXdQ/9SNkyoJbabxnKOoJepsvJjJG8uYTR3yTPxPQvNDI3w4Nz1xnE0TLHK4RIVe/MQ== dependencies: - chokidar "^3.4.1" graceful-fs "^4.1.2" neo-async "^2.5.0" - watchpack-chokidar2 "^2.0.1" optionalDependencies: chokidar "^3.4.1" watchpack-chokidar2 "^2.0.1" From 107d8f6fb87a894a750bf63b52e2a57cd743040a Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 4 Oct 2021 12:07:42 +0100 Subject: [PATCH 33/44] Upgrade matrix-js-sdk to 14.0.0-rc.1 --- package.json | 2 +- yarn.lock | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 27a76219d96..3eafb68a8e6 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "highlight.js": "^10.5.0", "jsrsasign": "^10.2.0", "katex": "^0.12.0", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", + "matrix-js-sdk": "14.0.0-rc.1", "matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", diff --git a/yarn.lock b/yarn.lock index 458097efe2a..853f45d03b5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7743,6 +7743,22 @@ 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-js-sdk@14.0.0-rc.1: + version "14.0.0-rc.1" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-14.0.0-rc.1.tgz#1cb3dfd2949d3a4414986f8ab0a92575f5fff0d1" + integrity sha512-idDBJRGOOdn9yOQWoZxwLSWv2xn7jF3IJ7W5UCmOZ0EKYmH7C1VlKAfvkGDpxdbrNCRs84SUvqJqImAuQoV4Gw== + dependencies: + "@babel/runtime" "^7.12.5" + another-json "^0.2.0" + browser-request "^0.3.3" + bs58 "^4.0.1" + content-type "^1.0.4" + loglevel "^1.7.1" + p-retry "^4.5.0" + qs "^6.9.6" + request "^2.88.2" + unhomoglyph "^1.0.6" + "matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": version "13.0.0" resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/2515d07c8fc3bf5e1afc8352e3e330cca30dde85" From 8be55d8dcf62406e40e88d4f42150c2d853c5f1a Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 4 Oct 2021 12:08:08 +0100 Subject: [PATCH 34/44] Upgrade matrix-react-sdk to 3.32.0-rc.1 --- package.json | 2 +- yarn.lock | 54 +++++++++++++++++++++++++++++++++------------------- 2 files changed, 35 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 3eafb68a8e6..0e057a0631f 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "jsrsasign": "^10.2.0", "katex": "^0.12.0", "matrix-js-sdk": "14.0.0-rc.1", - "matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop", + "matrix-react-sdk": "3.32.0-rc.1", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", "react": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 853f45d03b5..f063c3e9567 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6088,6 +6088,11 @@ ignore@^5.1.4, ignore@^5.1.8: resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== +immediate@~3.0.5: + version "3.0.6" + resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" + integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= + immutable@^3.7.4: version "3.8.2" resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3" @@ -7446,6 +7451,16 @@ jsrsasign@^10.2.0: array-includes "^3.1.2" object.assign "^4.1.2" +jszip@^3.7.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.7.1.tgz#bd63401221c15625a1228c556ca8a68da6fda3d9" + integrity sha512-ghL0tz1XG9ZEmRMcEN2vt7xabrDdqHHeykgARpmZ0BiIctWxM47Vt63ZO2dnp4QYt/xJVLLy5Zv1l/xRdh2byg== + dependencies: + lie "~3.3.0" + pako "~1.0.2" + readable-stream "~2.3.6" + set-immediate-shim "~1.0.1" + katex@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/katex/-/katex-0.12.0.tgz#2fb1c665dbd2b043edcf8a1f5c555f46beaa0cb9" @@ -7533,6 +7548,13 @@ levn@~0.3.0: prelude-ls "~1.1.2" type-check "~0.3.2" +lie@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/lie/-/lie-3.3.0.tgz#dcf82dee545f46074daf200c7c1c5a08e0f40f6a" + integrity sha512-UaiMJzeWRlEujzAuw5LokY1L5ecNQYZKfmyZ9L7wDHb/p5etKaxXhohBcrw0EYby+G/NA52vRSN4N39dxHAIwQ== + dependencies: + immediate "~3.0.5" + lines-and-columns@^1.1.6: version "1.1.6" resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" @@ -7759,21 +7781,6 @@ matrix-js-sdk@14.0.0-rc.1: request "^2.88.2" unhomoglyph "^1.0.6" -"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": - version "13.0.0" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/2515d07c8fc3bf5e1afc8352e3e330cca30dde85" - dependencies: - "@babel/runtime" "^7.12.5" - another-json "^0.2.0" - browser-request "^0.3.3" - bs58 "^4.0.1" - content-type "^1.0.4" - loglevel "^1.7.1" - p-retry "^4.5.0" - qs "^6.9.6" - request "^2.88.2" - unhomoglyph "^1.0.6" - matrix-mock-request@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/matrix-mock-request/-/matrix-mock-request-1.2.3.tgz#56b15d86e2601a9b48a854844396d18caab649c8" @@ -7782,9 +7789,10 @@ matrix-mock-request@^1.2.3: bluebird "^3.5.0" expect "^1.20.2" -"matrix-react-sdk@github:matrix-org/matrix-react-sdk#develop": - version "3.31.0" - resolved "https://codeload.github.com/matrix-org/matrix-react-sdk/tar.gz/b635d017799e198fa0391e51af0b12e9d5843992" +matrix-react-sdk@3.32.0-rc.1: + version "3.32.0-rc.1" + resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.32.0-rc.1.tgz#7753308a990d055ad7ab6239b94c640d5c4d24a8" + integrity sha512-kNb8jN6r3u7f9FBZDdj55rJKExaBv1sRs0f5nsMhM4ZzvJ6VSMZVAOUFptgTy/c+0BoQN0WIZ1hMRAFFsme7Fw== dependencies: "@babel/runtime" "^7.12.5" "@sentry/browser" "^6.11.0" @@ -7811,10 +7819,11 @@ matrix-mock-request@^1.2.3: highlight.js "^10.5.0" html-entities "^1.4.0" is-ip "^3.1.0" + jszip "^3.7.0" katex "^0.12.0" linkifyjs "^2.1.9" lodash "^4.17.20" - matrix-js-sdk "github:matrix-org/matrix-js-sdk#develop" + matrix-js-sdk "14.0.0-rc.1" matrix-widget-api "^0.1.0-beta.16" minimist "^1.2.5" opus-recorder "^8.0.3" @@ -8759,7 +8768,7 @@ pako@^2.0.3: resolved "https://registry.yarnpkg.com/pako/-/pako-2.0.4.tgz#6cebc4bbb0b6c73b0d5b8d7e8476e2b2fbea576d" integrity sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg== -pako@~1.0.5: +pako@~1.0.2, pako@~1.0.5: version "1.0.11" resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.11.tgz#6c9599d340d54dfd3946380252a35705a6b992bf" integrity sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw== @@ -10828,6 +10837,11 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= +set-immediate-shim@~1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" + integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= + set-value@^2.0.0, set-value@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" From 72c9a6f4376167be83b8bb25e88b9078284505da Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 4 Oct 2021 12:09:37 +0100 Subject: [PATCH 35/44] Prepare changelog for v1.9.1-rc.1 --- CHANGELOG.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2d492d03054..edd6d9c5e6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,30 @@ +Changes in [1.9.1-rc.1](https://github.com/vector-im/element-desktop/releases/tag/v1.9.1-rc.1) (2021-10-04) +=========================================================================================================== + +## ✨ Features + * Decrease profile button touch target ([\#6900](https://github.com/matrix-org/matrix-react-sdk/pull/6900)). Contributed by [ColonisationCaptain](https://github.com/ColonisationCaptain). + * Don't let click events propagate out of context menus ([\#6892](https://github.com/matrix-org/matrix-react-sdk/pull/6892)). + * Allow closing Dropdown via its chevron ([\#6885](https://github.com/matrix-org/matrix-react-sdk/pull/6885)). Fixes #19030 and #19030. + * Improve AUX panel behaviour ([\#6699](https://github.com/matrix-org/matrix-react-sdk/pull/6699)). Fixes #18787 and #18787. Contributed by [SimonBrandner](https://github.com/SimonBrandner). + * A nicer opening animation for the Image View ([\#6454](https://github.com/matrix-org/matrix-react-sdk/pull/6454)). Fixes #18186 and #18186. Contributed by [SimonBrandner](https://github.com/SimonBrandner). + +## 🐛 Bug Fixes + * Fix leaving space via other client leaving you in undefined-land ([\#6891](https://github.com/matrix-org/matrix-react-sdk/pull/6891)). Fixes #18455 and #18455. + * Handle newer voice message encrypted event format for chat export ([\#6893](https://github.com/matrix-org/matrix-react-sdk/pull/6893)). Contributed by [jaiwanth-v](https://github.com/jaiwanth-v). + * Fix pagination when filtering space hierarchy ([\#6876](https://github.com/matrix-org/matrix-react-sdk/pull/6876)). Fixes #19235 and #19235. + * Fix spaces null-guard breaking the dispatcher settings watching ([\#6886](https://github.com/matrix-org/matrix-react-sdk/pull/6886)). Fixes #19223 and #19223. + * Fix space children without specific `order` being sorted after those with one ([\#6878](https://github.com/matrix-org/matrix-react-sdk/pull/6878)). Fixes #19192 and #19192. + * Ensure that sub-spaces aren't considered for notification badges ([\#6881](https://github.com/matrix-org/matrix-react-sdk/pull/6881)). Fixes #18975 and #18975. + * Fix timeline autoscroll with non-standard DPI settings. ([\#6880](https://github.com/matrix-org/matrix-react-sdk/pull/6880)). Fixes #18984 and #18984. + * Pluck out JoinRuleSettings styles so they apply in space settings too ([\#6879](https://github.com/matrix-org/matrix-react-sdk/pull/6879)). Fixes #19164 and #19164. + * Null guard around the matrixClient in SpaceStore ([\#6874](https://github.com/matrix-org/matrix-react-sdk/pull/6874)). + * Fix issue (https ([\#6871](https://github.com/matrix-org/matrix-react-sdk/pull/6871)). Fixes #19138 and #19138. Contributed by [psrpinto](https://github.com/psrpinto). + * Fix pills being cut off in message bubble layout ([\#6865](https://github.com/matrix-org/matrix-react-sdk/pull/6865)). Fixes #18627 and #18627. Contributed by [robintown](https://github.com/robintown). + * Fix space admin check false positive on multiple admins ([\#6824](https://github.com/matrix-org/matrix-react-sdk/pull/6824)). + * Fix the User View ([\#6860](https://github.com/matrix-org/matrix-react-sdk/pull/6860)). Fixes #19158 and #19158. + * Fix spacing for message composer buttons ([\#6852](https://github.com/matrix-org/matrix-react-sdk/pull/6852)). Fixes #18999 and #18999. + * Always show root event of a thread in room's timeline ([\#6842](https://github.com/matrix-org/matrix-react-sdk/pull/6842)). Fixes #19016 and #19016. + Changes in [1.9.0](https://github.com/vector-im/element-desktop/releases/tag/v1.9.0) (2021-09-27) ================================================================================================= From 64fa84fc604799ac9bb893e227711cbfbce777c6 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 4 Oct 2021 12:09:38 +0100 Subject: [PATCH 36/44] v1.9.1-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0e057a0631f..7521250dd40 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "element-web", - "version": "1.9.0", + "version": "1.9.1-rc.1", "description": "A feature-rich client for Matrix.org", "author": "New Vector Ltd.", "repository": { From 7bc016dbea6d7880aaf29509d73507190ddfe52c Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Fri, 8 Oct 2021 08:40:24 +0100 Subject: [PATCH 37/44] Upgrade matrix-js-sdk to 14.0.0-rc.2 --- package.json | 2 +- yarn.lock | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 7521250dd40..3b47a391c33 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "highlight.js": "^10.5.0", "jsrsasign": "^10.2.0", "katex": "^0.12.0", - "matrix-js-sdk": "14.0.0-rc.1", + "matrix-js-sdk": "14.0.0-rc.2", "matrix-react-sdk": "3.32.0-rc.1", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", diff --git a/yarn.lock b/yarn.lock index f063c3e9567..b863ef94aa0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7781,6 +7781,22 @@ matrix-js-sdk@14.0.0-rc.1: request "^2.88.2" unhomoglyph "^1.0.6" +matrix-js-sdk@14.0.0-rc.2: + version "14.0.0-rc.2" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-14.0.0-rc.2.tgz#36415152740c07a99eb7ed07fad032296fac59d8" + integrity sha512-6s9WP+GKzI4/SkunULHVfs+LnkcwvopQzVyN62+7HbfEOmlzrR77JbtIfPLZmcbcm9e+g4IkoiBMOFYt35bwvA== + dependencies: + "@babel/runtime" "^7.12.5" + another-json "^0.2.0" + browser-request "^0.3.3" + bs58 "^4.0.1" + content-type "^1.0.4" + loglevel "^1.7.1" + p-retry "^4.5.0" + qs "^6.9.6" + request "^2.88.2" + unhomoglyph "^1.0.6" + matrix-mock-request@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/matrix-mock-request/-/matrix-mock-request-1.2.3.tgz#56b15d86e2601a9b48a854844396d18caab649c8" From 74669e178c96f57fa351778412315a6287a25922 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Fri, 8 Oct 2021 08:40:49 +0100 Subject: [PATCH 38/44] Upgrade matrix-react-sdk to 3.32.0-rc.2 --- package.json | 2 +- yarn.lock | 26 +++++--------------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 3b47a391c33..7b50ca94b0e 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "jsrsasign": "^10.2.0", "katex": "^0.12.0", "matrix-js-sdk": "14.0.0-rc.2", - "matrix-react-sdk": "3.32.0-rc.1", + "matrix-react-sdk": "3.32.0-rc.2", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", "react": "17.0.2", diff --git a/yarn.lock b/yarn.lock index b863ef94aa0..cdad15d4af1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7765,22 +7765,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-js-sdk@14.0.0-rc.1: - version "14.0.0-rc.1" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-14.0.0-rc.1.tgz#1cb3dfd2949d3a4414986f8ab0a92575f5fff0d1" - integrity sha512-idDBJRGOOdn9yOQWoZxwLSWv2xn7jF3IJ7W5UCmOZ0EKYmH7C1VlKAfvkGDpxdbrNCRs84SUvqJqImAuQoV4Gw== - dependencies: - "@babel/runtime" "^7.12.5" - another-json "^0.2.0" - browser-request "^0.3.3" - bs58 "^4.0.1" - content-type "^1.0.4" - loglevel "^1.7.1" - p-retry "^4.5.0" - qs "^6.9.6" - request "^2.88.2" - unhomoglyph "^1.0.6" - matrix-js-sdk@14.0.0-rc.2: version "14.0.0-rc.2" resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-14.0.0-rc.2.tgz#36415152740c07a99eb7ed07fad032296fac59d8" @@ -7805,10 +7789,10 @@ matrix-mock-request@^1.2.3: bluebird "^3.5.0" expect "^1.20.2" -matrix-react-sdk@3.32.0-rc.1: - version "3.32.0-rc.1" - resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.32.0-rc.1.tgz#7753308a990d055ad7ab6239b94c640d5c4d24a8" - integrity sha512-kNb8jN6r3u7f9FBZDdj55rJKExaBv1sRs0f5nsMhM4ZzvJ6VSMZVAOUFptgTy/c+0BoQN0WIZ1hMRAFFsme7Fw== +matrix-react-sdk@3.32.0-rc.2: + version "3.32.0-rc.2" + resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.32.0-rc.2.tgz#a9d73e87f0838bf5f9a38e15cba110857c6844b3" + integrity sha512-bwTd5fUllNcHSdXkgB5e4BhfrR7I8ykGOLdnMiKf9aVLy0I6yphRvIopR4KdQeHytsNGiHsMjqOb5PJykH3fJQ== dependencies: "@babel/runtime" "^7.12.5" "@sentry/browser" "^6.11.0" @@ -7839,7 +7823,7 @@ matrix-react-sdk@3.32.0-rc.1: katex "^0.12.0" linkifyjs "^2.1.9" lodash "^4.17.20" - matrix-js-sdk "14.0.0-rc.1" + matrix-js-sdk "14.0.0-rc.2" matrix-widget-api "^0.1.0-beta.16" minimist "^1.2.5" opus-recorder "^8.0.3" From 721670d57e4e262bffed6ce3df14c30d7e7abf70 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Fri, 8 Oct 2021 08:42:52 +0100 Subject: [PATCH 39/44] Prepare changelog for v1.9.1-rc.2 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index edd6d9c5e6a..f3354845da8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Changes in [1.9.1-rc.2](https://github.com/vector-im/element-desktop/releases/tag/v1.9.1-rc.2) (2021-10-08) +=========================================================================================================== + +## 🐛 Bug Fixes + * [Release] Fix space hierarchy pagination ([\#6910](https://github.com/matrix-org/matrix-react-sdk/pull/6910)). + Changes in [1.9.1-rc.1](https://github.com/vector-im/element-desktop/releases/tag/v1.9.1-rc.1) (2021-10-04) =========================================================================================================== From 5fff0fb67708c0ee2e79736cdee968b24645e6b6 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Fri, 8 Oct 2021 08:42:53 +0100 Subject: [PATCH 40/44] v1.9.1-rc.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7b50ca94b0e..91394487c1a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "element-web", - "version": "1.9.1-rc.1", + "version": "1.9.1-rc.2", "description": "A feature-rich client for Matrix.org", "author": "New Vector Ltd.", "repository": { From a605657ebefdfbfe18a2f43629e0d4bccaf017c5 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 11 Oct 2021 12:05:18 +0100 Subject: [PATCH 41/44] Upgrade matrix-js-sdk to 14.0.0 --- package.json | 2 +- yarn.lock | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 91394487c1a..83e7fdb9f0b 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "highlight.js": "^10.5.0", "jsrsasign": "^10.2.0", "katex": "^0.12.0", - "matrix-js-sdk": "14.0.0-rc.2", + "matrix-js-sdk": "14.0.0", "matrix-react-sdk": "3.32.0-rc.2", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", diff --git a/yarn.lock b/yarn.lock index cdad15d4af1..85c9ee532eb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7765,6 +7765,22 @@ 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-js-sdk@14.0.0: + version "14.0.0" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-14.0.0.tgz#e04bca71a3dc3e3256171e184ac7614973e00db2" + integrity sha512-7OOSYpGUW7iRyNQrl/gdRxFRmbpW/C7L0gEdMbZwbOPqpbcvp6DVgl0eO+ibHoX0C8t0+rGAl/hMdOST9agGWg== + dependencies: + "@babel/runtime" "^7.12.5" + another-json "^0.2.0" + browser-request "^0.3.3" + bs58 "^4.0.1" + content-type "^1.0.4" + loglevel "^1.7.1" + p-retry "^4.5.0" + qs "^6.9.6" + request "^2.88.2" + unhomoglyph "^1.0.6" + matrix-js-sdk@14.0.0-rc.2: version "14.0.0-rc.2" resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-14.0.0-rc.2.tgz#36415152740c07a99eb7ed07fad032296fac59d8" From 2ef743e5ee6538a5e74f2d9fb4777a667c9172cb Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 11 Oct 2021 12:06:09 +0100 Subject: [PATCH 42/44] Upgrade matrix-react-sdk to 3.32.0 --- package.json | 2 +- yarn.lock | 26 +++++--------------------- 2 files changed, 6 insertions(+), 22 deletions(-) diff --git a/package.json b/package.json index 83e7fdb9f0b..9524a6a3967 100644 --- a/package.json +++ b/package.json @@ -62,7 +62,7 @@ "jsrsasign": "^10.2.0", "katex": "^0.12.0", "matrix-js-sdk": "14.0.0", - "matrix-react-sdk": "3.32.0-rc.2", + "matrix-react-sdk": "3.32.0", "matrix-widget-api": "^0.1.0-beta.16", "prop-types": "^15.7.2", "react": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 85c9ee532eb..24eb149826f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7781,22 +7781,6 @@ matrix-js-sdk@14.0.0: request "^2.88.2" unhomoglyph "^1.0.6" -matrix-js-sdk@14.0.0-rc.2: - version "14.0.0-rc.2" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-14.0.0-rc.2.tgz#36415152740c07a99eb7ed07fad032296fac59d8" - integrity sha512-6s9WP+GKzI4/SkunULHVfs+LnkcwvopQzVyN62+7HbfEOmlzrR77JbtIfPLZmcbcm9e+g4IkoiBMOFYt35bwvA== - dependencies: - "@babel/runtime" "^7.12.5" - another-json "^0.2.0" - browser-request "^0.3.3" - bs58 "^4.0.1" - content-type "^1.0.4" - loglevel "^1.7.1" - p-retry "^4.5.0" - qs "^6.9.6" - request "^2.88.2" - unhomoglyph "^1.0.6" - matrix-mock-request@^1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/matrix-mock-request/-/matrix-mock-request-1.2.3.tgz#56b15d86e2601a9b48a854844396d18caab649c8" @@ -7805,10 +7789,10 @@ matrix-mock-request@^1.2.3: bluebird "^3.5.0" expect "^1.20.2" -matrix-react-sdk@3.32.0-rc.2: - version "3.32.0-rc.2" - resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.32.0-rc.2.tgz#a9d73e87f0838bf5f9a38e15cba110857c6844b3" - integrity sha512-bwTd5fUllNcHSdXkgB5e4BhfrR7I8ykGOLdnMiKf9aVLy0I6yphRvIopR4KdQeHytsNGiHsMjqOb5PJykH3fJQ== +matrix-react-sdk@3.32.0: + version "3.32.0" + resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.32.0.tgz#e4c95cc943dcf984fd8bde3ba375bee93b14912d" + integrity sha512-wS1CnGOljr21XNwNvqJsOBG6Xba61qoZ+R8xIiNEJ1tejFQcNTCjOga9/Rt46eG/ju1bQxGkXdELZY2ZteWblg== dependencies: "@babel/runtime" "^7.12.5" "@sentry/browser" "^6.11.0" @@ -7839,7 +7823,7 @@ matrix-react-sdk@3.32.0-rc.2: katex "^0.12.0" linkifyjs "^2.1.9" lodash "^4.17.20" - matrix-js-sdk "14.0.0-rc.2" + matrix-js-sdk "14.0.0" matrix-widget-api "^0.1.0-beta.16" minimist "^1.2.5" opus-recorder "^8.0.3" From 8e486c3f98599712aea9df4ebbb27a0af6235189 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 11 Oct 2021 12:08:26 +0100 Subject: [PATCH 43/44] Prepare changelog for v1.9.1 --- CHANGELOG.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f3354845da8..ad8481517be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,31 @@ +Changes in [1.9.1](https://github.com/vector-im/element-desktop/releases/tag/v1.9.1) (2021-10-11) +================================================================================================= + +## ✨ Features + * Decrease profile button touch target ([\#6900](https://github.com/matrix-org/matrix-react-sdk/pull/6900)). Contributed by [ColonisationCaptain](https://github.com/ColonisationCaptain). + * Don't let click events propagate out of context menus ([\#6892](https://github.com/matrix-org/matrix-react-sdk/pull/6892)). + * Allow closing Dropdown via its chevron ([\#6885](https://github.com/matrix-org/matrix-react-sdk/pull/6885)). Fixes #19030 and #19030. + * Improve AUX panel behaviour ([\#6699](https://github.com/matrix-org/matrix-react-sdk/pull/6699)). Fixes #18787 and #18787. Contributed by [SimonBrandner](https://github.com/SimonBrandner). + * A nicer opening animation for the Image View ([\#6454](https://github.com/matrix-org/matrix-react-sdk/pull/6454)). Fixes #18186 and #18186. Contributed by [SimonBrandner](https://github.com/SimonBrandner). + +## 🐛 Bug Fixes + * [Release] Fix space hierarchy pagination ([\#6910](https://github.com/matrix-org/matrix-react-sdk/pull/6910)). + * Fix leaving space via other client leaving you in undefined-land ([\#6891](https://github.com/matrix-org/matrix-react-sdk/pull/6891)). Fixes #18455 and #18455. + * Handle newer voice message encrypted event format for chat export ([\#6893](https://github.com/matrix-org/matrix-react-sdk/pull/6893)). Contributed by [jaiwanth-v](https://github.com/jaiwanth-v). + * Fix pagination when filtering space hierarchy ([\#6876](https://github.com/matrix-org/matrix-react-sdk/pull/6876)). Fixes #19235 and #19235. + * Fix spaces null-guard breaking the dispatcher settings watching ([\#6886](https://github.com/matrix-org/matrix-react-sdk/pull/6886)). Fixes #19223 and #19223. + * Fix space children without specific `order` being sorted after those with one ([\#6878](https://github.com/matrix-org/matrix-react-sdk/pull/6878)). Fixes #19192 and #19192. + * Ensure that sub-spaces aren't considered for notification badges ([\#6881](https://github.com/matrix-org/matrix-react-sdk/pull/6881)). Fixes #18975 and #18975. + * Fix timeline autoscroll with non-standard DPI settings. ([\#6880](https://github.com/matrix-org/matrix-react-sdk/pull/6880)). Fixes #18984 and #18984. + * Pluck out JoinRuleSettings styles so they apply in space settings too ([\#6879](https://github.com/matrix-org/matrix-react-sdk/pull/6879)). Fixes #19164 and #19164. + * Null guard around the matrixClient in SpaceStore ([\#6874](https://github.com/matrix-org/matrix-react-sdk/pull/6874)). + * Fix issue (https ([\#6871](https://github.com/matrix-org/matrix-react-sdk/pull/6871)). Fixes #19138 and #19138. Contributed by [psrpinto](https://github.com/psrpinto). + * Fix pills being cut off in message bubble layout ([\#6865](https://github.com/matrix-org/matrix-react-sdk/pull/6865)). Fixes #18627 and #18627. Contributed by [robintown](https://github.com/robintown). + * Fix space admin check false positive on multiple admins ([\#6824](https://github.com/matrix-org/matrix-react-sdk/pull/6824)). + * Fix the User View ([\#6860](https://github.com/matrix-org/matrix-react-sdk/pull/6860)). Fixes #19158 and #19158. + * Fix spacing for message composer buttons ([\#6852](https://github.com/matrix-org/matrix-react-sdk/pull/6852)). Fixes #18999 and #18999. + * Always show root event of a thread in room's timeline ([\#6842](https://github.com/matrix-org/matrix-react-sdk/pull/6842)). Fixes #19016 and #19016. + Changes in [1.9.1-rc.2](https://github.com/vector-im/element-desktop/releases/tag/v1.9.1-rc.2) (2021-10-08) =========================================================================================================== From afe8e878a5a7fcbc589b8d4b37190f46bc76752e Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 11 Oct 2021 12:08:26 +0100 Subject: [PATCH 44/44] v1.9.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9524a6a3967..f456a2b2fa0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "element-web", - "version": "1.9.1-rc.2", + "version": "1.9.1", "description": "A feature-rich client for Matrix.org", "author": "New Vector Ltd.", "repository": {