From fa4d1addd3595657944e941f5328ac4eed01d2d2 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 13:05:20 +0000 Subject: [PATCH 01/34] Update dependency @types/react to v17.0.58 (#25138) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index d623c3f0c..dac60af77 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ }, "resolutions": { "@types/react-dom": "17.0.19", - "@types/react": "17.0.55" + "@types/react": "17.0.58" }, "dependencies": { "@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.12.tgz", @@ -107,7 +107,7 @@ "@types/jsrsasign": "^10.5.4", "@types/modernizr": "^3.5.3", "@types/node": "^16", - "@types/react": "17.0.55", + "@types/react": "17.0.58", "@types/react-dom": "17.0.19", "@types/sanitize-html": "^2.3.1", "@types/ua-parser-js": "^0.7.36", diff --git a/yarn.lock b/yarn.lock index 378383a1b..a2665d313 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2209,10 +2209,10 @@ hoist-non-react-statics "^3.3.0" redux "^4.0.0" -"@types/react@*", "@types/react@17.0.55", "@types/react@^17": - version "17.0.55" - resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.55.tgz#f94eac1a37929cd86d1cc084c239c08dcfd10e5f" - integrity sha512-kBcAhmT8RivFDYxHdy8QfPKu+WyfiiGjdPb9pIRtd6tj05j0zRHq5DBGW5Ogxv5cwSKd93BVgUk/HZ4I9p3zNg== +"@types/react@*", "@types/react@17.0.58", "@types/react@^17": + version "17.0.58" + resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.58.tgz#c8bbc82114e5c29001548ebe8ed6c4ba4d3c9fb0" + integrity sha512-c1GzVY97P0fGxwGxhYq989j4XwlcHQoto6wQISOC2v6wm3h0PORRWJFHlkRjfGsiG3y1609WdQ+J+tKxvrEd6A== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" From 5557487ef2c919c526edd4062d2bb0563c94ab3f Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 18 Apr 2023 16:01:10 +0000 Subject: [PATCH 02/34] Update dependency mkdirp to v3 (#25142) * Update dependency mkdirp to v3 * Iterate --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- package.json | 2 +- scripts/build-jitsi.js | 4 ++-- yarn.lock | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index dac60af77..0d7be7e73 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,7 @@ "matrix-web-i18n": "^1.4.0", "mini-css-extract-plugin": "^1", "minimist": "^1.2.6", - "mkdirp": "^2.0.0", + "mkdirp": "^3.0.0", "modernizr": "^3.12.0", "node-fetch": "^2.6.7", "optimize-css-assets-webpack-plugin": "^6.0.0", diff --git a/scripts/build-jitsi.js b/scripts/build-jitsi.js index f7ea841b0..335d5dbf7 100644 --- a/scripts/build-jitsi.js +++ b/scripts/build-jitsi.js @@ -5,12 +5,12 @@ const fs = require("fs"); const path = require("path"); -const mkdirp = require("mkdirp"); +const { mkdirpSync } = require("mkdirp"); const fetch = require("node-fetch"); const ProxyAgent = require("simple-proxy-agent"); console.log("Making webapp directory"); -mkdirp.sync("webapp"); +mkdirpSync("webapp"); // curl -s https://meet.element.io/libs/external_api.min.js > ./webapp/jitsi_external_api.min.js console.log("Downloading Jitsi script"); diff --git a/yarn.lock b/yarn.lock index a2665d313..93e1ae33a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8569,10 +8569,10 @@ mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@^0.5.5, mkdirp@^0.5.6, mkdirp@~0.5.1: dependencies: minimist "^1.2.6" -mkdirp@^2.0.0: - version "2.1.6" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-2.1.6.tgz#964fbcb12b2d8c5d6fbc62a963ac95a273e2cc19" - integrity sha512-+hEnITedc8LAtIP9u3HJDFIdcLV2vXP33sqLLIzkv1Db1zO/1OxbvYf0Y1OC/S/Qo5dxHXepofhmxL02PsKe+A== +mkdirp@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-3.0.0.tgz#758101231418bda24435c0888a91d9bd91f1372d" + integrity sha512-7+JDnNsyCvZXoUJdkMR0oUE2AmAdsNXGTmRbiOjYIwQ6q+bL6NwrozGQdPcmYaNcrhH37F50HHBUzoaBV6FITQ== modernizr@^3.12.0: version "3.12.0" From ac33b4a428af549593ad3ff97605a05d23bdd3d9 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Apr 2023 09:32:19 +1200 Subject: [PATCH 03/34] Update dependency rimraf to v5 (#25143) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 89 +++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 89 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 0d7be7e73..2650966cf 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "postcss-simple-vars": "^5.0.2", "prettier": "2.8.4", "raw-loader": "^4.0.2", - "rimraf": "^3.0.2", + "rimraf": "^5.0.0", "semver": "^7.3.7", "simple-proxy-agent": "^1.1.0", "string-replace-loader": "3", diff --git a/yarn.lock b/yarn.lock index 93e1ae33a..5618d97cd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1713,6 +1713,11 @@ dependencies: "@octokit/openapi-types" "^12.11.0" +"@pkgjs/parseargs@^0.11.0": + version "0.11.0" + resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" + integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== + "@principalstudio/html-webpack-inject-preload@^1.2.7": version "1.2.7" resolved "https://registry.yarnpkg.com/@principalstudio/html-webpack-inject-preload/-/html-webpack-inject-preload-1.2.7.tgz#0c1f0b32a34d814b36ce84111f89990441cc64e8" @@ -3191,6 +3196,13 @@ brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace-expansion@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae" + integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA== + dependencies: + balanced-match "^1.0.0" + braces@^1.8.2: version "1.8.5" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" @@ -3694,6 +3706,15 @@ cliui@^6.0.0: strip-ansi "^6.0.0" wrap-ansi "^6.2.0" +cliui@^7.0.4: + version "7.0.4" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" + integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== + dependencies: + string-width "^4.2.0" + strip-ansi "^6.0.0" + wrap-ansi "^7.0.0" + cliui@^8.0.1: version "8.0.1" resolved "https://registry.yarnpkg.com/cliui/-/cliui-8.0.1.tgz#0c04b075db02cbfe60dc8e6cf2f5486b1a3608aa" @@ -4072,7 +4093,7 @@ cross-spawn@^6.0.0, cross-spawn@^6.0.5: shebang-command "^1.2.0" which "^1.2.9" -cross-spawn@^7.0.2, cross-spawn@^7.0.3: +cross-spawn@^7.0.0, cross-spawn@^7.0.2, cross-spawn@^7.0.3: version "7.0.3" resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== @@ -5851,6 +5872,14 @@ foreachasync@^3.0.0: resolved "https://registry.yarnpkg.com/foreachasync/-/foreachasync-3.0.0.tgz#5502987dc8714be3392097f32e0071c9dee07cf6" integrity sha512-J+ler7Ta54FwwNcx6wQRDhTIbNeyDcARMkOcguEqnEdtm0jKvN3Li3PDAb2Du3ubJYEWfYL83XMROXdsXAXycw== +foreground-child@^3.1.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" + integrity sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg== + dependencies: + cross-spawn "^7.0.0" + signal-exit "^4.0.1" + form-data@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/form-data/-/form-data-4.0.0.tgz#93919daeaf361ee529584b9b31664dc12c9fa452" @@ -6067,6 +6096,18 @@ glob2base@^0.0.12: dependencies: find-index "^0.1.1" +glob@^10.0.0: + version "10.2.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-10.2.1.tgz#44288e9186b5cd5baa848728533ba21a94aa8f33" + integrity sha512-ngom3wq2UhjdbmRE/krgkD8BQyi1KZ5l+D2dVm4+Yj+jJIBp74/ZGunL6gNGc/CYuQmvUBiavWEXIotRiv5R6A== + dependencies: + foreground-child "^3.1.0" + fs.realpath "^1.0.0" + jackspeak "^2.0.3" + minimatch "^9.0.0" + minipass "^5.0.0" + path-scurry "^1.7.0" + glob@^7.0.3, glob@^7.0.5, glob@^7.1.2, glob@^7.1.3, glob@^7.1.4: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -7181,6 +7222,15 @@ istanbul-reports@^3.1.3: html-escaper "^2.0.0" istanbul-lib-report "^3.0.0" +jackspeak@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.0.3.tgz#672eb397b97744a265b5862d7762b96e8dad6e61" + integrity sha512-0Jud3OMUdMbrlr3PyUMKESq51LXVAB+a239Ywdvd+Kgxj3MaBRml/nVRxf8tQFyfthMjuRkxkv7Vg58pmIMfuQ== + dependencies: + cliui "^7.0.4" + optionalDependencies: + "@pkgjs/parseargs" "^0.11.0" + jest-canvas-mock@2.4.0: version "2.4.0" resolved "https://registry.yarnpkg.com/jest-canvas-mock/-/jest-canvas-mock-2.4.0.tgz#947b71442d7719f8e055decaecdb334809465341" @@ -8023,6 +8073,11 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" +lru-cache@^9.0.0: + version "9.1.0" + resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-9.1.0.tgz#19efafa9d08d1c08eb8efd78876075f0b8b1b07b" + integrity sha512-qFXQEwchrZcMVen2uIDceR8Tii6kCJak5rzDStfEM0qA3YLMswaxIEZO0DhIbJ3aqaJiDjt+3crlplOb0tDtKQ== + lru-queue@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/lru-queue/-/lru-queue-0.1.0.tgz#2738bd9f0d3cf4f84490c5736c48699ac632cda3" @@ -8471,6 +8526,13 @@ minimatch@^3.0.2, minimatch@^3.0.4, minimatch@^3.0.5, minimatch@^3.1.1, minimatc dependencies: brace-expansion "^1.1.7" +minimatch@^9.0.0: + version "9.0.0" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-9.0.0.tgz#bfc8e88a1c40ffd40c172ddac3decb8451503b56" + integrity sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w== + dependencies: + brace-expansion "^2.0.1" + minimist-options@4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/minimist-options/-/minimist-options-4.1.0.tgz#c0655713c53a8a2ebd77ffa247d342c40f010619" @@ -8518,6 +8580,11 @@ minipass@^4.0.0: resolved "https://registry.yarnpkg.com/minipass/-/minipass-4.2.7.tgz#14c6fc0dcab54d9c4dd64b2b7032fef04efec218" integrity sha512-ScVIgqHcXRMyfflqHmEW0bm8z8rb5McHyOY3ewX9JBgZaR77G7nxq9L/mtV96/QbAAwtbCAHVVLzD1kkyfFQEw== +minipass@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-5.0.0.tgz#3e9788ffb90b694a5d0ec94479a45b5d8738133d" + integrity sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ== + minizlib@^2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" @@ -9268,6 +9335,14 @@ path-parse@^1.0.7: resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== +path-scurry@^1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/path-scurry/-/path-scurry-1.7.0.tgz#99c741a2cfbce782294a39994d63748b5a24f6db" + integrity sha512-UkZUeDjczjYRE495+9thsgcVgsaCPkaw80slmfVFgllxY+IO8ubTsOpFVjDPROBqJdHfVPUFRHPBV/WciOVfWg== + dependencies: + lru-cache "^9.0.0" + minipass "^5.0.0" + path-to-regexp@0.1.7: version "0.1.7" resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" @@ -10793,6 +10868,13 @@ rimraf@^3.0.2: dependencies: glob "^7.1.3" +rimraf@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-5.0.0.tgz#5bda14e410d7e4dd522154891395802ce032c2cb" + integrity sha512-Jf9llaP+RvaEVS5nPShYFhtXIrb3LRKP281ib3So0KkeZKo2wIKyq0Re7TOSwanasA423PSr6CCIL4bP6T040g== + dependencies: + glob "^10.0.0" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -11117,6 +11199,11 @@ signal-exit@^3.0.0, signal-exit@^3.0.3, signal-exit@^3.0.7: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" integrity sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ== +signal-exit@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-4.0.1.tgz#96a61033896120ec9335d96851d902cc98f0ba2a" + integrity sha512-uUWsN4aOxJAS8KOuf3QMyFtgm1pkb6I+KRZbRF/ghdf5T7sM+B1lLLzPDxswUjkmHyxQAVzEgG35E3NzDM9GVw== + simple-proxy-agent@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/simple-proxy-agent/-/simple-proxy-agent-1.1.0.tgz#974cd1130dd32554775e2d4caeb70d701f7ca8b3" From 2dc3f523aa4dca39bdd42107d6d8b832eb07b4de Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 19 Apr 2023 03:12:35 +0000 Subject: [PATCH 04/34] Update all non-major dependencies (#25139) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Kerry --- .github/workflows/static_analysis.yaml | 2 +- package.json | 6 +-- yarn.lock | 68 +++++++++++--------------- 3 files changed, 32 insertions(+), 44 deletions(-) diff --git a/.github/workflows/static_analysis.yaml b/.github/workflows/static_analysis.yaml index d1b9e380b..5a14e72a6 100644 --- a/.github/workflows/static_analysis.yaml +++ b/.github/workflows/static_analysis.yaml @@ -47,7 +47,7 @@ jobs: - name: Detecting files changed id: files - uses: futuratrepadeira/changed-files@96d5fd702a6479d573287ef07381ad59acc390ed # v4.0.0 + uses: futuratrepadeira/changed-files@0239328a3a6268aad16af7c3e4efc78e32d6c0f0 # v4.0.1 with: repo-token: ${{ secrets.GITHUB_TOKEN }} pattern: '^.*\.tsx?$' diff --git a/package.json b/package.json index 2650966cf..6a4fcfbb2 100644 --- a/package.json +++ b/package.json @@ -121,7 +121,7 @@ "cpx": "^1.5.0", "css-loader": "^4", "dotenv": "^16.0.2", - "eslint": "8.35.0", + "eslint": "8.38.0", "eslint-config-google": "^0.14.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-deprecate": "^0.7.0", @@ -161,7 +161,7 @@ "postcss-preset-env": "^6.7.0", "postcss-scss": "^4.0.4", "postcss-simple-vars": "^5.0.2", - "prettier": "2.8.4", + "prettier": "2.8.7", "raw-loader": "^4.0.2", "rimraf": "^5.0.0", "semver": "^7.3.7", @@ -174,7 +174,7 @@ "terser-webpack-plugin": "^4.0.0", "ts-node": "^10.9.1", "ts-prune": "^0.10.3", - "typescript": "5.0.3", + "typescript": "5.0.4", "webpack": "^4.46.0", "webpack-cli": "^3.3.12", "webpack-dev-server": "^3.11.2", diff --git a/yarn.lock b/yarn.lock index 5618d97cd..88c7672d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1148,7 +1148,7 @@ resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.5.0.tgz#f6f729b02feee2c749f57e334b7a1b5f40a81724" integrity sha512-vITaYzIcNmjn5tF5uxcZ/ft7/RXGrMUIS9HalWckEOF6ESiwXKoMzAQf2UW0aVd6rnOeExTJVd5hmWXucBKGXQ== -"@eslint/eslintrc@^2.0.0": +"@eslint/eslintrc@^2.0.2": version "2.0.2" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.0.2.tgz#01575e38707add677cf73ca1589abba8da899a02" integrity sha512-3W4f5tDUra+pA+FzgugqL2pRimUTDJWKr7BINqOpkZrC0uYI0NIc0/JFgBROCU07HR6GieA5m3/rsPIhDmCXTQ== @@ -1163,10 +1163,10 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@eslint/js@8.35.0": - version "8.35.0" - resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.35.0.tgz#b7569632b0b788a0ca0e438235154e45d42813a7" - integrity sha512-JXdzbRiWclLVoD8sNUjR443VVlYqiYmDVT6rGUEIEHU5YJW0gaVZwV2xgM7D4arkvASqD0IlLUVjHiFuxaftRw== +"@eslint/js@8.38.0": + version "8.38.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.38.0.tgz#73a8a0d8aa8a8e6fe270431c5e72ae91b5337892" + integrity sha512-IoD2MfUnOV58ghIHCiil01PcohxjbYR/qCxsoC+xNgUwh1EY8jOOrYmu3d3a71+tJJ23uscEV4X2HJWMsPJu4g== "@gar/promisify@^1.0.1": version "1.1.3" @@ -5231,14 +5231,7 @@ eslint-scope@^7.1.1: esrecurse "^4.3.0" estraverse "^5.2.0" -eslint-utils@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672" - integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA== - dependencies: - eslint-visitor-keys "^2.0.0" - -eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: +eslint-visitor-keys@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== @@ -5248,13 +5241,15 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.0.tgz#c7f0f956124ce677047ddbc192a68f999454dedc" integrity sha512-HPpKPUBQcAsZOsHAFwTtIKcYlCje62XB7SEAcxjtmW6TD1WVpkS6i6/hOVtTZIl4zGj/mBqpFVGvaDneik+VoQ== -eslint@8.35.0: - version "8.35.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.35.0.tgz#fffad7c7e326bae606f0e8f436a6158566d42323" - integrity sha512-BxAf1fVL7w+JLRQhWl2pzGeSiGqbWumV4WNvc9Rhp6tiCtm4oHnyPBSEtMGZwrQgudFQ+otqzWoPB7x+hxoWsw== +eslint@8.38.0: + version "8.38.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.38.0.tgz#a62c6f36e548a5574dd35728ac3c6209bd1e2f1a" + integrity sha512-pIdsD2jwlUGf/U38Jv97t8lq6HpaU/G9NKbYmpWpZGw3LdTNhZLbJePqxOXGB5+JEKfOPU/XLxYxFh03nr1KTg== dependencies: - "@eslint/eslintrc" "^2.0.0" - "@eslint/js" "8.35.0" + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.4.0" + "@eslint/eslintrc" "^2.0.2" + "@eslint/js" "8.38.0" "@humanwhocodes/config-array" "^0.11.8" "@humanwhocodes/module-importer" "^1.0.1" "@nodelib/fs.walk" "^1.2.8" @@ -5265,9 +5260,8 @@ eslint@8.35.0: doctrine "^3.0.0" escape-string-regexp "^4.0.0" eslint-scope "^7.1.1" - eslint-utils "^3.0.0" - eslint-visitor-keys "^3.3.0" - espree "^9.4.0" + eslint-visitor-keys "^3.4.0" + espree "^9.5.1" esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" @@ -5289,12 +5283,11 @@ eslint@8.35.0: minimatch "^3.1.2" natural-compare "^1.4.0" optionator "^0.9.1" - regexpp "^3.2.0" strip-ansi "^6.0.1" strip-json-comments "^3.1.0" text-table "^0.2.0" -espree@^9.4.0, espree@^9.5.1: +espree@^9.5.1: version "9.5.1" resolved "https://registry.yarnpkg.com/espree/-/espree-9.5.1.tgz#4f26a4d5f18905bf4f2e0bd99002aab807e96dd4" integrity sha512-5yxtHSZXRSW5pvv3hAlXM5+/Oswi1AUFqBmbibKb5s6bp3rGIDkyXU6xCoyuuLhijr4SFwPrXRoZjz0AZDN9tg== @@ -7804,9 +7797,9 @@ jsonfile@^6.0.1: graceful-fs "^4.1.6" jsrsasign@^10.5.25: - version "10.8.1" - resolved "https://registry.yarnpkg.com/jsrsasign/-/jsrsasign-10.8.1.tgz#b29985f4d1b2c457baba28094987ab42dee557a5" - integrity sha512-vlrtvCuhmFvKznjkJkQKHTQjg+Ol3t9S8cLiaOWFx87pk/OjNW/AfNG/3jQCB+e45otEz0JvNxOILwFg57JW5w== + version "10.8.2" + resolved "https://registry.yarnpkg.com/jsrsasign/-/jsrsasign-10.8.2.tgz#900380c8df2e08f4c1789d79f70af410282feced" + integrity sha512-iKTMkVZxyXzvd+MYLxzPk5WFZ4jPX22TrO7fQ7vS1dfso30/jntH2EexW7+K1rn11F1GkiR9Q3ulF0FQxvNNRw== "jsx-ast-utils@^2.4.1 || ^3.0.0": version "3.3.3" @@ -10156,10 +10149,10 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" integrity sha512-s/46sYeylUfHNjI+sA/78FAHlmIuKqI9wNnzEOGehAlUUYeObv5C2mOinXBjyUyWmJ2SfcS2/ydApH4hTF4WXQ== -prettier@2.8.4: - version "2.8.4" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.4.tgz#34dd2595629bfbb79d344ac4a91ff948694463c3" - integrity sha512-vIS4Rlc2FNh0BySk3Wkd6xmwxB0FpOndW5fisM5H8hsZSxU2VWVB5CWIkIjWvrHjIhxk2g3bfMKM87zNTrZddw== +prettier@2.8.7: + version "2.8.7" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.7.tgz#bb79fc8729308549d28fe3a98fce73d2c0656450" + integrity sha512-yPngTo3aXUUmyuTjeTUT75txrf+aMh9FiD7q9ZE/i6r0bPb22g4FsE6Y338PQX1bmfy08i9QQCB7/rcUAVntfw== pretty-error@^2.1.1: version "2.1.2" @@ -10677,11 +10670,6 @@ regexp.prototype.flags@^1.2.0, regexp.prototype.flags@^1.4.3: define-properties "^1.1.3" functions-have-names "^1.2.2" -regexpp@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" - integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== - regexpu-core@^5.3.1: version "5.3.2" resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-5.3.2.tgz#11a2b06884f3527aec3e93dbbf4a3b958a95546b" @@ -12253,10 +12241,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA== -typescript@5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.3.tgz#fe976f0c826a88d0a382007681cbb2da44afdedf" - integrity sha512-xv8mOEDnigb/tN9PSMTwSEqAnUvkoXMQlicOb0IUVDBSQCgBSaAAROUZYy2IcUy5qU6XajK5jjjO7TMWqBTKZA== +typescript@5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== typeson-registry@^1.0.0-alpha.20: version "1.0.0-alpha.39" From 1a04705960989056b4addd552f2df29caa4b8fb4 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 19 Apr 2023 15:11:10 +0100 Subject: [PATCH 05/34] Update config.yml --- .github/ISSUE_TEMPLATE/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 8be4e4dd7..b34e44936 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,3 +1,4 @@ +blank_issues_enabled: false contact_links: - name: Questions & support url: https://matrix.to/#/#element-web:matrix.org From a0791ff48f84cdedb9d27c05ad5941d62d54edbd Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 19 Apr 2023 16:30:41 +0100 Subject: [PATCH 06/34] Strip data-testid in production builds (#25152) --- babel.config.js | 12 ++++++++++++ package.json | 1 + webpack.config.js | 4 ++++ yarn.lock | 5 +++++ 4 files changed, 22 insertions(+) diff --git a/babel.config.js b/babel.config.js index da3942c6d..85f818aff 100644 --- a/babel.config.js +++ b/babel.config.js @@ -32,4 +32,16 @@ module.exports = { "@babel/plugin-syntax-dynamic-import", "@babel/plugin-transform-runtime", ], + env: { + production: { + plugins: [ + [ + "babel-plugin-jsx-remove-data-test-id", + { + attributes: "data-testid", + }, + ], + ], + }, + }, }; diff --git a/package.json b/package.json index 6a4fcfbb2..22c5a9c76 100644 --- a/package.json +++ b/package.json @@ -116,6 +116,7 @@ "allchange": "^1.0.6", "babel-jest": "^29.0.0", "babel-loader": "^8.2.2", + "babel-plugin-jsx-remove-data-test-id": "^3.0.0", "chokidar": "^3.5.1", "concurrently": "^8.0.0", "cpx": "^1.5.0", diff --git a/webpack.config.js b/webpack.config.js index 28d60af8a..0d1710740 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -269,6 +269,7 @@ module.exports = (env, argv) => { }, loader: "babel-loader", options: { + envName: nodeEnv, cacheDirectory: true, }, }, @@ -434,6 +435,9 @@ module.exports = (env, argv) => { { // TS -> JS because the worklet-loader won't do this for us. loader: "babel-loader", + options: { + envName: nodeEnv, + }, }, ], }, diff --git a/yarn.lock b/yarn.lock index 88c7672d0..d84e5d028 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3005,6 +3005,11 @@ babel-plugin-jest-hoist@^29.5.0: "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" +babel-plugin-jsx-remove-data-test-id@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/babel-plugin-jsx-remove-data-test-id/-/babel-plugin-jsx-remove-data-test-id-3.0.0.tgz#15c95f97ce0ff60d72b29e403bde245f86393288" + integrity sha512-E4uM/LIUizjy2Z5tVAfa8pSXsYgoKWJ97kzuEMfsIxSLSNDWsAhgFVPkgNuakViX5dkNjw1DKIi0VpWP6djqbw== + babel-plugin-polyfill-corejs2@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz#5d1bd3836d0a19e1b84bbf2d9640ccb6f951c122" From 66c86a6397265b837f0aef9971ad9b2f86e9d980 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 20 Apr 2023 08:58:07 +0100 Subject: [PATCH 07/34] Revert "Strip data-testid in production builds" (#25163 This reverts commit a0791ff48f84cdedb9d27c05ad5941d62d54edbd. --- babel.config.js | 12 ------------ package.json | 1 - webpack.config.js | 4 ---- yarn.lock | 5 ----- 4 files changed, 22 deletions(-) diff --git a/babel.config.js b/babel.config.js index 85f818aff..da3942c6d 100644 --- a/babel.config.js +++ b/babel.config.js @@ -32,16 +32,4 @@ module.exports = { "@babel/plugin-syntax-dynamic-import", "@babel/plugin-transform-runtime", ], - env: { - production: { - plugins: [ - [ - "babel-plugin-jsx-remove-data-test-id", - { - attributes: "data-testid", - }, - ], - ], - }, - }, }; diff --git a/package.json b/package.json index 22c5a9c76..6a4fcfbb2 100644 --- a/package.json +++ b/package.json @@ -116,7 +116,6 @@ "allchange": "^1.0.6", "babel-jest": "^29.0.0", "babel-loader": "^8.2.2", - "babel-plugin-jsx-remove-data-test-id": "^3.0.0", "chokidar": "^3.5.1", "concurrently": "^8.0.0", "cpx": "^1.5.0", diff --git a/webpack.config.js b/webpack.config.js index 0d1710740..28d60af8a 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -269,7 +269,6 @@ module.exports = (env, argv) => { }, loader: "babel-loader", options: { - envName: nodeEnv, cacheDirectory: true, }, }, @@ -435,9 +434,6 @@ module.exports = (env, argv) => { { // TS -> JS because the worklet-loader won't do this for us. loader: "babel-loader", - options: { - envName: nodeEnv, - }, }, ], }, diff --git a/yarn.lock b/yarn.lock index d84e5d028..88c7672d0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3005,11 +3005,6 @@ babel-plugin-jest-hoist@^29.5.0: "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" -babel-plugin-jsx-remove-data-test-id@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/babel-plugin-jsx-remove-data-test-id/-/babel-plugin-jsx-remove-data-test-id-3.0.0.tgz#15c95f97ce0ff60d72b29e403bde245f86393288" - integrity sha512-E4uM/LIUizjy2Z5tVAfa8pSXsYgoKWJ97kzuEMfsIxSLSNDWsAhgFVPkgNuakViX5dkNjw1DKIi0VpWP6djqbw== - babel-plugin-polyfill-corejs2@^0.3.3: version "0.3.3" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.3.3.tgz#5d1bd3836d0a19e1b84bbf2d9640ccb6f951c122" From ece117b33fb9d342e12b5090abc604ba908b13bc Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Fri, 21 Apr 2023 12:54:57 +0200 Subject: [PATCH 08/34] Improve CSS class naming style guide (#25173) --- code_style.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/code_style.md b/code_style.md index f2f7e54ce..59d17492b 100644 --- a/code_style.md +++ b/code_style.md @@ -281,10 +281,14 @@ Inheriting all the rules of TypeScript, the following additionally apply: Note: We use PostCSS + some plugins to process our styles. It looks like SCSS, but actually it is not. 1. Class names must be prefixed with "mx\_". -2. Class names should denote the component which defines them, followed by any context: - 1. mx_MyFoo - 2. mx_MyFoo_avatar - 3. mx_MyFoo_avatar--user +2. Class names must denote the component which defines them, followed by any context. + The context is not further specified here in terms of meaning or syntax. + Use whatever is appropriate for your implementation use case. + Some examples: + 1. `mx_MyFoo` + 2. `mx_MyFoo_avatar` + 3. `mx_MyFoo_avatarUser` + 4. `mx_MyFoo_avatar--user` 3. Use the `$font` and `$spacing` variables instead of manual values. 4. Keep indentation/nesting to a minimum. Maximum suggested nesting is 5 layers. 5. Use the whole class name instead of shortcuts: From 40f95a6c068aaa393d42840b040df695b731ef6c Mon Sep 17 00:00:00 2001 From: Richard van der Hoff <1389908+richvdh@users.noreply.github.com> Date: Fri, 21 Apr 2023 15:12:08 +0100 Subject: [PATCH 09/34] Deprecate `$spacing` variables (#25175) Per https://github.com/matrix-org/matrix-react-sdk/pull/10686, these don't make much sense at the moment. --- code_style.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code_style.md b/code_style.md index 59d17492b..c1c9beda7 100644 --- a/code_style.md +++ b/code_style.md @@ -289,7 +289,7 @@ Note: We use PostCSS + some plugins to process our styles. It looks like SCSS, b 2. `mx_MyFoo_avatar` 3. `mx_MyFoo_avatarUser` 4. `mx_MyFoo_avatar--user` -3. Use the `$font` and `$spacing` variables instead of manual values. +3. Use the `$font` variables instead of manual values. 4. Keep indentation/nesting to a minimum. Maximum suggested nesting is 5 layers. 5. Use the whole class name instead of shortcuts: From a2da1eb79df1ecff812dc922d2cde57045670fbd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 25 Apr 2023 09:35:44 +0100 Subject: [PATCH 10/34] Bump yaml from 2.2.1 to 2.2.2 (#25200) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 88c7672d0..2c25279fd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12984,9 +12984,9 @@ yaml@^1.10.0, yaml@^1.10.2: integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== yaml@^2.0.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.1.tgz#3014bf0482dcd15147aa8e56109ce8632cd60ce4" - integrity sha512-e0WHiYql7+9wr4cWMx3TVQrNwejKaEe7/rHNmQmqRjazfOP5W8PB6Jpebb5o6fIapbz9o9+2ipcaTM2ZwDI6lw== + version "2.2.2" + resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.2.2.tgz#ec551ef37326e6d42872dad1970300f8eb83a073" + integrity sha512-CBKFWExMn46Foo4cldiChEzn7S7SRV+wqiluAb6xmueD/fGyRHIhX8m14vVGgeFWjN540nKCNVj6P21eQjgTuA== yargs-parser@^13.1.2: version "13.1.2" From f5b8bccb653c7e30537f3f436ce7ac84eb7b428e Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 25 Apr 2023 09:36:17 +0100 Subject: [PATCH 11/34] Conform more of the codebase with `noImplicitAny` and `strictNullChecks` (#25174 * Conform more of the codebase with `noImplicitAny` and `strictNullChecks` * Fix tests * Update src/vector/app.tsx --- .eslintrc.js | 1 + package.json | 3 +- src/@types/jitsi-meet.d.ts | 29 +++++ .../structures/CompatibilityView.tsx | 4 +- src/components/views/auth/VectorAuthPage.tsx | 2 +- src/favicon.ts | 8 +- src/vector/app.tsx | 36 +++--- src/vector/getconfig.ts | 8 +- src/vector/index.ts | 6 +- src/vector/init.tsx | 6 +- src/vector/jitsi/index.ts | 78 ++++++------ src/vector/mobile_guide/index.ts | 36 +++--- src/vector/platform/ElectronPlatform.tsx | 20 ++-- src/vector/platform/IPCManager.ts | 5 +- src/vector/platform/SeshatIndexManager.ts | 3 +- src/vector/platform/VectorBasePlatform.ts | 2 +- src/vector/platform/WebPlatform.ts | 8 +- src/vector/routing.ts | 2 +- test/app-tests/loading-test.tsx | 111 +++++++++--------- test/unit-tests/favicon-test.ts | 2 +- test/unit-tests/vector/getconfig-test.ts | 9 +- .../vector/platform/ElectronPlatform-test.ts | 14 +-- .../vector/platform/WebPlatform-test.ts | 43 ++++--- test/unit-tests/vector/routing-test.ts | 28 +++-- test/unit-tests/vector/url_utils-test.ts | 1 - yarn.lock | 11 +- 26 files changed, 265 insertions(+), 211 deletions(-) create mode 100644 src/@types/jitsi-meet.d.ts diff --git a/.eslintrc.js b/.eslintrc.js index 6fd40eb9f..72cadf813 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -87,6 +87,7 @@ module.exports = { // We don't need super strict typing in test utilities "@typescript-eslint/explicit-function-return-type": "off", "@typescript-eslint/explicit-member-accessibility": "off", + "@typescript-eslint/ban-ts-comment": "off", }, }, ], diff --git a/package.json b/package.json index 6a4fcfbb2..dd664704b 100644 --- a/package.json +++ b/package.json @@ -68,7 +68,7 @@ "@types/react": "17.0.58" }, "dependencies": { - "@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.12.tgz", + "@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz", "@matrix-org/react-sdk-module-api": "^0.0.4", "gfm.css": "^1.1.2", "jsrsasign": "^10.5.25", @@ -104,6 +104,7 @@ "@svgr/webpack": "^5.5.0", "@testing-library/react": "^12.1.5", "@types/jest": "^29.0.0", + "@types/jitsi-meet": "^2.0.2", "@types/jsrsasign": "^10.5.4", "@types/modernizr": "^3.5.3", "@types/node": "^16", diff --git a/src/@types/jitsi-meet.d.ts b/src/@types/jitsi-meet.d.ts new file mode 100644 index 000000000..a5680debd --- /dev/null +++ b/src/@types/jitsi-meet.d.ts @@ -0,0 +1,29 @@ +/* +Copyright 2023 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +import "jitsi-meet"; + +declare module "jitsi-meet" { + interface ExternalAPIEventCallbacks { + errorOccurred: (e: { error: Error & { isFatal?: boolean } }) => void; + } + + interface JitsiMeetExternalAPI { + executeCommand(command: "setTileView", value: boolean): void; + } +} + +export as namespace Jitsi; diff --git a/src/async-components/structures/CompatibilityView.tsx b/src/async-components/structures/CompatibilityView.tsx index 02bcffa44..dde0aea25 100644 --- a/src/async-components/structures/CompatibilityView.tsx +++ b/src/async-components/structures/CompatibilityView.tsx @@ -17,10 +17,10 @@ limitations under the License. import * as React from "react"; import { _t } from "matrix-react-sdk/src/languageHandler"; import SdkConfig from "matrix-react-sdk/src/SdkConfig"; - // directly import the style here as this layer does not support rethemedex at this time so no matrix-react-sdk // PostCSS variables will be accessible. import "../../../res/css/structures/ErrorView.pcss"; +import { ReactNode } from "react"; interface IProps { onAccept(): void; @@ -91,7 +91,7 @@ const CompatibilityView: React.FC = ({ onAccept }) => { android = []; } - let mobileHeader =

{_t("Use %(brand)s on mobile", { brand })}

; + let mobileHeader: ReactNode =

{_t("Use %(brand)s on mobile", { brand })}

; if (!android.length && !ios) { mobileHeader = null; } diff --git a/src/components/views/auth/VectorAuthPage.tsx b/src/components/views/auth/VectorAuthPage.tsx index 560fe424a..e04dfcefd 100644 --- a/src/components/views/auth/VectorAuthPage.tsx +++ b/src/components/views/auth/VectorAuthPage.tsx @@ -20,7 +20,7 @@ import SdkConfig from "matrix-react-sdk/src/SdkConfig"; import VectorAuthFooter from "./VectorAuthFooter"; export default class VectorAuthPage extends React.PureComponent { - private static welcomeBackgroundUrl; + private static welcomeBackgroundUrl?: string; // cache the url as a static to prevent it changing without refreshing private static getWelcomeBackgroundUrl(): string { diff --git a/src/favicon.ts b/src/favicon.ts index 5a9516d24..9f4fbec39 100644 --- a/src/favicon.ts +++ b/src/favicon.ts @@ -72,14 +72,14 @@ export default class Favicon { // get height and width of the favicon this.canvas.height = this.baseImage.height > 0 ? this.baseImage.height : 32; this.canvas.width = this.baseImage.width > 0 ? this.baseImage.width : 32; - this.context = this.canvas.getContext("2d"); + this.context = this.canvas.getContext("2d")!; this.ready(); }; - this.baseImage.setAttribute("src", lastIcon.getAttribute("href")); + this.baseImage.setAttribute("src", lastIcon.getAttribute("href")!); } else { this.canvas.height = this.baseImage.height = 32; this.canvas.width = this.baseImage.width = 32; - this.context = this.canvas.getContext("2d"); + this.context = this.canvas.getContext("2d")!; this.ready(); } } @@ -239,7 +239,7 @@ export default class Favicon { const icons: HTMLLinkElement[] = []; const links = window.document.getElementsByTagName("head")[0].getElementsByTagName("link"); for (const link of links) { - if (/(^|\s)icon(\s|$)/i.test(link.getAttribute("rel"))) { + if (link.hasAttribute("rel") && /(^|\s)icon(\s|$)/i.test(link.getAttribute("rel")!)) { icons.push(link); } } diff --git a/src/vector/app.tsx b/src/vector/app.tsx index 6614948ab..2b140a5ba 100644 --- a/src/vector/app.tsx +++ b/src/vector/app.tsx @@ -25,7 +25,7 @@ import React, { ReactElement } from "react"; import PlatformPeg from "matrix-react-sdk/src/PlatformPeg"; import { UserFriendlyError } from "matrix-react-sdk/src/languageHandler"; import AutoDiscoveryUtils from "matrix-react-sdk/src/utils/AutoDiscoveryUtils"; -import { AutoDiscovery } from "matrix-js-sdk/src/autodiscovery"; +import { AutoDiscovery, ClientConfig } from "matrix-js-sdk/src/autodiscovery"; import * as Lifecycle from "matrix-react-sdk/src/Lifecycle"; import SdkConfig, { parseSsoRedirectOptions } from "matrix-react-sdk/src/SdkConfig"; import { IConfigOptions } from "matrix-react-sdk/src/IConfigOptions"; @@ -33,6 +33,8 @@ import { logger } from "matrix-js-sdk/src/logger"; import { createClient } from "matrix-js-sdk/src/matrix"; import { SnakedObject } from "matrix-react-sdk/src/utils/SnakedObject"; import MatrixChat from "matrix-react-sdk/src/components/structures/MatrixChat"; +import { ValidatedServerConfig } from "matrix-react-sdk/src/utils/ValidatedServerConfig"; +import { QueryDict, encodeParams } from "matrix-js-sdk/src/utils"; import { parseQs } from "./url_utils"; import VectorBasePlatform from "./platform/VectorBasePlatform"; @@ -55,24 +57,19 @@ window.matrixLogger = logger; // If we're in electron, we should never pass through a file:// URL otherwise // the identity server will try to 302 the browser to it, which breaks horribly. // so in that instance, hardcode to use app.element.io for now instead. -function makeRegistrationUrl(params: object): string { - let url; +function makeRegistrationUrl(params: QueryDict): string { + let url: string; if (window.location.protocol === "vector:") { url = "https://app.element.io/#/register"; } else { url = window.location.protocol + "//" + window.location.host + window.location.pathname + "#/register"; } - const keys = Object.keys(params); - for (let i = 0; i < keys.length; ++i) { - if (i === 0) { - url += "?"; - } else { - url += "&"; - } - const k = keys[i]; - url += k + "=" + encodeURIComponent(params[k]); + const encodedParams = encodeParams(params); + if (encodedParams) { + url += "?" + encodedParams; } + return url; } @@ -117,18 +114,19 @@ export async function loadApp(fragParams: {}): Promise { if (!hasPossibleToken && !isReturningFromSso && autoRedirect) { logger.log("Bypassing app load to redirect to SSO"); const tempCli = createClient({ - baseUrl: config.validated_server_config.hsUrl, - idBaseUrl: config.validated_server_config.isUrl, + baseUrl: config.validated_server_config!.hsUrl, + idBaseUrl: config.validated_server_config!.isUrl, }); - PlatformPeg.get().startSingleSignOn(tempCli, "sso", `/${getScreenFromLocation(window.location).screen}`); + PlatformPeg.get()!.startSingleSignOn(tempCli, "sso", `/${getScreenFromLocation(window.location).screen}`); // We return here because startSingleSignOn() will asynchronously redirect us. We don't // care to wait for it, and don't want to show any UI while we wait (not even half a welcome // page). As such, just don't even bother loading the MatrixChat component. - return; + return ; } - const defaultDeviceName = snakedConfig.get("default_device_display_name") ?? platform.getDefaultDeviceDisplayName(); + const defaultDeviceName = + snakedConfig.get("default_device_display_name") ?? platform?.getDefaultDeviceDisplayName(); return ( { } async function verifyServerConfig(): Promise { - let validatedConfig; + let validatedConfig: ValidatedServerConfig; try { logger.log("Verifying homeserver configuration"); @@ -197,7 +195,7 @@ async function verifyServerConfig(): Promise { } } - let discoveryResult = null; + let discoveryResult: ClientConfig | undefined; if (wkConfig) { logger.log("Config uses a default_server_config - validating object"); discoveryResult = await AutoDiscovery.fromDiscoveryConfig(wkConfig); diff --git a/src/vector/getconfig.ts b/src/vector/getconfig.ts index 4633b57d8..17a897809 100644 --- a/src/vector/getconfig.ts +++ b/src/vector/getconfig.ts @@ -18,16 +18,16 @@ import type { IConfigOptions } from "matrix-react-sdk/src/IConfigOptions"; // Load the config file. First try to load up a domain-specific config of the // form "config.$domain.json" and if that fails, fall back to config.json. -export async function getVectorConfig(relativeLocation = ""): Promise { +export async function getVectorConfig(relativeLocation = ""): Promise { if (relativeLocation !== "" && !relativeLocation.endsWith("/")) relativeLocation += "/"; - const specificConfigPromise = getConfig(`${relativeLocation}config.${document.domain}.json`); + const specificConfigPromise = getConfig(`${relativeLocation}config.${window.location.hostname}.json`); const generalConfigPromise = getConfig(relativeLocation + "config.json"); try { const configJson = await specificConfigPromise; // 404s succeed with an empty json config, so check that there are keys - if (Object.keys(configJson).length === 0) { + if (!configJson || Object.keys(configJson).length === 0) { throw new Error(); // throw to enter the catch } return configJson; @@ -36,7 +36,7 @@ export async function getVectorConfig(relativeLocation = ""): Promise { +async function getConfig(configJsonFilename: string): Promise { const url = new URL(configJsonFilename, window.location.href); url.searchParams.set("cachebuster", Date.now().toString()); const res = await fetch(url, { diff --git a/src/vector/index.ts b/src/vector/index.ts index dcffa5e2c..56d87e4fd 100644 --- a/src/vector/index.ts +++ b/src/vector/index.ts @@ -71,7 +71,7 @@ function checkBrowserFeatures(): boolean { // ES2019: http://262.ecma-international.org/10.0/#sec-object.fromentries window.Modernizr.addTest("objectfromentries", () => typeof window.Object?.fromEntries === "function"); - const featureList = Object.keys(window.Modernizr); + const featureList = Object.keys(window.Modernizr) as Array; let featureComplete = true; for (const feature of featureList) { @@ -240,7 +240,7 @@ start().catch((err) => { logger.error(err); // show the static error in an iframe to not lose any context / console data // with some basic styling to make the iframe full page - delete document.body.style.height; + document.body.style.removeProperty("height"); const iframe = document.createElement("iframe"); // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - typescript seems to only like the IE syntax for iframe sandboxing @@ -254,5 +254,5 @@ start().catch((err) => { iframe.style.right = "0"; iframe.style.bottom = "0"; iframe.style.border = "0"; - document.getElementById("matrixchat").appendChild(iframe); + document.getElementById("matrixchat")?.appendChild(iframe); }); diff --git a/src/vector/init.tsx b/src/vector/init.tsx index 6ab4e4cac..a255c7d7f 100644 --- a/src/vector/init.tsx +++ b/src/vector/init.tsx @@ -67,7 +67,7 @@ export async function loadConfig(): Promise { // granular settings are loaded correctly and to avoid duplicating the override logic for the theme. // // Note: this isn't called twice for some wrappers, like the Jitsi wrapper. - const platformConfig = await PlatformPeg.get().getConfig(); + const platformConfig = await PlatformPeg.get()?.getConfig(); if (platformConfig) { SdkConfig.put(platformConfig); } else { @@ -119,7 +119,7 @@ export function loadOlm(): Promise { export async function loadLanguage(): Promise { const prefLang = SettingsStore.getValue("language", null, /*excludeDefault=*/ true); - let langs = []; + let langs: string[] = []; if (!prefLang) { languageHandler.getLanguagesFromBrowser().forEach((l) => { @@ -163,7 +163,7 @@ export async function showError(title: string, messages?: string[]): Promise { +export async function showIncompatibleBrowser(onAccept: () => void): Promise { const CompatibilityView = ( await import( /* webpackChunkName: "compatibility-view" */ diff --git a/src/vector/jitsi/index.ts b/src/vector/jitsi/index.ts index 77379fe20..f50fa0d8d 100644 --- a/src/vector/jitsi/index.ts +++ b/src/vector/jitsi/index.ts @@ -30,6 +30,14 @@ import { IConfigOptions } from "matrix-react-sdk/src/IConfigOptions"; import { SnakedObject } from "matrix-react-sdk/src/utils/SnakedObject"; import { ElementWidgetCapabilities } from "matrix-react-sdk/src/stores/widgets/ElementWidgetCapabilities"; +import type { + JitsiMeetExternalAPIConstructor, + ExternalAPIEventCallbacks, + JitsiMeetExternalAPI as _JitsiMeetExternalAPI, + AudioMuteStatusChangedEvent, + LogEvent, + VideoMuteStatusChangedEvent, +} from "jitsi-meet"; import { getVectorConfig } from "../getconfig"; // We have to trick webpack into loading our CSS for us. @@ -40,7 +48,7 @@ const JITSI_OPENIDTOKEN_JWT_AUTH = "openidtoken-jwt"; // Dev note: we use raw JS without many dependencies to reduce bundle size. // We do not need all of React to render a Jitsi conference. -declare let JitsiMeetExternalAPI: any; +declare let JitsiMeetExternalAPI: JitsiMeetExternalAPIConstructor; let inConference = false; @@ -60,8 +68,8 @@ let isVideoChannel: boolean; let supportsScreensharing: boolean; let language: string; -let widgetApi: WidgetApi; -let meetApi: any; // JitsiMeetExternalAPI +let widgetApi: WidgetApi | undefined; +let meetApi: _JitsiMeetExternalAPI | undefined; let skipOurWelcomeScreen = false; const setupCompleted = (async (): Promise => { @@ -102,12 +110,12 @@ const setupCompleted = (async (): Promise => { } // Set this up as early as possible because Element will be hitting it almost immediately. - let widgetApiReady: Promise; + let widgetApiReady: Promise | undefined; if (parentUrl && widgetId) { const parentOrigin = new URL(qsParam("parentUrl")).origin; widgetApi = new WidgetApi(qsParam("widgetId"), parentOrigin); - widgetApiReady = new Promise((resolve) => widgetApi.once("ready", resolve)); + widgetApiReady = new Promise((resolve) => widgetApi!.once("ready", resolve)); widgetApi.requestCapabilities(VideoConferenceCapabilities); // jitsi cannot work in a popup if auth token is provided because widgetApi is not available there @@ -122,7 +130,7 @@ const setupCompleted = (async (): Promise => { action: WidgetApiAction, handler: (request: IWidgetApiRequestData) => Promise, ): void => { - widgetApi.on(`action:${action}`, async (ev: CustomEvent) => { + widgetApi!.on(`action:${action}`, async (ev: CustomEvent) => { ev.preventDefault(); await setupCompleted; @@ -138,7 +146,7 @@ const setupCompleted = (async (): Promise => { } } - await widgetApi.transport.reply(ev.detail, response); + await widgetApi!.transport.reply(ev.detail, response); }); }; @@ -149,7 +157,7 @@ const setupCompleted = (async (): Promise => { if (force === true) { meetApi?.dispose(); notifyHangup(); - meetApi = null; + meetApi = undefined; closeConference(); } else { meetApi?.executeCommand("hangup"); @@ -212,9 +220,10 @@ const setupCompleted = (async (): Promise => { // We've reached the point where we have to wait for the config, so do that then parse it. const instanceConfig = new SnakedObject((await configPromise) ?? {}); - const jitsiConfig = instanceConfig.get("jitsi_widget") ?? {}; - skipOurWelcomeScreen = - new SnakedObject(jitsiConfig).get("skip_built_in_welcome_screen") ?? false; + const jitsiConfig = instanceConfig.get("jitsi_widget"); + if (jitsiConfig) { + skipOurWelcomeScreen = new SnakedObject(jitsiConfig).get("skip_built_in_welcome_screen") ?? false; + } // Either reveal the prejoin screen, or skip straight to Jitsi depending on the config. // We don't set up the call yet though as this might lead to failure without the widget API. @@ -232,12 +241,12 @@ const setupCompleted = (async (): Promise => { enableJoinButton(); // always enable the button } catch (e) { logger.error("Error setting up Jitsi widget", e); - document.getElementById("widgetActionContainer").innerText = "Failed to load Jitsi widget"; + document.getElementById("widgetActionContainer")!.innerText = "Failed to load Jitsi widget"; } })(); function enableJoinButton(): void { - document.getElementById("joinButton").onclick = (): Promise => joinConference(); + document.getElementById("joinButton")!.onclick = (): Promise => joinConference(); } function switchVisibleContainers(): void { @@ -251,9 +260,9 @@ function switchVisibleContainers(): void { } function toggleConferenceVisibility(inConference: boolean): void { - document.getElementById("jitsiContainer").style.visibility = inConference ? "unset" : "hidden"; + document.getElementById("jitsiContainer")!.style.visibility = inConference ? "unset" : "hidden"; // Video rooms have a separate UI for joining, so they should never show our join button - document.getElementById("joinButtonContainer").style.visibility = + document.getElementById("joinButtonContainer")!.style.visibility = inConference || isVideoChannel ? "hidden" : "unset"; } @@ -311,7 +320,7 @@ async function notifyHangup(errorMessage?: string): Promise { function closeConference(): void { switchVisibleContainers(); - document.getElementById("jitsiContainer").innerHTML = ""; + document.getElementById("jitsiContainer")!.innerHTML = ""; if (skipOurWelcomeScreen) { skipToJitsiSplashScreen(); @@ -349,17 +358,17 @@ function mapLanguage(language: string): string { // and a non-nullish input specifies the label of a specific device to use. // Same for video inputs. async function joinConference(audioInput?: string | null, videoInput?: string | null): Promise { - let jwt; + let jwt: string | undefined; if (jitsiAuth === JITSI_OPENIDTOKEN_JWT_AUTH) { // See https://github.com/matrix-org/prosody-mod-auth-matrix-user-verification - const openIdToken: IOpenIDCredentials = await widgetApi.requestOpenIDConnectToken(); + const openIdToken = await widgetApi?.requestOpenIDConnectToken(); logger.log("Got OpenID Connect token"); - if (!openIdToken.access_token) { + if (!openIdToken?.access_token) { // eslint-disable-line camelcase // We've failing to get a token, don't try to init conference logger.warn("Expected to have an OpenID credential, cannot initialize widget."); - document.getElementById("widgetActionContainer").innerText = "Failed to load Jitsi widget"; + document.getElementById("widgetActionContainer")!.innerText = "Failed to load Jitsi widget"; return; } jwt = createJWTToken(openIdToken); @@ -376,7 +385,7 @@ async function joinConference(audioInput?: string | null, videoInput?: string | const options = { width: "100%", height: "100%", - parentNode: document.querySelector("#jitsiContainer"), + parentNode: document.querySelector("#jitsiContainer") ?? undefined, roomName: conferenceId, devices: { audioInput, @@ -434,13 +443,13 @@ async function joinConference(audioInput?: string | null, videoInput?: string | // (regardless of video on or off) meetApi.on("videoConferenceJoined", onVideoConferenceJoined); meetApi.on("videoConferenceLeft", onVideoConferenceLeft); - meetApi.on("readyToClose", closeConference); + meetApi.on("readyToClose", closeConference as ExternalAPIEventCallbacks["readyToClose"]); meetApi.on("errorOccurred", onErrorOccurred); meetApi.on("audioMuteStatusChanged", onAudioMuteStatusChanged); meetApi.on("videoMuteStatusChanged", onVideoMuteStatusChanged); - ["videoConferenceJoined", "participantJoined", "participantLeft"].forEach((event) => { - meetApi.on(event, updateParticipants); + (["videoConferenceJoined", "participantJoined", "participantLeft"] as const).forEach((event) => { + meetApi!.on(event, updateParticipants); }); // Patch logs into rageshakes @@ -456,9 +465,9 @@ const onVideoConferenceJoined = (): void => { // We can't just use these commands immediately after creating the // iframe, because there's *another* bug where they can crash Jitsi by // racing with its startup process. - if (displayName) meetApi.executeCommand("displayName", displayName); + if (displayName) meetApi?.executeCommand("displayName", displayName); // This doesn't have a userInfo equivalent, so has to be set via commands - if (avatarUrl) meetApi.executeCommand("avatarUrl", avatarUrl); + if (avatarUrl) meetApi?.executeCommand("avatarUrl", avatarUrl); if (widgetApi) { // ignored promise because we don't care if it works @@ -468,30 +477,30 @@ const onVideoConferenceJoined = (): void => { } // Video rooms should start in tile mode - if (isVideoChannel) meetApi.executeCommand("setTileView", true); + if (isVideoChannel) meetApi?.executeCommand("setTileView", true); }; const onVideoConferenceLeft = (): void => { notifyHangup(); - meetApi = null; + meetApi = undefined; }; -const onErrorOccurred = ({ error }): void => { +const onErrorOccurred = ({ error }: Parameters[0]): void => { if (error.isFatal) { // We got disconnected. Since Jitsi Meet might send us back to the // prejoin screen, we're forced to act as if we hung up entirely. notifyHangup(error.message); - meetApi = null; + meetApi = undefined; closeConference(); } }; -const onAudioMuteStatusChanged = ({ muted }): void => { +const onAudioMuteStatusChanged = ({ muted }: AudioMuteStatusChangedEvent): void => { const action = muted ? ElementWidgetActions.MuteAudio : ElementWidgetActions.UnmuteAudio; widgetApi?.transport.send(action, {}); }; -const onVideoMuteStatusChanged = ({ muted }): void => { +const onVideoMuteStatusChanged = ({ muted }: VideoMuteStatusChangedEvent): void => { if (muted) { // Jitsi Meet always sends a "video muted" event directly before // hanging up, which we need to ignore by padding the timeout here, @@ -507,8 +516,9 @@ const onVideoMuteStatusChanged = ({ muted }): void => { const updateParticipants = (): void => { widgetApi?.transport.send(ElementWidgetActions.CallParticipants, { - participants: meetApi.getParticipantsInfo(), + participants: meetApi?.getParticipantsInfo(), }); }; -const onLog = ({ logLevel, args }): void => (parent as unknown as typeof global).mx_rage_logger?.log(logLevel, ...args); +const onLog = ({ logLevel, args }: LogEvent): void => + (parent as unknown as typeof global).mx_rage_logger?.log(logLevel, ...args); diff --git a/src/vector/mobile_guide/index.ts b/src/vector/mobile_guide/index.ts index 0a0a351ee..5f9344074 100644 --- a/src/vector/mobile_guide/index.ts +++ b/src/vector/mobile_guide/index.ts @@ -31,17 +31,17 @@ function renderConfigError(message: string): void { } async function initPage(): Promise { - document.getElementById("back_to_element_button").onclick = onBackToElementClick; + document.getElementById("back_to_element_button")!.onclick = onBackToElementClick; const config = await getVectorConfig(".."); // We manually parse the config similar to how validateServerConfig works because // calling that function pulls in roughly 4mb of JS we don't use. - const wkConfig = config["default_server_config"]; // overwritten later under some conditions - const serverName = config["default_server_name"]; - const defaultHsUrl = config["default_hs_url"]; - const defaultIsUrl = config["default_is_url"]; + const wkConfig = config?.["default_server_config"]; // overwritten later under some conditions + const serverName = config?.["default_server_name"]; + const defaultHsUrl = config?.["default_hs_url"]; + const defaultIsUrl = config?.["default_is_url"]; const incompatibleOptions = [wkConfig, serverName, defaultHsUrl].filter((i) => !!i); if (incompatibleOptions.length > 1) { @@ -54,13 +54,13 @@ async function initPage(): Promise { return renderConfigError("Invalid configuration: no default server specified."); } - let hsUrl = ""; - let isUrl = ""; + let hsUrl: string | undefined; + let isUrl: string | undefined; - if (wkConfig && wkConfig["m.homeserver"]) { + if (typeof wkConfig?.["m.homeserver"]?.["base_url"] === "string") { hsUrl = wkConfig["m.homeserver"]["base_url"]; - if (wkConfig["m.identity_server"]) { + if (typeof wkConfig["m.identity_server"]?.["base_url"] === "string") { isUrl = wkConfig["m.identity_server"]["base_url"]; } } @@ -96,17 +96,19 @@ async function initPage(): Promise { if (isUrl && !isUrl.endsWith("/")) isUrl += "/"; if (hsUrl !== "https://matrix.org/") { - (document.getElementById("configure_element_button") as HTMLAnchorElement).href = - "https://mobile.element.io?hs_url=" + encodeURIComponent(hsUrl) + "&is_url=" + encodeURIComponent(isUrl); - document.getElementById("step1_heading").innerHTML = "1: Install the app"; - document.getElementById("step2_container").style.display = "block"; - document.getElementById("hs_url").innerText = hsUrl; + let url = "https://mobile.element.io?hs_url=" + encodeURIComponent(hsUrl); if (isUrl) { - document.getElementById("custom_is").style.display = "block"; - document.getElementById("is_url").style.display = "block"; - document.getElementById("is_url").innerText = isUrl; + document.getElementById("custom_is")!.style.display = "block"; + document.getElementById("is_url")!.style.display = "block"; + document.getElementById("is_url")!.innerText = isUrl; + url += "&is_url=" + encodeURIComponent(isUrl ?? ""); } + + (document.getElementById("configure_element_button") as HTMLAnchorElement).href = url; + document.getElementById("step1_heading")!.innerHTML = "1: Install the app"; + document.getElementById("step2_container")!.style.display = "block"; + document.getElementById("hs_url")!.innerText = hsUrl; } } diff --git a/src/vector/platform/ElectronPlatform.tsx b/src/vector/platform/ElectronPlatform.tsx index 537ce4cc0..b18b1abe4 100644 --- a/src/vector/platform/ElectronPlatform.tsx +++ b/src/vector/platform/ElectronPlatform.tsx @@ -79,7 +79,7 @@ function platformFriendlyName(): string { function onAction(payload: ActionPayload): void { // Whitelist payload actions, no point sending most across if (["call_state"].includes(payload.action)) { - window.electron.send("app_onAction", payload); + window.electron!.send("app_onAction", payload); } } @@ -105,6 +105,10 @@ export default class ElectronPlatform extends VectorBasePlatform { public constructor() { super(); + if (!window.electron) { + throw new Error("Cannot instantiate ElectronPlatform, window.electron is not set"); + } + dis.register(onAction); /* IPC Call `check_updates` returns: @@ -135,12 +139,12 @@ export default class ElectronPlatform extends VectorBasePlatform { const key = `DOWNLOAD_TOAST_${id}`; const onAccept = (): void => { - window.electron.send("userDownloadAction", { id, open: true }); + window.electron!.send("userDownloadAction", { id, open: true }); ToastStore.sharedInstance().dismissToast(key); }; const onDismiss = (): void => { - window.electron.send("userDownloadAction", { id }); + window.electron!.send("userDownloadAction", { id }); }; ToastStore.sharedInstance().addOrReplaceToast({ @@ -164,7 +168,7 @@ export default class ElectronPlatform extends VectorBasePlatform { BreadcrumbsStore.instance.on(UPDATE_EVENT, this.onBreadcrumbsUpdate); } - public async getConfig(): Promise { + public async getConfig(): Promise { return this.ipc.call("getConfig"); } @@ -212,7 +216,7 @@ export default class ElectronPlatform extends VectorBasePlatform { if (this.notificationCount === count) return; super.setNotificationCount(count); - window.electron.send("setBadgeCount", count); + window.electron!.send("setBadgeCount", count); } public supportsNotifications(): boolean { @@ -252,7 +256,7 @@ export default class ElectronPlatform extends VectorBasePlatform { } public loudNotification(ev: MatrixEvent, room: Room): void { - window.electron.send("loudNotification"); + window.electron!.send("loudNotification"); } public needsUrlTooltips(): boolean { @@ -288,14 +292,14 @@ export default class ElectronPlatform extends VectorBasePlatform { public startUpdateCheck(): void { super.startUpdateCheck(); - window.electron.send("check_updates"); + window.electron!.send("check_updates"); } public installUpdate(): void { // IPC to the main process to install the update, since quitAndInstall // doesn't fire the before-quit event so the main process needs to know // it should exit. - window.electron.send("install_update"); + window.electron!.send("install_update"); } public getDefaultDeviceDisplayName(): string { diff --git a/src/vector/platform/IPCManager.ts b/src/vector/platform/IPCManager.ts index 868f528d3..2ad4a2556 100644 --- a/src/vector/platform/IPCManager.ts +++ b/src/vector/platform/IPCManager.ts @@ -33,6 +33,9 @@ export class IPCManager { private readonly sendChannel: ElectronChannel = "ipcCall", private readonly recvChannel: ElectronChannel = "ipcReply", ) { + if (!window.electron) { + throw new Error("Cannot instantiate ElectronPlatform, window.electron is not set"); + } window.electron.on(this.recvChannel, this.onIpcReply); } @@ -42,7 +45,7 @@ export class IPCManager { const deferred = defer(); this.pendingIpcCalls[ipcCallId] = deferred; // Maybe add a timeout to these? Probably not necessary. - window.electron.send(this.sendChannel, { id: ipcCallId, name, args }); + window.electron!.send(this.sendChannel, { id: ipcCallId, name, args }); return deferred.promise; } diff --git a/src/vector/platform/SeshatIndexManager.ts b/src/vector/platform/SeshatIndexManager.ts index 3526bcc46..dd77d5800 100644 --- a/src/vector/platform/SeshatIndexManager.ts +++ b/src/vector/platform/SeshatIndexManager.ts @@ -19,6 +19,7 @@ import BaseEventIndexManager, { IEventAndProfile, IIndexStats, ISearchArgs, + ILoadArgs, } from "matrix-react-sdk/src/indexing/BaseEventIndexManager"; import { IMatrixProfile, IEventWithRoomId as IMatrixEvent, IResultRoomEvents } from "matrix-js-sdk/src/@types/search"; @@ -75,7 +76,7 @@ export class SeshatIndexManager extends BaseEventIndexManager { return this.ipc.call("removeCrawlerCheckpoint", checkpoint); } - public async loadFileEvents(args): Promise { + public async loadFileEvents(args: ILoadArgs): Promise { return this.ipc.call("loadFileEvents", args); } diff --git a/src/vector/platform/VectorBasePlatform.ts b/src/vector/platform/VectorBasePlatform.ts index cbb3b9eeb..fccb6119c 100644 --- a/src/vector/platform/VectorBasePlatform.ts +++ b/src/vector/platform/VectorBasePlatform.ts @@ -30,7 +30,7 @@ import Favicon from "../../favicon"; export default abstract class VectorBasePlatform extends BasePlatform { protected _favicon: Favicon; - public async getConfig(): Promise { + public async getConfig(): Promise { return getVectorConfig(); } diff --git a/src/vector/platform/WebPlatform.ts b/src/vector/platform/WebPlatform.ts index 938fc8fd8..75eae03e8 100644 --- a/src/vector/platform/WebPlatform.ts +++ b/src/vector/platform/WebPlatform.ts @@ -40,6 +40,8 @@ function getNormalizedAppVersion(version: string): string { } export default class WebPlatform extends VectorBasePlatform { + private static readonly VERSION = process.env.VERSION!; // baked in by Webpack + public constructor() { super(); // Register service worker if available on this platform @@ -101,7 +103,7 @@ export default class WebPlatform extends VectorBasePlatform { } public getAppVersion(): Promise { - return Promise.resolve(getNormalizedAppVersion(process.env.VERSION)); + return Promise.resolve(getNormalizedAppVersion(WebPlatform.VERSION)); } public startUpdater(): void { @@ -113,7 +115,7 @@ export default class WebPlatform extends VectorBasePlatform { // // Ideally, loading an old copy would be impossible with the // cache-control: nocache HTTP header set, but Firefox doesn't always obey it :/ - console.log("startUpdater, current version is " + getNormalizedAppVersion(process.env.VERSION)); + console.log("startUpdater, current version is " + getNormalizedAppVersion(WebPlatform.VERSION)); this.pollForUpdate((version: string, newVersion: string) => { const query = parseQs(location); if (query.updated) { @@ -144,7 +146,7 @@ export default class WebPlatform extends VectorBasePlatform { ): Promise => { return this.getMostRecentVersion().then( (mostRecentVersion) => { - const currentVersion = getNormalizedAppVersion(process.env.VERSION); + const currentVersion = getNormalizedAppVersion(WebPlatform.VERSION); if (currentVersion !== mostRecentVersion) { if (this.shouldShowUpdate(mostRecentVersion)) { diff --git a/src/vector/routing.ts b/src/vector/routing.ts index 92b2c7a59..04d455f51 100644 --- a/src/vector/routing.ts +++ b/src/vector/routing.ts @@ -22,7 +22,7 @@ import MatrixChatType from "matrix-react-sdk/src/components/structures/MatrixCha import { parseQsFromFragment } from "./url_utils"; -let lastLocationHashSet: string = null; +let lastLocationHashSet: string | null = null; export function getScreenFromLocation(location: Location): { screen: string; params: QueryDict } { const fragparts = parseQsFromFragment(location); diff --git a/test/app-tests/loading-test.tsx b/test/app-tests/loading-test.tsx index b57695df1..e5805e66e 100644 --- a/test/app-tests/loading-test.tsx +++ b/test/app-tests/loading-test.tsx @@ -28,6 +28,8 @@ import MockHttpBackend from "matrix-mock-request"; import { ValidatedServerConfig } from "matrix-react-sdk/src/utils/ValidatedServerConfig"; import { IndexedDBCryptoStore } from "matrix-js-sdk/src/crypto/store/indexeddb-crypto-store"; import { QueryDict, sleep } from "matrix-js-sdk/src/utils"; +import { IConfigOptions } from "matrix-react-sdk/src/IConfigOptions"; +import { ActionPayload } from "matrix-react-sdk/src/dispatcher/payloads"; import "../jest-mocks"; import WebPlatform from "../../src/vector/platform/WebPlatform"; @@ -38,26 +40,21 @@ const DEFAULT_HS_URL = "http://my_server"; const DEFAULT_IS_URL = "http://my_is"; describe("loading:", function () { - let parentDiv; - let httpBackend; + let httpBackend: MockHttpBackend; // an Object simulating the window.location let windowLocation: Location | undefined; // the mounted MatrixChat - let matrixChat: RenderResult | undefined; + let matrixChat: RenderResult | undefined; // a promise which resolves when the MatrixChat calls onTokenLoginCompleted let tokenLoginCompletePromise: Promise | undefined; beforeEach(function () { httpBackend = new MockHttpBackend(); + // @ts-ignore window.fetch = httpBackend.fetchFn; - parentDiv = document.createElement("div"); - - // uncomment this to actually add the div to the UI, to help with - // debugging (but slow things down) - // document.body.appendChild(parentDiv); windowLocation = undefined; matrixChat = undefined; @@ -80,8 +77,13 @@ 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?): void { - opts = opts || {}; + function loadApp( + opts: { + queryString?: string; + uriFragment?: string; + config?: IConfigOptions; + } = {}, + ): void { const queryString = opts.queryString || ""; const uriFragment = opts.uriFragment || ""; @@ -93,7 +95,7 @@ describe("loading:", function () { }, } as Location; - function onNewScreen(screen): void { + function onNewScreen(screen: string): void { console.log(Date.now() + " newscreen " + screen); const hash = "#/" + screen; windowLocation!.hash = hash; @@ -102,7 +104,7 @@ describe("loading:", function () { // Parse the given window.location and return parameters that can be used when calling // MatrixChat.showScreen(screen, params) - function getScreenFromLocation(location): { screen: string; params: QueryDict } { + function getScreenFromLocation(location: Location): { screen: string; params: QueryDict } { const fragparts = parseQsFromFragment(location); return { screen: fragparts.location.substring(1), @@ -112,22 +114,20 @@ describe("loading:", function () { const fragParts = parseQsFromFragment(windowLocation); - const config = Object.assign( - { - default_hs_url: DEFAULT_HS_URL, - default_is_url: DEFAULT_IS_URL, - validated_server_config: { - hsUrl: DEFAULT_HS_URL, - hsName: "TEST_ENVIRONMENT", - hsNameIsDifferent: false, // yes, we lie - isUrl: DEFAULT_IS_URL, - } as ValidatedServerConfig, - embeddedPages: { - homeUrl: "data:text/html;charset=utf-8;base64,PGh0bWw+PC9odG1sPg==", - }, + const config = { + default_hs_url: DEFAULT_HS_URL, + default_is_url: DEFAULT_IS_URL, + validated_server_config: { + hsUrl: DEFAULT_HS_URL, + hsName: "TEST_ENVIRONMENT", + hsNameIsDifferent: false, // yes, we lie + isUrl: DEFAULT_IS_URL, + } as ValidatedServerConfig, + embedded_pages: { + home_url: "data:text/html;charset=utf-8;base64,PGh0bWw+PC9odG1sPg==", }, - opts.config || {}, - ); + ...(opts.config ?? {}), + } as IConfigOptions; PlatformPeg.set(new WebPlatform()); @@ -137,18 +137,17 @@ describe("loading:", function () { matrixChat = render( { throw new Error("Not implemented"); }} />, - parentDiv, ); }); } @@ -157,15 +156,15 @@ describe("loading:", function () { // http requests until we do. // // returns a promise resolving to the received request - async function expectAndAwaitSync(opts?): Promise { - let syncRequest = null; + async function expectAndAwaitSync(opts?: { isGuest?: boolean }): Promise { + let syncRequest: (typeof MockHttpBackend.prototype.requests)[number] | null = null; httpBackend.when("GET", "/_matrix/client/versions").respond(200, { versions: ["r0.3.0"], unstable_features: { "m.lazy_load_members": true, }, }); - const isGuest = opts && opts.isGuest; + const isGuest = opts?.isGuest; if (!isGuest) { // the call to create the LL filter httpBackend.when("POST", "/filter").respond(200, { filter_id: "llfid" }); @@ -183,7 +182,7 @@ describe("loading:", function () { if (syncRequest) { return syncRequest; } - await httpBackend.flush(); + await httpBackend.flush(undefined); } throw new Error("Gave up waiting for /sync"); } @@ -201,11 +200,11 @@ describe("loading:", function () { httpBackend .when("POST", "/register") .check(function (req) { - expect(req.queryParams.kind).toEqual("guest"); + expect(req.queryParams?.kind).toEqual("guest"); }) .respond(403, "Guest access is disabled"); - return httpBackend.flush(); + return httpBackend.flush(undefined); }) .then(() => { // Wait for another trip around the event loop for the UI to update @@ -234,11 +233,11 @@ describe("loading:", function () { httpBackend .when("POST", "/register") .check(function (req) { - expect(req.queryParams.kind).toEqual("guest"); + expect(req.queryParams?.kind).toEqual("guest"); }) .respond(403, "Guest access is disabled"); - return httpBackend.flush(); + return httpBackend.flush(undefined); }) .then(() => { // Wait for another trip around the event loop for the UI to update @@ -403,14 +402,14 @@ describe("loading:", function () { httpBackend .when("POST", "/register") .check(function (req) { - expect(req.queryParams.kind).toEqual("guest"); + expect(req.queryParams?.kind).toEqual("guest"); }) .respond(200, { user_id: "@guest:localhost", access_token: "secret_token", }); - return httpBackend.flush(); + return httpBackend.flush(undefined); }) .then(() => { return awaitLoggedIn(matrixChat!); @@ -440,14 +439,14 @@ describe("loading:", function () { .when("POST", "/register") .check(function (req) { expect(req.path.startsWith(DEFAULT_HS_URL)).toBe(true); - expect(req.queryParams.kind).toEqual("guest"); + expect(req.queryParams?.kind).toEqual("guest"); }) .respond(200, { user_id: "@guest:localhost", access_token: "secret_token", }); - return httpBackend.flush(); + return httpBackend.flush(undefined); }) .then(() => { return awaitLoggedIn(matrixChat!); @@ -480,14 +479,14 @@ describe("loading:", function () { httpBackend .when("POST", "/register") .check(function (req) { - expect(req.queryParams.kind).toEqual("guest"); + expect(req.queryParams?.kind).toEqual("guest"); }) .respond(200, { user_id: "@guest:localhost", access_token: "secret_token", }); - return httpBackend.flush(); + return httpBackend.flush(undefined); }) .then(() => { return awaitLoggedIn(matrixChat!); @@ -513,7 +512,7 @@ describe("loading:", function () { httpBackend .when("POST", "/register") .check(function (req) { - expect(req.queryParams.kind).toEqual("guest"); + expect(req.queryParams?.kind).toEqual("guest"); }) .respond(200, { user_id: "@guest:localhost", @@ -521,7 +520,7 @@ describe("loading:", function () { }); return httpBackend - .flush() + .flush(undefined) .then(() => { return awaitLoggedIn(matrixChat!); }) @@ -584,7 +583,7 @@ describe("loading:", function () { access_token: "access_token", }); - return httpBackend.flush(); + return httpBackend.flush(undefined); }) .then(() => { // at this point, MatrixChat should fire onTokenLoginCompleted, which @@ -607,11 +606,11 @@ describe("loading:", function () { // check that we have a Login component, send a 'user:pass' login, // and await the HTTP requests. - async function completeLogin(matrixChat: RenderResult): Promise { + async function completeLogin(matrixChat: RenderResult): Promise { // 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. httpBackend.when("GET", "/login").respond(200, { flows: [{ type: "m.login.password" }] }); - httpBackend.flush(); // We already would have tried the GET /login request + httpBackend.flush(undefined); // We already would have tried the GET /login request // Give the component some time to finish processing the login flows before // continuing. @@ -635,7 +634,7 @@ describe("loading:", function () { fireEvent.click(screen.getByText("Sign in", { selector: ".mx_Login_submit" })); return httpBackend - .flush() + .flush(undefined) .then(() => { // Wait for another trip around the event loop for the UI to update return sleep(1); @@ -656,11 +655,11 @@ async function assertAtLoadingSpinner(): Promise { await screen.findByRole("progressbar"); } -async function awaitLoggedIn(matrixChat: RenderResult): Promise { +async function awaitLoggedIn(matrixChat: RenderResult): Promise { if (matrixChat.container.querySelector(".mx_MatrixChat_wrapper")) return; // already logged in return new Promise((resolve) => { - const onAction = ({ action }): void => { + const onAction = ({ action }: ActionPayload): void => { if (action !== "on_logged_in") { return; } @@ -673,19 +672,19 @@ async function awaitLoggedIn(matrixChat: RenderResult): Promise): Promise { +async function awaitRoomView(matrixChat?: RenderResult): Promise { await waitFor(() => matrixChat?.container.querySelector(".mx_RoomView")); } -async function awaitLoginComponent(matrixChat?: RenderResult): Promise { +async function awaitLoginComponent(matrixChat?: RenderResult): Promise { await waitFor(() => matrixChat?.container.querySelector(".mx_AuthPage")); } -async function awaitWelcomeComponent(matrixChat?: RenderResult): Promise { +async function awaitWelcomeComponent(matrixChat?: RenderResult): Promise { await waitFor(() => matrixChat?.container.querySelector(".mx_Welcome")); } -function moveFromWelcomeToLogin(matrixChat?: RenderResult): Promise { +function moveFromWelcomeToLogin(matrixChat?: RenderResult): Promise { dis.dispatch({ action: "start_login" }); return awaitLoginComponent(matrixChat); } diff --git a/test/unit-tests/favicon-test.ts b/test/unit-tests/favicon-test.ts index 8e2f45864..4e9739db0 100644 --- a/test/unit-tests/favicon-test.ts +++ b/test/unit-tests/favicon-test.ts @@ -29,7 +29,7 @@ describe("Favicon", () => { it("should create a link element if one doesn't yet exist", () => { const favicon = new Favicon(); expect(favicon).toBeTruthy(); - const link = window.document.querySelector("link"); + const link = window.document.querySelector("link")!; expect(link.rel).toContain("icon"); }); diff --git a/test/unit-tests/vector/getconfig-test.ts b/test/unit-tests/vector/getconfig-test.ts index aac830457..753785417 100644 --- a/test/unit-tests/vector/getconfig-test.ts +++ b/test/unit-tests/vector/getconfig-test.ts @@ -21,7 +21,6 @@ import { getVectorConfig } from "../../../src/vector/getconfig"; fetchMock.config.overwriteRoutes = true; describe("getVectorConfig()", () => { - const prevDocumentDomain = document.domain; const elementDomain = "app.element.io"; const now = 1234567890; const specificConfig = { @@ -32,7 +31,10 @@ describe("getVectorConfig()", () => { }; beforeEach(() => { - document.domain = elementDomain; + Object.defineProperty(window, "location", { + value: { href: `https://${elementDomain}`, hostname: elementDomain }, + writable: true, + }); // stable value for cachebuster jest.spyOn(Date, "now").mockReturnValue(now); @@ -41,7 +43,6 @@ describe("getVectorConfig()", () => { }); afterAll(() => { - document.domain = prevDocumentDomain; jest.spyOn(Date, "now").mockRestore(); }); @@ -107,6 +108,6 @@ describe("getVectorConfig()", () => { // We can't assert it'll be a SyntaxError as node-fetch behaves differently // https://github.com/wheresrhys/fetch-mock/issues/270 - await expect(getVectorConfig()).rejects.toThrow("Unexpected token } in JSON at position 19"); + await expect(getVectorConfig()).rejects.toThrow("in JSON at position 19"); }); }); diff --git a/test/unit-tests/vector/platform/ElectronPlatform-test.ts b/test/unit-tests/vector/platform/ElectronPlatform-test.ts index 24de2e180..653c5cf3f 100644 --- a/test/unit-tests/vector/platform/ElectronPlatform-test.ts +++ b/test/unit-tests/vector/platform/ElectronPlatform-test.ts @@ -47,8 +47,7 @@ describe("ElectronPlatform", () => { beforeEach(() => { window.electron = mockElectron; jest.clearAllMocks(); - delete window.navigator; - window.navigator = { userAgent: defaultUserAgent } as unknown as Navigator; + Object.defineProperty(window, "navigator", { value: { userAgent: defaultUserAgent }, writable: true }); }); const getElectronEventHandlerCall = (eventType: string): [type: string, handler: Function] | undefined => @@ -56,7 +55,7 @@ describe("ElectronPlatform", () => { it("flushes rageshake before quitting", () => { new ElectronPlatform(); - const [event, handler] = getElectronEventHandlerCall("before-quit"); + const [event, handler] = getElectronEventHandlerCall("before-quit")!; // correct event bound expect(event).toBeTruthy(); @@ -68,7 +67,7 @@ describe("ElectronPlatform", () => { it("dispatches view settings action on preferences event", () => { new ElectronPlatform(); - const [event, handler] = getElectronEventHandlerCall("preferences"); + const [event, handler] = getElectronEventHandlerCall("preferences")!; // correct event bound expect(event).toBeTruthy(); @@ -80,7 +79,7 @@ describe("ElectronPlatform", () => { describe("updates", () => { it("dispatches on check updates action", () => { new ElectronPlatform(); - const [event, handler] = getElectronEventHandlerCall("check_updates"); + const [event, handler] = getElectronEventHandlerCall("check_updates")!; // correct event bound expect(event).toBeTruthy(); @@ -93,7 +92,7 @@ describe("ElectronPlatform", () => { it("dispatches on check updates action when update not available", () => { new ElectronPlatform(); - const [, handler] = getElectronEventHandlerCall("check_updates"); + const [, handler] = getElectronEventHandlerCall("check_updates")!; handler({}, false); expect(dispatchSpy).toHaveBeenCalledWith({ @@ -138,8 +137,7 @@ describe("ElectronPlatform", () => { ["Mozilla/5.0 (X11; SunOS i686; rv:21.0) Gecko/20100101 Firefox/21.0", "Element Desktop: SunOS"], ["custom user agent", "Element Desktop: Unknown"], ])("%s = %s", (userAgent, result) => { - delete window.navigator; - window.navigator = { userAgent } as unknown as Navigator; + Object.defineProperty(window, "navigator", { value: { userAgent }, writable: true }); const platform = new ElectronPlatform(); expect(platform.getDefaultDeviceDisplayName()).toEqual(result); }); diff --git a/test/unit-tests/vector/platform/WebPlatform-test.ts b/test/unit-tests/vector/platform/WebPlatform-test.ts index 6f7c332c2..af35137f9 100644 --- a/test/unit-tests/vector/platform/WebPlatform-test.ts +++ b/test/unit-tests/vector/platform/WebPlatform-test.ts @@ -33,7 +33,6 @@ describe("WebPlatform", () => { }); it("registers service worker", () => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore - mocking readonly object navigator.serviceWorker = { register: jest.fn() }; new WebPlatform(); @@ -41,10 +40,7 @@ describe("WebPlatform", () => { }); it("should call reload on window location object", () => { - delete window.location; - window.location = { - reload: jest.fn(), - } as unknown as Location; + Object.defineProperty(window, "location", { value: { reload: jest.fn() }, writable: true }); const platform = new WebPlatform(); expect(window.location.reload).not.toHaveBeenCalled(); @@ -53,10 +49,7 @@ describe("WebPlatform", () => { }); it("should call reload to install update", () => { - delete window.location; - window.location = { - reload: jest.fn(), - } as unknown as Location; + Object.defineProperty(window, "location", { value: { reload: jest.fn() }, writable: true }); const platform = new WebPlatform(); expect(window.location.reload).not.toHaveBeenCalled(); @@ -73,10 +66,8 @@ describe("WebPlatform", () => { "develop.element.io: Chrome on macOS", ], ])("%s & %s = %s", (url, userAgent, result) => { - delete window.navigator; - window.navigator = { userAgent } as unknown as Navigator; - delete window.location; - window.location = { href: url } as unknown as Location; + Object.defineProperty(window, "navigator", { value: { userAgent }, writable: true }); + Object.defineProperty(window, "location", { value: { href: url }, writable: true }); const platform = new WebPlatform(); expect(platform.getDefaultDeviceDisplayName()).toEqual(result); }); @@ -88,14 +79,12 @@ describe("WebPlatform", () => { permission: "notGranted", }; beforeEach(() => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore window.Notification = mockNotification; mockNotification.permission = "notGranted"; }); it("supportsNotifications returns false when platform does not support notifications", () => { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore window.Notification = undefined; expect(new WebPlatform().supportsNotifications()).toBe(false); @@ -132,7 +121,8 @@ describe("WebPlatform", () => { }); afterAll(() => { - process.env.VERSION = envVersion; + // @ts-ignore + WebPlatform.VERSION = envVersion; }); it("should return true from canSelfUpdate()", async () => { @@ -142,18 +132,21 @@ describe("WebPlatform", () => { }); it("getAppVersion returns normalized app version", async () => { - process.env.VERSION = prodVersion; + // @ts-ignore + WebPlatform.VERSION = prodVersion; const platform = new WebPlatform(); const version = await platform.getAppVersion(); expect(version).toEqual(prodVersion); - process.env.VERSION = `v${prodVersion}`; + // @ts-ignore + WebPlatform.VERSION = `v${prodVersion}`; const version2 = await platform.getAppVersion(); // v prefix removed expect(version2).toEqual(prodVersion); - process.env.VERSION = `version not like semver`; + // @ts-ignore + WebPlatform.VERSION = `version not like semver`; const notSemverVersion = await platform.getAppVersion(); expect(notSemverVersion).toEqual(`version not like semver`); }); @@ -163,7 +156,8 @@ describe("WebPlatform", () => { "should return not available and call showNoUpdate when current version " + "matches most recent version", async () => { - process.env.VERSION = prodVersion; + // @ts-ignore + WebPlatform.VERSION = prodVersion; fetchMock.getOnce("/version", prodVersion); const platform = new WebPlatform(); @@ -178,7 +172,8 @@ describe("WebPlatform", () => { ); it("should strip v prefix from versions before comparing", async () => { - process.env.VERSION = prodVersion; + // @ts-ignore + WebPlatform.VERSION = prodVersion; fetchMock.getOnce("/version", `v${prodVersion}`); const platform = new WebPlatform(); @@ -195,7 +190,8 @@ describe("WebPlatform", () => { it( "should return ready and call showUpdate when current version " + "differs from most recent version", async () => { - process.env.VERSION = "0.0.0"; // old version + // @ts-ignore + WebPlatform.VERSION = "0.0.0"; // old version fetchMock.getOnce("/version", prodVersion); const platform = new WebPlatform(); @@ -210,7 +206,8 @@ describe("WebPlatform", () => { ); it("should return ready without showing update when user registered in last 24", async () => { - process.env.VERSION = "0.0.0"; // old version + // @ts-ignore + WebPlatform.VERSION = "0.0.0"; // old version jest.spyOn(MatrixClientPeg, "userRegisteredWithinLastHours").mockReturnValue(true); fetchMock.getOnce("/version", prodVersion); const platform = new WebPlatform(); diff --git a/test/unit-tests/vector/routing-test.ts b/test/unit-tests/vector/routing-test.ts index 28676a1c8..3b8df5302 100644 --- a/test/unit-tests/vector/routing-test.ts +++ b/test/unit-tests/vector/routing-test.ts @@ -18,24 +18,28 @@ import { onNewScreen } from "../../../src/vector/routing"; describe("onNewScreen", () => { it("should replace history if stripping via fields", () => { - delete window.location; - window.location = { - hash: "#/room/!room:server?via=abc", - replace: jest.fn(), - assign: jest.fn(), - } as unknown as Location; + Object.defineProperty(window, "location", { + value: { + hash: "#/room/!room:server?via=abc", + replace: jest.fn(), + assign: jest.fn(), + }, + writable: true, + }); onNewScreen("room/!room:server"); expect(window.location.assign).not.toHaveBeenCalled(); expect(window.location.replace).toHaveBeenCalled(); }); it("should not replace history if changing rooms", () => { - delete window.location; - window.location = { - hash: "#/room/!room1:server?via=abc", - replace: jest.fn(), - assign: jest.fn(), - } as unknown as Location; + Object.defineProperty(window, "location", { + value: { + hash: "#/room/!room1:server?via=abc", + replace: jest.fn(), + assign: jest.fn(), + }, + writable: true, + }); onNewScreen("room/!room2:server"); expect(window.location.assign).toHaveBeenCalled(); expect(window.location.replace).not.toHaveBeenCalled(); diff --git a/test/unit-tests/vector/url_utils-test.ts b/test/unit-tests/vector/url_utils-test.ts index 374b6c6d2..4b907de55 100644 --- a/test/unit-tests/vector/url_utils-test.ts +++ b/test/unit-tests/vector/url_utils-test.ts @@ -17,7 +17,6 @@ limitations under the License. import { parseQsFromFragment, parseQs } from "../../../src/vector/url_utils"; describe("url_utils.ts", function () { - // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const location: Location = { hash: "", diff --git a/yarn.lock b/yarn.lock index 2c25279fd..da364f632 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1544,9 +1544,9 @@ resolved "https://registry.yarnpkg.com/@matrix-org/matrix-wysiwyg/-/matrix-wysiwyg-2.0.0.tgz#913eb5faa5d43c7a4ee9bda68de1aa1dcc49a11d" integrity sha512-xRYFwsf6Jx7KTCpwU91mVhPA8q/c+oOVyK98NnexyK/IcQS7BMFAns5GZX9b6ZEy38u30KoxeN6mxvxi+ysQgg== -"@matrix-org/olm@https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.12.tgz": - version "3.2.12" - resolved "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.12.tgz#0bce3c86f9d36a4984d3c3e07df1c3fb4c679bd9" +"@matrix-org/olm@https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz": + version "3.2.14" + resolved "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz#acd96c00a881d0f462e1f97a56c73742c8dbc984" "@matrix-org/react-sdk-module-api@^0.0.4": version "0.0.4" @@ -2104,6 +2104,11 @@ expect "^29.0.0" pretty-format "^29.0.0" +"@types/jitsi-meet@^2.0.2": + version "2.0.2" + resolved "https://registry.yarnpkg.com/@types/jitsi-meet/-/jitsi-meet-2.0.2.tgz#4670e6dd47f2762cda5af53b73ab0a6e39ec0205" + integrity sha512-rnb5znCdZs7T2VgA16wyu5UHIbq+WR2HH233GPkS6HQ9m7Sh5jiXChZ41jo0tCTtNuSCziPIb5sI+6OPKK8h+Q== + "@types/jsdom@^20.0.0": version "20.0.1" resolved "https://registry.yarnpkg.com/@types/jsdom/-/jsdom-20.0.1.tgz#07c14bc19bd2f918c1929541cdaacae894744808" From 506a1b6dc7f33ff14b65dd4161157aded499ecce Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 25 Apr 2023 11:11:52 +0100 Subject: [PATCH 12/34] Reset matrix-js-sdk back to develop branch --- package.json | 2 +- yarn.lock | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 8ac983a24..ab7c689eb 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "gfm.css": "^1.1.2", "jsrsasign": "^10.5.25", "katex": "^0.16.0", - "matrix-js-sdk": "25.0.0", + "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", "matrix-react-sdk": "3.71.1", "matrix-widget-api": "^1.3.1", "react": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 05ee140b8..6941c48c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1539,6 +1539,11 @@ resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-js/-/matrix-sdk-crypto-js-0.1.0-alpha.6.tgz#c0bdb9ab0d30179b8ef744d1b4010b0ad0ab9c3a" integrity sha512-7hMffzw7KijxDyyH/eUyTfrLeCQHuyU3kaPOKGhcl3DZ3vx7bCncqjGMGTnxNPoP23I6gosvKSbO+3wYOT24Xg== +"@matrix-org/matrix-sdk-crypto-js@^0.1.0-alpha.7": + version "0.1.0-alpha.7" + resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-js/-/matrix-sdk-crypto-js-0.1.0-alpha.7.tgz#136375b84fd8a7e698f70fc969f668e541a61313" + integrity sha512-sQEG9cSfNji5NYBf5h7j5IxYVO0dwtAKoetaVyR+LhIXz/Su7zyEE3EwlAWAeJOFdAV/vZ5LTNyh39xADuNlTg== + "@matrix-org/matrix-wysiwyg@^2.0.0": version "2.0.0" resolved "https://registry.yarnpkg.com/@matrix-org/matrix-wysiwyg/-/matrix-wysiwyg-2.0.0.tgz#913eb5faa5d43c7a4ee9bda68de1aa1dcc49a11d" @@ -8216,6 +8221,23 @@ matrix-js-sdk@25.0.0: unhomoglyph "^1.0.6" uuid "9" +"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": + version "25.0.0" + resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/e3498f0668e30cd545cf0614e6e6e9203a9e359d" + dependencies: + "@babel/runtime" "^7.12.5" + "@matrix-org/matrix-sdk-crypto-js" "^0.1.0-alpha.7" + another-json "^0.2.0" + bs58 "^5.0.0" + content-type "^1.0.4" + loglevel "^1.7.1" + matrix-events-sdk "0.0.1" + matrix-widget-api "^1.3.1" + p-retry "4" + sdp-transform "^2.14.1" + unhomoglyph "^1.0.6" + uuid "9" + matrix-mock-request@^2.5.0: version "2.6.0" resolved "https://registry.yarnpkg.com/matrix-mock-request/-/matrix-mock-request-2.6.0.tgz#0855c10b250668ce542b697251087be2bcc23f92" From e558661a7784a30740f47df476d995a1c239eb5d Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 25 Apr 2023 11:12:06 +0100 Subject: [PATCH 13/34] Reset matrix-react-sdk back to develop branch --- package.json | 2 +- yarn.lock | 40 ++++++++-------------------------------- 2 files changed, 9 insertions(+), 33 deletions(-) diff --git a/package.json b/package.json index ab7c689eb..d81c6cbb2 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "jsrsasign": "^10.5.25", "katex": "^0.16.0", "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", - "matrix-react-sdk": "3.71.1", + "matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop", "matrix-widget-api": "^1.3.1", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 6941c48c3..e8265cbe4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1534,11 +1534,6 @@ resolved "https://registry.yarnpkg.com/@matrix-org/analytics-events/-/analytics-events-0.5.0.tgz#38b69c4e29d243944c5712cca7b674a3432056e6" integrity sha512-uL5kf7MqC+GxsGJtimPVbFliyaFinohTHSzohz31JTysktHsjRR2SC+vV7sy2/dstTWVdG9EGOnohyPsB+oi3A== -"@matrix-org/matrix-sdk-crypto-js@^0.1.0-alpha.6": - version "0.1.0-alpha.6" - resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-js/-/matrix-sdk-crypto-js-0.1.0-alpha.6.tgz#c0bdb9ab0d30179b8ef744d1b4010b0ad0ab9c3a" - integrity sha512-7hMffzw7KijxDyyH/eUyTfrLeCQHuyU3kaPOKGhcl3DZ3vx7bCncqjGMGTnxNPoP23I6gosvKSbO+3wYOT24Xg== - "@matrix-org/matrix-sdk-crypto-js@^0.1.0-alpha.7": version "0.1.0-alpha.7" resolved "https://registry.yarnpkg.com/@matrix-org/matrix-sdk-crypto-js/-/matrix-sdk-crypto-js-0.1.0-alpha.7.tgz#136375b84fd8a7e698f70fc969f668e541a61313" @@ -8203,24 +8198,6 @@ matrix-events-sdk@0.0.1: resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd" integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA== -matrix-js-sdk@25.0.0: - version "25.0.0" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-25.0.0.tgz#a46ecb62eb96d5e93e36bf3f318ba4b4a08d56bf" - integrity sha512-eI9v0JkIYrSfsjUVk6PeZrsR7c7Qh0tirsK2biMZ4jPQo9sx/iuBjlfAEPoVlwzQKTfakGryhit15FfPhucMnw== - dependencies: - "@babel/runtime" "^7.12.5" - "@matrix-org/matrix-sdk-crypto-js" "^0.1.0-alpha.6" - another-json "^0.2.0" - bs58 "^5.0.0" - content-type "^1.0.4" - loglevel "^1.7.1" - matrix-events-sdk "0.0.1" - matrix-widget-api "^1.3.1" - p-retry "4" - sdp-transform "^2.14.1" - unhomoglyph "^1.0.6" - uuid "9" - "matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": version "25.0.0" resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/e3498f0668e30cd545cf0614e6e6e9203a9e359d" @@ -8245,10 +8222,9 @@ matrix-mock-request@^2.5.0: dependencies: expect "^28.1.0" -matrix-react-sdk@3.71.1: +"matrix-react-sdk@github:matrix-org/matrix-react-sdk#develop": version "3.71.1" - resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.71.1.tgz#136bfbeb04b1e8d0f52eacbd083a723ac5d3980b" - integrity sha512-PddQ0f5XW2oWi6wBnoKMi1H+HOSa1bARW2VlyvynUyjyRPCbCuFoaHj6/lPvo5hV0jKpe1QWOSPM9QPeTLovww== + resolved "https://codeload.github.com/matrix-org/matrix-react-sdk/tar.gz/621fdf13138edc8613b7afb9d44429dc9c72cd53" dependencies: "@babel/runtime" "^7.12.5" "@matrix-org/analytics-events" "^0.5.0" @@ -8287,14 +8263,14 @@ matrix-react-sdk@3.71.1: maplibre-gl "^2.0.0" matrix-encrypt-attachment "^1.0.3" matrix-events-sdk "0.0.1" - matrix-js-sdk "25.0.0" + matrix-js-sdk "github:matrix-org/matrix-js-sdk#develop" matrix-widget-api "^1.3.1" minimist "^1.2.5" opus-recorder "^8.0.3" pako "^2.0.3" parse5 "^6.0.1" png-chunks-extract "^1.0.0" - posthog-js "1.51.5" + posthog-js "1.53.2" qrcode "1.5.1" re-resizable "^6.9.0" react "17.0.2" @@ -10150,10 +10126,10 @@ postcss@^8.2.1, postcss@^8.3.11, postcss@^8.4.16, postcss@^8.4.21: picocolors "^1.0.0" source-map-js "^1.0.2" -posthog-js@1.51.5: - version "1.51.5" - resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.51.5.tgz#23f11f5e75690312301d596b6f1f795e5b423eb9" - integrity sha512-hhOreF51vvg97iKFZ4GFF4lwQVq1WWJXOJ59NbQVsXj+bVxDcX4vog0Yx40rfp4uWNnE/xRWQQEOwlKM2WkcjQ== +posthog-js@1.53.2: + version "1.53.2" + resolved "https://registry.yarnpkg.com/posthog-js/-/posthog-js-1.53.2.tgz#ea185f23d36e5fa0543b6e43a2df12cca4b9131e" + integrity sha512-/vSGeDEWNX8ZVvXu4DA+tdZXcc8gHjZl8Tb5cU97KXngQCOumsSimJTBeG/PI8X8R/mRWBbOmnllo72YWTrl1g== dependencies: fflate "^0.4.1" rrweb-snapshot "^1.1.14" From 3eddc939ceef93f4ba72911c93f6c897ad0206bf Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 26 Apr 2023 11:12:57 +0100 Subject: [PATCH 14/34] s/unset/reset/ --- src/vector/init.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vector/init.tsx b/src/vector/init.tsx index a255c7d7f..70518a770 100644 --- a/src/vector/init.tsx +++ b/src/vector/init.tsx @@ -71,7 +71,7 @@ export async function loadConfig(): Promise { if (platformConfig) { SdkConfig.put(platformConfig); } else { - SdkConfig.unset(); // clears the config (sets to empty object) + SdkConfig.reset(); } } From 1709b3e9bab863fd29dbceaf6388c67d355a1784 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 26 Apr 2023 12:41:42 +0000 Subject: [PATCH 15/34] Update docker/metadata-action digest to c4ee3ad (#25136) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Janne Mareike Koschinski --- .github/workflows/dockerhub.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dockerhub.yaml b/.github/workflows/dockerhub.yaml index d1804596c..04d0c6dd7 100644 --- a/.github/workflows/dockerhub.yaml +++ b/.github/workflows/dockerhub.yaml @@ -33,7 +33,7 @@ jobs: - name: Docker meta id: meta - uses: docker/metadata-action@507c2f2dc502c992ad446e3d7a5dfbe311567a96 # v4 + uses: docker/metadata-action@c4ee3adeed93b1fa6a762f209fb01608c1a22f1e # v4 with: images: | vectorim/element-web From 59b62854585691a734bee5281e2591b4d81092f4 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 26 Apr 2023 12:41:55 +0000 Subject: [PATCH 16/34] Update typescript-eslint monorepo to v5.59.0 (#25141) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Janne Mareike Koschinski --- yarn.lock | 92 +++++++++++++++++++++++++++---------------------------- 1 file changed, 46 insertions(+), 46 deletions(-) diff --git a/yarn.lock b/yarn.lock index e8265cbe4..767780a36 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2316,14 +2316,14 @@ "@types/yargs-parser" "*" "@typescript-eslint/eslint-plugin@^5.45.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.58.0.tgz#b1d4b0ad20243269d020ef9bbb036a40b0849829" - integrity sha512-vxHvLhH0qgBd3/tW6/VccptSfc8FxPQIkmNTVLWcCOVqSBvqpnKkBTYrhcGlXfSnd78azwe+PsjYFj0X34/njA== + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.0.tgz#c0e10eeb936debe5d1c3433cf36206a95befefd0" + integrity sha512-p0QgrEyrxAWBecR56gyn3wkG15TJdI//eetInP3zYRewDh0XS+DhB3VUAd3QqvziFsfaQIoIuZMxZRB7vXYaYw== dependencies: "@eslint-community/regexpp" "^4.4.0" - "@typescript-eslint/scope-manager" "5.58.0" - "@typescript-eslint/type-utils" "5.58.0" - "@typescript-eslint/utils" "5.58.0" + "@typescript-eslint/scope-manager" "5.59.0" + "@typescript-eslint/type-utils" "5.59.0" + "@typescript-eslint/utils" "5.59.0" debug "^4.3.4" grapheme-splitter "^1.0.4" ignore "^5.2.0" @@ -2332,71 +2332,71 @@ tsutils "^3.21.0" "@typescript-eslint/parser@^5.45.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.58.0.tgz#2ac4464cf48bef2e3234cb178ede5af352dddbc6" - integrity sha512-ixaM3gRtlfrKzP8N6lRhBbjTow1t6ztfBvQNGuRM8qH1bjFFXIJ35XY+FC0RRBKn3C6cT+7VW1y8tNm7DwPHDQ== + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.59.0.tgz#0ad7cd019346cc5d150363f64869eca10ca9977c" + integrity sha512-qK9TZ70eJtjojSUMrrEwA9ZDQ4N0e/AuoOIgXuNBorXYcBDk397D2r5MIe1B3cok/oCtdNC5j+lUUpVB+Dpb+w== dependencies: - "@typescript-eslint/scope-manager" "5.58.0" - "@typescript-eslint/types" "5.58.0" - "@typescript-eslint/typescript-estree" "5.58.0" + "@typescript-eslint/scope-manager" "5.59.0" + "@typescript-eslint/types" "5.59.0" + "@typescript-eslint/typescript-estree" "5.59.0" debug "^4.3.4" -"@typescript-eslint/scope-manager@5.58.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.58.0.tgz#5e023a48352afc6a87be6ce3c8e763bc9e2f0bc8" - integrity sha512-b+w8ypN5CFvrXWQb9Ow9T4/6LC2MikNf1viLkYTiTbkQl46CnR69w7lajz1icW0TBsYmlpg+mRzFJ4LEJ8X9NA== +"@typescript-eslint/scope-manager@5.59.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.59.0.tgz#86501d7a17885710b6716a23be2e93fc54a4fe8c" + integrity sha512-tsoldKaMh7izN6BvkK6zRMINj4Z2d6gGhO2UsI8zGZY3XhLq1DndP3Ycjhi1JwdwPRwtLMW4EFPgpuKhbCGOvQ== dependencies: - "@typescript-eslint/types" "5.58.0" - "@typescript-eslint/visitor-keys" "5.58.0" + "@typescript-eslint/types" "5.59.0" + "@typescript-eslint/visitor-keys" "5.59.0" -"@typescript-eslint/type-utils@5.58.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.58.0.tgz#f7d5b3971483d4015a470d8a9e5b8a7d10066e52" - integrity sha512-FF5vP/SKAFJ+LmR9PENql7fQVVgGDOS+dq3j+cKl9iW/9VuZC/8CFmzIP0DLKXfWKpRHawJiG70rVH+xZZbp8w== +"@typescript-eslint/type-utils@5.59.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.59.0.tgz#8e8d1420fc2265989fa3a0d897bde37f3851e8c9" + integrity sha512-d/B6VSWnZwu70kcKQSCqjcXpVH+7ABKH8P1KNn4K7j5PXXuycZTPXF44Nui0TEm6rbWGi8kc78xRgOC4n7xFgA== dependencies: - "@typescript-eslint/typescript-estree" "5.58.0" - "@typescript-eslint/utils" "5.58.0" + "@typescript-eslint/typescript-estree" "5.59.0" + "@typescript-eslint/utils" "5.59.0" debug "^4.3.4" tsutils "^3.21.0" -"@typescript-eslint/types@5.58.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.58.0.tgz#54c490b8522c18986004df7674c644ffe2ed77d8" - integrity sha512-JYV4eITHPzVQMnHZcYJXl2ZloC7thuUHrcUmxtzvItyKPvQ50kb9QXBkgNAt90OYMqwaodQh2kHutWZl1fc+1g== +"@typescript-eslint/types@5.59.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.59.0.tgz#3fcdac7dbf923ec5251545acdd9f1d42d7c4fe32" + integrity sha512-yR2h1NotF23xFFYKHZs17QJnB51J/s+ud4PYU4MqdZbzeNxpgUr05+dNeCN/bb6raslHvGdd6BFCkVhpPk/ZeA== -"@typescript-eslint/typescript-estree@5.58.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.58.0.tgz#4966e6ff57eaf6e0fce2586497edc097e2ab3e61" - integrity sha512-cRACvGTodA+UxnYM2uwA2KCwRL7VAzo45syNysqlMyNyjw0Z35Icc9ihPJZjIYuA5bXJYiJ2YGUB59BqlOZT1Q== +"@typescript-eslint/typescript-estree@5.59.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.0.tgz#8869156ee1dcfc5a95be3ed0e2809969ea28e965" + integrity sha512-sUNnktjmI8DyGzPdZ8dRwW741zopGxltGs/SAPgGL/AAgDpiLsCFLcMNSpbfXfmnNeHmK9h3wGmCkGRGAoUZAg== dependencies: - "@typescript-eslint/types" "5.58.0" - "@typescript-eslint/visitor-keys" "5.58.0" + "@typescript-eslint/types" "5.59.0" + "@typescript-eslint/visitor-keys" "5.59.0" debug "^4.3.4" globby "^11.1.0" is-glob "^4.0.3" semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.58.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.58.0.tgz#430d7c95f23ec457b05be5520c1700a0dfd559d5" - integrity sha512-gAmLOTFXMXOC+zP1fsqm3VceKSBQJNzV385Ok3+yzlavNHZoedajjS4UyS21gabJYcobuigQPs/z71A9MdJFqQ== +"@typescript-eslint/utils@5.59.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.59.0.tgz#063d066b3bc4850c18872649ed0da9ee72d833d5" + integrity sha512-GGLFd+86drlHSvPgN/el6dRQNYYGOvRSDVydsUaQluwIW3HvbXuxyuD5JETvBt/9qGYe+lOrDk6gRrWOHb/FvA== dependencies: "@eslint-community/eslint-utils" "^4.2.0" "@types/json-schema" "^7.0.9" "@types/semver" "^7.3.12" - "@typescript-eslint/scope-manager" "5.58.0" - "@typescript-eslint/types" "5.58.0" - "@typescript-eslint/typescript-estree" "5.58.0" + "@typescript-eslint/scope-manager" "5.59.0" + "@typescript-eslint/types" "5.59.0" + "@typescript-eslint/typescript-estree" "5.59.0" eslint-scope "^5.1.1" semver "^7.3.7" -"@typescript-eslint/visitor-keys@5.58.0": - version "5.58.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.58.0.tgz#eb9de3a61d2331829e6761ce7fd13061781168b4" - integrity sha512-/fBraTlPj0jwdyTwLyrRTxv/3lnU2H96pNTVM6z3esTWLtA5MZ9ghSMJ7Rb+TtUAdtEw9EyJzJ0EydIMKxQ9gA== +"@typescript-eslint/visitor-keys@5.59.0": + version "5.59.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.0.tgz#a59913f2bf0baeb61b5cfcb6135d3926c3854365" + integrity sha512-qZ3iXxQhanchCeaExlKPV3gDQFxMUmU35xfd5eCXB6+kUw1TUAbIy2n7QIrwz9s98DQLzNWyHp61fY0da4ZcbA== dependencies: - "@typescript-eslint/types" "5.58.0" + "@typescript-eslint/types" "5.59.0" eslint-visitor-keys "^3.3.0" "@webassemblyjs/ast@1.9.0": From afab95288ecea8c81e439fd7c9db4dfcbad515cb Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Wed, 26 Apr 2023 14:49:35 +0100 Subject: [PATCH 17/34] Improve Content-Security-Policy (#25210) --- src/vector/index.html | 2 +- webpack.config.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vector/index.html b/src/vector/index.html index e416ef281..89512ab36 100644 --- a/src/vector/index.html +++ b/src/vector/index.html @@ -26,7 +26,7 @@ Date: Wed, 26 Apr 2023 19:16:50 +0100 Subject: [PATCH 18/34] Update issue automation (#25209) Move from using GraphQL to actions Remove automation for Delight, voice messages, polls, WTFs and FTUEs --- .github/workflows/triage-assigned.yml | 19 +- .github/workflows/triage-labelled.yml | 243 +++----------------------- 2 files changed, 27 insertions(+), 235 deletions(-) diff --git a/.github/workflows/triage-assigned.yml b/.github/workflows/triage-assigned.yml index d2802c2eb..07fa9870d 100644 --- a/.github/workflows/triage-assigned.yml +++ b/.github/workflows/triage-assigned.yml @@ -12,20 +12,7 @@ jobs: contains(github.event.issue.assignees.*.login, 'andybalaam') || contains(github.event.issue.assignees.*.login, 'justjanne') steps: - - uses: octokit/graphql-action@v2.x - id: add_to_project + - uses: actions/add-to-project@main with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc4AKjJS" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + project-url: https://github.com/orgs/vector-im/projects/67 + github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} diff --git a/.github/workflows/triage-labelled.yml b/.github/workflows/triage-labelled.yml index 43422efab..c433d1e87 100644 --- a/.github/workflows/triage-labelled.yml +++ b/.github/workflows/triage-labelled.yml @@ -72,23 +72,10 @@ jobs: contains(github.event.issue.labels.*.name, 'O-Frequent') || contains(github.event.issue.labels.*.name, 'A11y')) steps: - - uses: octokit/graphql-action@v2.x - id: add_to_project + - uses: actions/add-to-project@main with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc0sUA" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + project-url: https://github.com/orgs/vector-im/projects/18 + github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} add_product_issues: name: X-Needs-Product to product project board @@ -96,23 +83,10 @@ jobs: if: > contains(github.event.issue.labels.*.name, 'X-Needs-Product') steps: - - uses: octokit/graphql-action@v2.x - id: add_to_project + - uses: actions/add-to-project@main with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc4AAg6N" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + project-url: https://github.com/orgs/vector-im/projects/28 + github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} Search_issues_to_board: name: Search issues to project board @@ -120,114 +94,10 @@ jobs: if: > contains(github.event.issue.labels.*.name, 'A-New-Search-Experience') steps: - - uses: octokit/graphql-action@v2.x + - uses: actions/add-to-project@main with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc4ADtaO" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} - - move_voice-message_issues: - name: A-Voice Messages to voice message board - runs-on: ubuntu-latest - if: > - contains(github.event.issue.labels.*.name, 'A-Voice Messages') - steps: - - uses: octokit/graphql-action@v2.x - with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc2KCw" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} - - move_message_bubbles_issues: - name: A-Message-Bubbles to Message bubbles board - runs-on: ubuntu-latest - if: > - contains(github.event.issue.labels.*.name, 'A-Message-Bubbles') - steps: - - uses: octokit/graphql-action@v2.x - with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc3m-g" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} - - move_ftue_issues: - name: Z-FTUE issues to the FTUE project board - runs-on: ubuntu-latest - if: > - contains(github.event.issue.labels.*.name, 'Z-FTUE') - steps: - - uses: octokit/graphql-action@v2.x - with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc4AAqVx" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} - - move_WTF_issues: - name: Z-WTF issues to the WTF project board - runs-on: ubuntu-latest - if: > - contains(github.event.issue.labels.*.name, 'Z-WTF') - steps: - - uses: octokit/graphql-action@v2.x - with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc4AArk0" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + project-url: https://github.com/orgs/vector-im/projects/48 + github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} ps_features1: name: Add labelled issues to PS features team 1 @@ -240,23 +110,10 @@ jobs: (contains(github.event.issue.labels.*.name, 'A-Session-Mgmt') && contains(github.event.issue.labels.*.name, 'A-User-Settings')) steps: - - uses: octokit/graphql-action@v2.x - id: add_to_project + - uses: actions/add-to-project@main with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc4AHJKF" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + project-url: https://github.com/orgs/vector-im/projects/56 + github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} ps_features2: name: Add labelled issues to PS features team 2 @@ -265,23 +122,10 @@ jobs: contains(github.event.issue.labels.*.name, 'A-DM-Start') || contains(github.event.issue.labels.*.name, 'A-Broadcast') steps: - - uses: octokit/graphql-action@v2.x - id: add_to_project + - uses: actions/add-to-project@main with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc4AHJKd" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + project-url: https://github.com/orgs/vector-im/projects/58 + github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} ps_features3: name: Add labelled issues to PS features team 3 @@ -289,23 +133,10 @@ jobs: if: > contains(github.event.issue.labels.*.name, 'A-Rich-Text-Editor') steps: - - uses: octokit/graphql-action@v2.x - id: add_to_project + - uses: actions/add-to-project@main with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc4AHJKW" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + project-url: https://github.com/orgs/vector-im/projects/57 + github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} voip: name: Add labelled issues to VoIP project board @@ -313,23 +144,10 @@ jobs: if: > contains(github.event.issue.labels.*.name, 'Team: VoIP') steps: - - uses: octokit/graphql-action@v2.x - id: add_to_project + - uses: actions/add-to-project@main with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc4ABMIk" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + project-url: https://github.com/orgs/vector-im/projects/41 + github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} verticals_feature: name: Add labelled issues to Verticals Feature project @@ -337,20 +155,7 @@ jobs: if: > contains(github.event.issue.labels.*.name, 'Team: Verticals Feature') steps: - - uses: octokit/graphql-action@v2.x - id: add_to_project + - uses: actions/add-to-project@main with: - headers: '{"GraphQL-Features": "projects_next_graphql"}' - query: | - mutation add_to_project($projectid:ID!,$contentid:ID!) { - addProjectV2ItemById(input: {projectId: $projectid contentId: $contentid}) { - item { - id - } - } - } - projectid: ${{ env.PROJECT_ID }} - contentid: ${{ github.event.issue.node_id }} - env: - PROJECT_ID: "PVT_kwDOAM0swc4AHJKW" - GITHUB_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }} + project-url: https://github.com/orgs/vector-im/projects/57 + github-token: ${{ secrets.ELEMENT_BOT_TOKEN }} From f5452fb09709d763118375e60d327f710d6188a3 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 27 Apr 2023 15:29:55 +0100 Subject: [PATCH 19/34] Delabs reaction message previews (#25109) --- docs/labs.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/docs/labs.md b/docs/labs.md index 87f99aba1..b02c98794 100644 --- a/docs/labs.md +++ b/docs/labs.md @@ -100,12 +100,6 @@ theme definition. For some sample themes, check out [aaronraimist/element-themes](https://github.com/aaronraimist/element-themes). -## Message preview tweaks - -To enable message previews in the left panel for reactions in all rooms, enable `feature_roomlist_preview_reactions_all`. - -To enable message previews for reactions in DMs only, enable `feature_roomlist_preview_reactions_dms`. This is ignored when it is enabled for all rooms. - ## Dehydrated devices (`feature_dehydration`) Allows users to receive encrypted messages by creating a device that is stored From ed15578eedfcbce6ea53a1c7a56d672c73d34ba5 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 28 Apr 2023 08:44:10 +0100 Subject: [PATCH 20/34] Enable ES2020 to match matrix-react-sdk (#25223) --- tsconfig.json | 2 +- tsconfig.module_system.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 4b25eb534..50b20450e 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -13,7 +13,7 @@ "outDir": "./lib", "declaration": true, "jsx": "react", - "lib": ["es2019", "dom", "dom.iterable"], + "lib": ["es2020", "dom", "dom.iterable"], "alwaysStrict": true, "strictBindCallApply": true, "noImplicitThis": true diff --git a/tsconfig.module_system.json b/tsconfig.module_system.json index e1776404f..df928f828 100644 --- a/tsconfig.module_system.json +++ b/tsconfig.module_system.json @@ -4,7 +4,7 @@ "jsx": "preserve", "declaration": false, "outDir": "./lib/module_system", - "lib": ["es2019"], + "lib": ["es2020"], "types": ["node"] }, "include": ["./module_system/**/*.ts"] From 6e8f76e93c6d92156a0d7e5c9c675b946148df02 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 28 Apr 2023 08:46:31 +0100 Subject: [PATCH 21/34] Document UIFeature.locationSharing to hide location sharing (#25219) --- docs/config.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/config.md b/docs/config.md index 7ebb84e8d..33ff9e4b5 100644 --- a/docs/config.md +++ b/docs/config.md @@ -508,6 +508,7 @@ Currently, the following UI feature flags are supported: timeline for recent messages. When false day dates will be used. - `UIFeature.BulkUnverifiedSessionsReminder` - Display popup reminders to verify or remove unverified sessions. Defaults to true. +- `UIFeature.locationSharing` - Whether or not location sharing menus will be shown. ## Undocumented / developer options From a722b71b6c6e3eeebfbf4237a201a8ccd7e6363c Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 28 Apr 2023 10:07:48 +0100 Subject: [PATCH 22/34] Remove unused property (#25213) --- test/app-tests/loading-test.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/test/app-tests/loading-test.tsx b/test/app-tests/loading-test.tsx index e5805e66e..abd6c3243 100644 --- a/test/app-tests/loading-test.tsx +++ b/test/app-tests/loading-test.tsx @@ -138,7 +138,6 @@ describe("loading:", function () { Date: Tue, 2 May 2023 12:22:43 +0200 Subject: [PATCH 23/34] Translations update from Weblate (#25251) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Translated using Weblate (Norwegian Bokmål) Currently translated at 96.6% (29 of 30 strings) Translation: Element Web/element-web Translate-URL: https://translate.element.io/projects/element-web/element-web/nb_NO/ * Translated using Weblate (Portuguese) Currently translated at 93.3% (28 of 30 strings) Translation: Element Web/element-web Translate-URL: https://translate.element.io/projects/element-web/element-web/pt/ --------- Co-authored-by: Thor Arne Johansen Co-authored-by: Pedro costa --- src/i18n/strings/nb_NO.json | 5 ++++- src/i18n/strings/pt.json | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/i18n/strings/nb_NO.json b/src/i18n/strings/nb_NO.json index 956416284..176922f05 100644 --- a/src/i18n/strings/nb_NO.json +++ b/src/i18n/strings/nb_NO.json @@ -25,5 +25,8 @@ "Please install Chrome, Firefox, or Safari for the best experience.": "Vennligst installer Chrome, Firefox, eller Safari for den beste opplevelsen.", "%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s bruker avanserte nettleserfunksjoner som ikke støttes av din nåværende nettleser.", "Open": "Åpne", - "Use %(brand)s on mobile": "Bruk %(brand)s på mobil" + "Use %(brand)s on mobile": "Bruk %(brand)s på mobil", + "Decentralised, encrypted chat & collaboration powered by $matrixLogo": "Desentralisert, kryptert chat & samhandling basert på $matrixLogo", + "%(appName)s: %(browserName)s on %(osName)s": "%(appName)s: %(browserName)s på %(osName)s", + "%(brand)s Desktop: %(platformName)s": "%(brand)s Desktop: %(platformName)s" } diff --git a/src/i18n/strings/pt.json b/src/i18n/strings/pt.json index b9ad18258..34d5a59ac 100644 --- a/src/i18n/strings/pt.json +++ b/src/i18n/strings/pt.json @@ -25,5 +25,6 @@ "Failed to start": "Erro ao iniciar", "%(brand)s uses advanced browser features which aren't supported by your current browser.": "%(brand)s utiliza funções avançadas que não são suportadas pelo teu atual browser.", "Your browser can't run %(brand)s": "O teu browser não consegue executar %(brand)s", - "Use %(brand)s on mobile": "Usar %(brand)s no telemóvel" + "Use %(brand)s on mobile": "Usar %(brand)s no telemóvel", + "Decentralised, encrypted chat & collaboration powered by $matrixLogo": "Chat descentralizado e encriptado & colaboração alimentada por $matrixLogo" } From 152923306f57d35cbc7028d270c524c32e5b1423 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 2 May 2023 11:43:41 +0100 Subject: [PATCH 24/34] Upgrade matrix-js-sdk to 25.1.0-rc.1 --- package.json | 2 +- yarn.lock | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d81c6cbb2..5e5f9c575 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "gfm.css": "^1.1.2", "jsrsasign": "^10.5.25", "katex": "^0.16.0", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", + "matrix-js-sdk": "25.1.0-rc.1", "matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop", "matrix-widget-api": "^1.3.1", "react": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 767780a36..9ab7b454e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8198,6 +8198,24 @@ matrix-events-sdk@0.0.1: resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd" integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA== +matrix-js-sdk@25.1.0-rc.1: + version "25.1.0-rc.1" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-25.1.0-rc.1.tgz#886d43fad66e14bf0d62e812f042def68e7c830f" + integrity sha512-Eo+CdaSlD5/AbY6WgG+tIgRODm7kPbutlAcOV4plEsELBo9rMSoR+3gZkTptoo7dgL+O+B6AqAPdLEhFgg3wvw== + dependencies: + "@babel/runtime" "^7.12.5" + "@matrix-org/matrix-sdk-crypto-js" "^0.1.0-alpha.7" + another-json "^0.2.0" + bs58 "^5.0.0" + content-type "^1.0.4" + loglevel "^1.7.1" + matrix-events-sdk "0.0.1" + matrix-widget-api "^1.3.1" + p-retry "4" + sdp-transform "^2.14.1" + unhomoglyph "^1.0.6" + uuid "9" + "matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": version "25.0.0" resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/e3498f0668e30cd545cf0614e6e6e9203a9e359d" From 15ef05791fd8ed0f69e47ccc9515872a3d290c07 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 2 May 2023 11:44:06 +0100 Subject: [PATCH 25/34] Upgrade matrix-react-sdk to 3.72.0-rc.1 --- package.json | 2 +- yarn.lock | 43 +++++++++++++++++++++---------------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/package.json b/package.json index 5e5f9c575..cdddc3026 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "jsrsasign": "^10.5.25", "katex": "^0.16.0", "matrix-js-sdk": "25.1.0-rc.1", - "matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop", + "matrix-react-sdk": "3.72.0-rc.1", "matrix-widget-api": "^1.3.1", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 9ab7b454e..5ad5e259e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3116,6 +3116,11 @@ before-after-hook@^2.2.0: resolved "https://registry.yarnpkg.com/before-after-hook/-/before-after-hook-2.2.3.tgz#c51e809c81a4e354084422b9b26bad88249c517c" integrity sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ== +big-integer@^1.6.48: + version "1.6.51" + resolved "https://registry.yarnpkg.com/big-integer/-/big-integer-1.6.51.tgz#0df92a5d9880560d3ff2d5fd20245c889d130686" + integrity sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg== + big.js@^5.2.2: version "5.2.2" resolved "https://registry.yarnpkg.com/big.js/-/big.js-5.2.2.tgz#65f0af382f578bcdc742bd9c281e9cb2d7768328" @@ -4944,7 +4949,7 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" -es-abstract@^1.17.2, es-abstract@^1.19.0, es-abstract@^1.20.4: +es-abstract@^1.17.2, es-abstract@^1.18.3, es-abstract@^1.19.0, es-abstract@^1.20.4: version "1.21.2" resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.21.2.tgz#a56b9695322c8a185dc25975aa3b8ec31d0e7eff" integrity sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg== @@ -8216,23 +8221,6 @@ matrix-js-sdk@25.1.0-rc.1: unhomoglyph "^1.0.6" uuid "9" -"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": - version "25.0.0" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/e3498f0668e30cd545cf0614e6e6e9203a9e359d" - dependencies: - "@babel/runtime" "^7.12.5" - "@matrix-org/matrix-sdk-crypto-js" "^0.1.0-alpha.7" - another-json "^0.2.0" - bs58 "^5.0.0" - content-type "^1.0.4" - loglevel "^1.7.1" - matrix-events-sdk "0.0.1" - matrix-widget-api "^1.3.1" - p-retry "4" - sdp-transform "^2.14.1" - unhomoglyph "^1.0.6" - uuid "9" - matrix-mock-request@^2.5.0: version "2.6.0" resolved "https://registry.yarnpkg.com/matrix-mock-request/-/matrix-mock-request-2.6.0.tgz#0855c10b250668ce542b697251087be2bcc23f92" @@ -8240,9 +8228,10 @@ matrix-mock-request@^2.5.0: dependencies: expect "^28.1.0" -"matrix-react-sdk@github:matrix-org/matrix-react-sdk#develop": - version "3.71.1" - resolved "https://codeload.github.com/matrix-org/matrix-react-sdk/tar.gz/621fdf13138edc8613b7afb9d44429dc9c72cd53" +matrix-react-sdk@3.72.0-rc.1: + version "3.72.0-rc.1" + resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.72.0-rc.1.tgz#cb673326e936a9e5bce503524a77db4dd7d8b94f" + integrity sha512-urxrfXeuXwBKo+QpggRIVqxRl6X1HuzJg8aX+0z977lQn3CiJLFz35U6DDz+N88YiHkPF2s06umd2cdxnxctGQ== dependencies: "@babel/runtime" "^7.12.5" "@matrix-org/analytics-events" "^0.5.0" @@ -8281,14 +8270,16 @@ matrix-mock-request@^2.5.0: maplibre-gl "^2.0.0" matrix-encrypt-attachment "^1.0.3" matrix-events-sdk "0.0.1" - matrix-js-sdk "github:matrix-org/matrix-js-sdk#develop" + matrix-js-sdk "25.1.0-rc.1" matrix-widget-api "^1.3.1" + memoize-one "^5.1.1" minimist "^1.2.5" opus-recorder "^8.0.3" pako "^2.0.3" parse5 "^6.0.1" png-chunks-extract "^1.0.0" posthog-js "1.53.2" + proposal-temporal "^0.9.0" qrcode "1.5.1" re-resizable "^6.9.0" react "17.0.2" @@ -10250,6 +10241,14 @@ prop-types@^15.6.2, prop-types@^15.7.2, prop-types@^15.8.1: object-assign "^4.1.1" react-is "^16.13.1" +proposal-temporal@^0.9.0: + version "0.9.0" + resolved "https://registry.yarnpkg.com/proposal-temporal/-/proposal-temporal-0.9.0.tgz#4841cf83cf270f85a829e9283843ea8796d3d86f" + integrity sha512-AyNg3NmmBDCDbABQDmsnsY1B8VciwO9wZm+C3rClAgkPre+SpZDcIGje0WLZwroyqUFDySqW7VV6vcvAv8Bi+Q== + dependencies: + big-integer "^1.6.48" + es-abstract "^1.18.3" + protocol-buffers-schema@^3.3.1: version "3.6.0" resolved "https://registry.yarnpkg.com/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz#77bc75a48b2ff142c1ad5b5b90c94cd0fa2efd03" From 0ae3cfdcdd10f54c8b86caa1d427dd58489e72c0 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 2 May 2023 11:45:48 +0100 Subject: [PATCH 26/34] Prepare changelog for v1.11.31-rc.1 --- CHANGELOG.md | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 22451926c..ec01f2372 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,41 @@ +Changes in [1.11.31-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.11.31-rc.1) (2023-05-02) +=========================================================================================================== + +## ✨ Features + * Improve Content-Security-Policy ([\#25210](https://github.com/vector-im/element-web/pull/25210)). + * Add UIFeature.locationSharing to hide location sharing ([\#10727](https://github.com/matrix-org/matrix-react-sdk/pull/10727)). + * Memoize field validation results ([\#10714](https://github.com/matrix-org/matrix-react-sdk/pull/10714)). + * Commands for plain text editor ([\#10567](https://github.com/matrix-org/matrix-react-sdk/pull/10567)). Contributed by @alunturner. + * Allow 16 lines of text in the rich text editors ([\#10670](https://github.com/matrix-org/matrix-react-sdk/pull/10670)). Contributed by @alunturner. + * Bail out of `RoomSettingsDialog` when room is not found ([\#10662](https://github.com/matrix-org/matrix-react-sdk/pull/10662)). Contributed by @kerryarchibald. + * Element-R: Populate device list for right-panel ([\#10671](https://github.com/matrix-org/matrix-react-sdk/pull/10671)). Contributed by @florianduros. + * Make existing and new issue URLs configurable ([\#10710](https://github.com/matrix-org/matrix-react-sdk/pull/10710)). Fixes #24424. + * Fix usages of ARIA tabpanel ([\#10628](https://github.com/matrix-org/matrix-react-sdk/pull/10628)). Fixes #25016. + * Element-R: Starting a DMs with a user ([\#10673](https://github.com/matrix-org/matrix-react-sdk/pull/10673)). Contributed by @florianduros. + * ARIA Accessibility improvements ([\#10675](https://github.com/matrix-org/matrix-react-sdk/pull/10675)). + * ARIA Accessibility improvements ([\#10674](https://github.com/matrix-org/matrix-react-sdk/pull/10674)). + * Add arrow key controls to emoji and reaction pickers ([\#10637](https://github.com/matrix-org/matrix-react-sdk/pull/10637)). Fixes #17189. + * Translate credits in help about section ([\#10676](https://github.com/matrix-org/matrix-react-sdk/pull/10676)). + +## 🐛 Bug Fixes + * Fix autocomplete not resetting properly on message send ([\#10741](https://github.com/matrix-org/matrix-react-sdk/pull/10741)). Fixes #25170. + * Fix start_sso not working with guests disabled ([\#10720](https://github.com/matrix-org/matrix-react-sdk/pull/10720)). Fixes #16624. + * Fix soft crash with Element call widgets ([\#10684](https://github.com/matrix-org/matrix-react-sdk/pull/10684)). + * Send correct receipt when marking a room as read ([\#10730](https://github.com/matrix-org/matrix-react-sdk/pull/10730)). Fixes #25207. + * Offload some more waveform processing onto a worker ([\#9223](https://github.com/matrix-org/matrix-react-sdk/pull/9223)). Fixes #19756. + * Consolidate login errors ([\#10722](https://github.com/matrix-org/matrix-react-sdk/pull/10722)). Fixes #17520. + * Fix all rooms search generating permalinks to wrong room id ([\#10625](https://github.com/matrix-org/matrix-react-sdk/pull/10625)). Fixes #25115. + * Posthog properly handle Analytics ID changing from under us ([\#10702](https://github.com/matrix-org/matrix-react-sdk/pull/10702)). Fixes #25187. + * Fix Clock being read as an absolute time rather than duration ([\#10706](https://github.com/matrix-org/matrix-react-sdk/pull/10706)). Fixes #22582. + * Properly translate errors in `ChangePassword.tsx` so they show up translated to the user but not in our logs ([\#10615](https://github.com/matrix-org/matrix-react-sdk/pull/10615)). Fixes #9597. Contributed by @MadLittleMods. + * Honour feature toggles in guest mode ([\#10651](https://github.com/matrix-org/matrix-react-sdk/pull/10651)). Fixes #24513. Contributed by @andybalaam. + * Fix default content in devtools event sender ([\#10699](https://github.com/matrix-org/matrix-react-sdk/pull/10699)). Contributed by @tulir. + * Fix a crash when a call ends while you're in it ([\#10681](https://github.com/matrix-org/matrix-react-sdk/pull/10681)). Fixes #25153. + * Fix lack of screen reader indication when triggering auto complete ([\#10664](https://github.com/matrix-org/matrix-react-sdk/pull/10664)). Fixes #11011. + * Fix typing tile duplicating users ([\#10678](https://github.com/matrix-org/matrix-react-sdk/pull/10678)). Fixes #25165. + * Fix wrong room topic tooltip position ([\#10667](https://github.com/matrix-org/matrix-react-sdk/pull/10667)). Fixes #25158. + * Fix create subspace dialog not working ([\#10652](https://github.com/matrix-org/matrix-react-sdk/pull/10652)). Fixes #24882. + Changes in [1.11.30](https://github.com/vector-im/element-web/releases/tag/v1.11.30) (2023-04-25) ================================================================================================= From 71c491db62c2407f5d9410d1963a99707d4ef458 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Tue, 2 May 2023 11:45:49 +0100 Subject: [PATCH 27/34] v1.11.31-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cdddc3026..1463d46f3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "element-web", - "version": "1.11.30", + "version": "1.11.31-rc.1", "description": "A feature-rich client for Matrix.org", "author": "New Vector Ltd.", "repository": { From 17c65f1a0c6494dfeacbc1bc501e40bb7d600ee0 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Fri, 5 May 2023 15:26:18 +0100 Subject: [PATCH 28/34] Upgrade matrix-react-sdk to 3.72.0-rc.2 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1463d46f3..7743769a0 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "jsrsasign": "^10.5.25", "katex": "^0.16.0", "matrix-js-sdk": "25.1.0-rc.1", - "matrix-react-sdk": "3.72.0-rc.1", + "matrix-react-sdk": "3.72.0-rc.2", "matrix-widget-api": "^1.3.1", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 5ad5e259e..4386f5742 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8228,10 +8228,10 @@ matrix-mock-request@^2.5.0: dependencies: expect "^28.1.0" -matrix-react-sdk@3.72.0-rc.1: - version "3.72.0-rc.1" - resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.72.0-rc.1.tgz#cb673326e936a9e5bce503524a77db4dd7d8b94f" - integrity sha512-urxrfXeuXwBKo+QpggRIVqxRl6X1HuzJg8aX+0z977lQn3CiJLFz35U6DDz+N88YiHkPF2s06umd2cdxnxctGQ== +matrix-react-sdk@3.72.0-rc.2: + version "3.72.0-rc.2" + resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.72.0-rc.2.tgz#8408141f19f6e1d98cb00509103008f8fee0325e" + integrity sha512-kVcjpGE7s28F1woKnOkbgYA45qv/Q76V6LE4ZVa87OWoTdVcfnEqW7sPlp38srcZG5vA1LnqHeW7NGVt3D5FpQ== dependencies: "@babel/runtime" "^7.12.5" "@matrix-org/analytics-events" "^0.5.0" From 349f7ee27a84d95a6b53a1600e2b3c6bd0aeff6f Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Fri, 5 May 2023 15:27:48 +0100 Subject: [PATCH 29/34] Prepare changelog for v1.11.31-rc.2 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec01f2372..ae38e9a88 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Changes in [1.11.31-rc.2](https://github.com/vector-im/element-web/releases/tag/v1.11.31-rc.2) (2023-05-05) +=========================================================================================================== + +## 🐛 Bug Fixes + * Fix: reveal images when image previews are disabled ([\#10781](https://github.com/matrix-org/matrix-react-sdk/pull/10781)). Fixes #25271. Contributed by @kerryarchibald. + Changes in [1.11.31-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.11.31-rc.1) (2023-05-02) =========================================================================================================== From 9860f4befcf08ae76e5bc559bf144b70184ccda1 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Fri, 5 May 2023 15:27:49 +0100 Subject: [PATCH 30/34] v1.11.31-rc.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7743769a0..0b4bbde5f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "element-web", - "version": "1.11.31-rc.1", + "version": "1.11.31-rc.2", "description": "A feature-rich client for Matrix.org", "author": "New Vector Ltd.", "repository": { From 96cf7053bc060ba6965d71c1048888d1260a9525 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 10 May 2023 14:05:17 +0100 Subject: [PATCH 31/34] Upgrade matrix-js-sdk to 25.1.0 --- package.json | 2 +- yarn.lock | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index 0b4bbde5f..8bc82a098 100644 --- a/package.json +++ b/package.json @@ -73,7 +73,7 @@ "gfm.css": "^1.1.2", "jsrsasign": "^10.5.25", "katex": "^0.16.0", - "matrix-js-sdk": "25.1.0-rc.1", + "matrix-js-sdk": "25.1.0", "matrix-react-sdk": "3.72.0-rc.2", "matrix-widget-api": "^1.3.1", "react": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 4386f5742..902da50b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8203,6 +8203,24 @@ matrix-events-sdk@0.0.1: resolved "https://registry.yarnpkg.com/matrix-events-sdk/-/matrix-events-sdk-0.0.1.tgz#c8c38911e2cb29023b0bbac8d6f32e0de2c957dd" integrity sha512-1QEOsXO+bhyCroIe2/A5OwaxHvBm7EsSQ46DEDn8RBIfQwN5HWBpFvyWWR4QY0KHPPnnJdI99wgRiAl7Ad5qaA== +matrix-js-sdk@25.1.0: + version "25.1.0" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-25.1.0.tgz#86bfd96e70fab83dc131254dd9e9aaeb5cfafbc9" + integrity sha512-zVAg73FiFrFacS/q9hLnRaSPvg84VT/X70VIOigp2eOMUhot35UnNL99YUbfkksY95/UnvgrqJkyaZcm8lSspQ== + dependencies: + "@babel/runtime" "^7.12.5" + "@matrix-org/matrix-sdk-crypto-js" "^0.1.0-alpha.7" + another-json "^0.2.0" + bs58 "^5.0.0" + content-type "^1.0.4" + loglevel "^1.7.1" + matrix-events-sdk "0.0.1" + matrix-widget-api "^1.3.1" + p-retry "4" + sdp-transform "^2.14.1" + unhomoglyph "^1.0.6" + uuid "9" + matrix-js-sdk@25.1.0-rc.1: version "25.1.0-rc.1" resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-25.1.0-rc.1.tgz#886d43fad66e14bf0d62e812f042def68e7c830f" From 81397ffbf48cd66785164d4f53c8f935d2af3ba6 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 10 May 2023 14:06:03 +0100 Subject: [PATCH 32/34] Upgrade matrix-react-sdk to 3.72.0 --- package.json | 2 +- yarn.lock | 28 +++++----------------------- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index 8bc82a098..65e1628fc 100644 --- a/package.json +++ b/package.json @@ -74,7 +74,7 @@ "jsrsasign": "^10.5.25", "katex": "^0.16.0", "matrix-js-sdk": "25.1.0", - "matrix-react-sdk": "3.72.0-rc.2", + "matrix-react-sdk": "3.72.0", "matrix-widget-api": "^1.3.1", "react": "17.0.2", "react-dom": "17.0.2", diff --git a/yarn.lock b/yarn.lock index 902da50b1..6151f1bf9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8221,24 +8221,6 @@ matrix-js-sdk@25.1.0: unhomoglyph "^1.0.6" uuid "9" -matrix-js-sdk@25.1.0-rc.1: - version "25.1.0-rc.1" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-25.1.0-rc.1.tgz#886d43fad66e14bf0d62e812f042def68e7c830f" - integrity sha512-Eo+CdaSlD5/AbY6WgG+tIgRODm7kPbutlAcOV4plEsELBo9rMSoR+3gZkTptoo7dgL+O+B6AqAPdLEhFgg3wvw== - dependencies: - "@babel/runtime" "^7.12.5" - "@matrix-org/matrix-sdk-crypto-js" "^0.1.0-alpha.7" - another-json "^0.2.0" - bs58 "^5.0.0" - content-type "^1.0.4" - loglevel "^1.7.1" - matrix-events-sdk "0.0.1" - matrix-widget-api "^1.3.1" - p-retry "4" - sdp-transform "^2.14.1" - unhomoglyph "^1.0.6" - uuid "9" - matrix-mock-request@^2.5.0: version "2.6.0" resolved "https://registry.yarnpkg.com/matrix-mock-request/-/matrix-mock-request-2.6.0.tgz#0855c10b250668ce542b697251087be2bcc23f92" @@ -8246,10 +8228,10 @@ matrix-mock-request@^2.5.0: dependencies: expect "^28.1.0" -matrix-react-sdk@3.72.0-rc.2: - version "3.72.0-rc.2" - resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.72.0-rc.2.tgz#8408141f19f6e1d98cb00509103008f8fee0325e" - integrity sha512-kVcjpGE7s28F1woKnOkbgYA45qv/Q76V6LE4ZVa87OWoTdVcfnEqW7sPlp38srcZG5vA1LnqHeW7NGVt3D5FpQ== +matrix-react-sdk@3.72.0: + version "3.72.0" + resolved "https://registry.yarnpkg.com/matrix-react-sdk/-/matrix-react-sdk-3.72.0.tgz#e8e866540fcfe732b6cb1d696bd5c7f71ea73826" + integrity sha512-OLqVj+VbuEBgG9vuhrykgI3wnAYG0hR8vLzjRL7+DQhMN+1rWxwNeoY3zlLBKLVgpkSU5Kfo2mBuizf3PskITg== dependencies: "@babel/runtime" "^7.12.5" "@matrix-org/analytics-events" "^0.5.0" @@ -8288,7 +8270,7 @@ matrix-react-sdk@3.72.0-rc.2: maplibre-gl "^2.0.0" matrix-encrypt-attachment "^1.0.3" matrix-events-sdk "0.0.1" - matrix-js-sdk "25.1.0-rc.1" + matrix-js-sdk "25.1.0" matrix-widget-api "^1.3.1" memoize-one "^5.1.1" minimist "^1.2.5" From e902a0bd59d45032be1ed7cf938c249021519c84 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 10 May 2023 14:10:42 +0100 Subject: [PATCH 33/34] Prepare changelog for v1.11.31 --- CHANGELOG.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ae38e9a88..dd3396c29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,5 @@ -Changes in [1.11.31-rc.2](https://github.com/vector-im/element-web/releases/tag/v1.11.31-rc.2) (2023-05-05) -=========================================================================================================== - -## 🐛 Bug Fixes - * Fix: reveal images when image previews are disabled ([\#10781](https://github.com/matrix-org/matrix-react-sdk/pull/10781)). Fixes #25271. Contributed by @kerryarchibald. - -Changes in [1.11.31-rc.1](https://github.com/vector-im/element-web/releases/tag/v1.11.31-rc.1) (2023-05-02) -=========================================================================================================== +Changes in [1.11.31](https://github.com/vector-im/element-web/releases/tag/v1.11.31) (2023-05-10) +================================================================================================= ## ✨ Features * Improve Content-Security-Policy ([\#25210](https://github.com/vector-im/element-web/pull/25210)). @@ -24,6 +18,7 @@ Changes in [1.11.31-rc.1](https://github.com/vector-im/element-web/releases/tag/ * Translate credits in help about section ([\#10676](https://github.com/matrix-org/matrix-react-sdk/pull/10676)). ## 🐛 Bug Fixes + * Fix: reveal images when image previews are disabled ([\#10781](https://github.com/matrix-org/matrix-react-sdk/pull/10781)). Fixes #25271. Contributed by @kerryarchibald. * Fix autocomplete not resetting properly on message send ([\#10741](https://github.com/matrix-org/matrix-react-sdk/pull/10741)). Fixes #25170. * Fix start_sso not working with guests disabled ([\#10720](https://github.com/matrix-org/matrix-react-sdk/pull/10720)). Fixes #16624. * Fix soft crash with Element call widgets ([\#10684](https://github.com/matrix-org/matrix-react-sdk/pull/10684)). From df8f8415bfbe0294f11a4473eb66f5851ccd98db Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 10 May 2023 14:10:42 +0100 Subject: [PATCH 34/34] v1.11.31 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 65e1628fc..223106803 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "element-web", - "version": "1.11.31-rc.2", + "version": "1.11.31", "description": "A feature-rich client for Matrix.org", "author": "New Vector Ltd.", "repository": {