Skip to content

Commit 2dffadc

Browse files
authored
Merge branch 'develop' into dbkr/stateafter
2 parents f3d0fc4 + 48fd330 commit 2dffadc

File tree

337 files changed

+4399
-3407
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

337 files changed

+4399
-3407
lines changed

.eslintrc-module_system.js

-60
This file was deleted.

.eslintrc.js

+54-4
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@ module.exports = {
117117
"!matrix-js-sdk/src/extensible_events_v1/PollResponseEvent",
118118
"!matrix-js-sdk/src/extensible_events_v1/PollEndEvent",
119119
"!matrix-js-sdk/src/extensible_events_v1/InvalidEventError",
120-
"!matrix-js-sdk/src/crypto",
121-
"!matrix-js-sdk/src/crypto/keybackup",
122-
"!matrix-js-sdk/src/crypto/deviceinfo",
123-
"!matrix-js-sdk/src/crypto/dehydration",
124120
"!matrix-js-sdk/src/oidc",
125121
"!matrix-js-sdk/src/oidc/discovery",
126122
"!matrix-js-sdk/src/oidc/authorize",
@@ -270,6 +266,60 @@ module.exports = {
270266
"react-hooks/rules-of-hooks": ["off"],
271267
},
272268
},
269+
{
270+
files: ["module_system/**/*.{ts,tsx}"],
271+
parserOptions: {
272+
project: ["./tsconfig.module_system.json"],
273+
},
274+
extends: ["plugin:matrix-org/typescript", "plugin:matrix-org/react"],
275+
// NOTE: These rules are frozen and new rules should not be added here.
276+
// New changes belong in https://github.com/matrix-org/eslint-plugin-matrix-org/
277+
rules: {
278+
// Things we do that break the ideal style
279+
"prefer-promise-reject-errors": "off",
280+
"quotes": "off",
281+
282+
// We disable this while we're transitioning
283+
"@typescript-eslint/no-explicit-any": "off",
284+
// We're okay with assertion errors when we ask for them
285+
"@typescript-eslint/no-non-null-assertion": "off",
286+
287+
// Ban matrix-js-sdk/src imports in favour of matrix-js-sdk/src/matrix imports to prevent unleashing hell.
288+
"no-restricted-imports": [
289+
"error",
290+
{
291+
paths: [
292+
{
293+
name: "matrix-js-sdk",
294+
message: "Please use matrix-js-sdk/src/matrix instead",
295+
},
296+
{
297+
name: "matrix-js-sdk/",
298+
message: "Please use matrix-js-sdk/src/matrix instead",
299+
},
300+
{
301+
name: "matrix-js-sdk/src",
302+
message: "Please use matrix-js-sdk/src/matrix instead",
303+
},
304+
{
305+
name: "matrix-js-sdk/src/",
306+
message: "Please use matrix-js-sdk/src/matrix instead",
307+
},
308+
{
309+
name: "matrix-js-sdk/src/index",
310+
message: "Please use matrix-js-sdk/src/matrix instead",
311+
},
312+
],
313+
patterns: [
314+
{
315+
group: ["matrix-js-sdk/lib", "matrix-js-sdk/lib/", "matrix-js-sdk/lib/**"],
316+
message: "Please use matrix-js-sdk/src/* instead",
317+
},
318+
],
319+
},
320+
],
321+
},
322+
},
273323
],
274324
settings: {
275325
react: {

.github/workflows/dockerhub.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ jobs:
2121
fetch-depth: 0 # needed for docker-package to be able to calculate the version
2222

2323
- name: Install Cosign
24-
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3
24+
uses: sigstore/cosign-installer@dc72c7d5c4d10cd6bcb8cf6e3fd625a9e5e537da # v3
2525

2626
- name: Set up QEMU
2727
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
2828

2929
- name: Set up Docker Buildx
30-
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3
30+
uses: docker/setup-buildx-action@c47758b77c9736f4b2ef4073d4d51994fabfe349 # v3
3131
with:
3232
install: true
3333

.github/workflows/end-to-end-tests-netlify.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
report:
1616
if: github.event.workflow_run.conclusion != 'cancelled'
1717
name: Report results
18-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-24.04
1919
environment: Netlify
2020
permissions:
2121
statuses: write

.github/workflows/end-to-end-tests.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ env:
3636
jobs:
3737
build:
3838
name: "Build Element-Web"
39-
runs-on: ubuntu-22.04
39+
runs-on: ubuntu-24.04
4040
if: inputs.skip != true
4141
steps:
4242
- name: Checkout code
@@ -69,7 +69,6 @@ jobs:
6969
VERSION: "${{ steps.layered_build.outputs.VERSION }}"
7070
run: |
7171
yarn build
72-
echo $VERSION > webapp/version
7372
7473
- name: Upload Artifact
7574
uses: actions/upload-artifact@v4
@@ -144,7 +143,7 @@ jobs:
144143
name: end-to-end-tests
145144
needs: playwright
146145
if: always()
147-
runs-on: ubuntu-22.04
146+
runs-on: ubuntu-24.04
148147
steps:
149148
- uses: actions/checkout@v4
150149
if: inputs.skip != true

.github/workflows/netlify.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
jobs:
1010
deploy:
1111
if: github.event.workflow_run.conclusion != 'cancelled' && github.event.workflow_run.event == 'pull_request'
12-
runs-on: ubuntu-22.04
12+
runs-on: ubuntu-24.04
1313
environment: Netlify
1414
steps:
1515
- name: 📝 Create Deployment

.github/workflows/playwright-image-updates.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- cron: "0 6 * * *" # Every day at 6am UTC
66
jobs:
77
update:
8-
runs-on: ubuntu-22.04
8+
runs-on: ubuntu-24.04
99
steps:
1010
- uses: actions/checkout@v4
1111

.github/workflows/pull_request_base_branch.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
jobs:
66
check_base_branch:
77
name: Check PR base branch
8-
runs-on: ubuntu-22.04
8+
runs-on: ubuntu-24.04
99
steps:
1010
- uses: actions/github-script@v7
1111
with:

.github/workflows/static_analysis.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
5151
rethemendex_lint:
5252
name: "Rethemendex Check"
53-
runs-on: ubuntu-22.04
53+
runs-on: ubuntu-24.04
5454
steps:
5555
- uses: actions/checkout@v4
5656

@@ -123,6 +123,12 @@ jobs:
123123
cache: "yarn"
124124
node-version: "lts/*"
125125

126+
- name: Install Deps
127+
run: "yarn install --frozen-lockfile"
128+
129+
- name: Run linter
130+
run: "yarn run lint:knip"
131+
126132
- name: Install Deps
127133
run: "scripts/layered.sh"
128134

.github/workflows/tests.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ env:
2929
jobs:
3030
jest:
3131
name: Jest
32-
runs-on: ubuntu-22.04
32+
runs-on: ubuntu-24.04
3333
strategy:
3434
fail-fast: false
3535
matrix:
@@ -93,7 +93,7 @@ jobs:
9393
name: jest-tests
9494
needs: jest
9595
if: always()
96-
runs-on: ubuntu-22.04
96+
runs-on: ubuntu-24.04
9797
steps:
9898
- if: needs.jest.result != 'skipped' && needs.jest.result != 'success'
9999
run: exit 1

.lintstagedrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"*": "prettier --write",
33
"src/**/*.(ts|tsx)": ["eslint --fix"],
44
"scripts/**/*.(ts|tsx)": ["eslint --fix"],
5-
"module_system/**/*.(ts|tsx)": ["eslint --fix --config .eslintrc-module_system.js module_system"],
5+
"module_system/**/*.(ts|tsx)": ["eslint --fix"],
66
"*.pcss": ["stylelint --fix"]
77
}

.stylelintrc.js

+30-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = {
22
extends: ["stylelint-config-standard"],
3-
customSyntax: require("postcss-scss"),
4-
plugins: ["stylelint-scss"],
3+
customSyntax: "postcss-scss",
4+
plugins: ["stylelint-scss", "stylelint-value-no-unknown-custom-properties"],
55
rules: {
66
"comment-empty-line-before": null,
77
"declaration-empty-line-before": null,
@@ -46,5 +46,33 @@ module.exports = {
4646
"number-max-precision": null,
4747
"no-invalid-double-slash-comments": true,
4848
"media-feature-range-notation": null,
49+
"csstools/value-no-unknown-custom-properties": [
50+
true,
51+
{
52+
importFrom: [
53+
{ from: "res/css/_common.pcss", type: "css" },
54+
{ from: "res/themes/light/css/_light.pcss", type: "css" },
55+
// Right now our styles share vars all over the place, this is not ideal but acceptable for now
56+
{ from: "res/css/views/rooms/_EventTile.pcss", type: "css" },
57+
{ from: "res/css/views/rooms/_IRCLayout.pcss", type: "css" },
58+
{ from: "res/css/views/rooms/_EventBubbleTile.pcss", type: "css" },
59+
{ from: "res/css/views/rooms/_ReadReceiptGroup.pcss", type: "css" },
60+
{ from: "res/css/views/rooms/_EditMessageComposer.pcss", type: "css" },
61+
{ from: "res/css/views/right_panel/_BaseCard.pcss", type: "css" },
62+
{ from: "res/css/views/messages/_MessageTimestamp.pcss", type: "css" },
63+
{ from: "res/css/views/messages/_EventTileBubble.pcss", type: "css" },
64+
{ from: "res/css/views/messages/_MessageActionBar.pcss", type: "css" },
65+
{ from: "res/css/views/voip/LegacyCallView/_LegacyCallViewButtons.pcss", type: "css" },
66+
{ from: "res/css/views/elements/_ToggleSwitch.pcss", type: "css" },
67+
{ from: "res/css/views/settings/tabs/_SettingsTab.pcss", type: "css" },
68+
{ from: "res/css/structures/_RoomView.pcss", type: "css" },
69+
// Compound vars
70+
"node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-common-base.css",
71+
"node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-common-semantic.css",
72+
"node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-theme-light-base-mq.css",
73+
"node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-theme-light-semantic-mq.css",
74+
],
75+
},
76+
],
4977
},
5078
};

CHANGELOG.md

+28
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
1+
Changes in [1.11.86](https://github.com/element-hq/element-web/releases/tag/v1.11.86) (2024-11-19)
2+
==================================================================================================
3+
## ✨ Features
4+
5+
* Deduplicate icons using Compound Design Tokens ([#28419](https://github.com/element-hq/element-web/pull/28419)). Contributed by @t3chguy.
6+
* Let widget driver send error details ([#28357](https://github.com/element-hq/element-web/pull/28357)). Contributed by @AndrewFerr.
7+
* Deduplicate icons using Compound Design Tokens ([#28381](https://github.com/element-hq/element-web/pull/28381)). Contributed by @t3chguy.
8+
* Auto approvoce `io.element.call.reaction` capability for element call widgets ([#28401](https://github.com/element-hq/element-web/pull/28401)). Contributed by @toger5.
9+
* Show message type prefix in thread root \& reply previews ([#28361](https://github.com/element-hq/element-web/pull/28361)). Contributed by @t3chguy.
10+
* Support sending encrypted to device messages from widgets ([#28315](https://github.com/element-hq/element-web/pull/28315)). Contributed by @hughns.
11+
12+
## 🐛 Bug Fixes
13+
14+
* Feed events to widgets as they are decrypted (even if out of order) ([#28376](https://github.com/element-hq/element-web/pull/28376)). Contributed by @robintown.
15+
* Handle authenticated media when downloading from ImageView ([#28379](https://github.com/element-hq/element-web/pull/28379)). Contributed by @t3chguy.
16+
* Ignore `m.3pid_changes` for Identity service 3PID changes ([#28375](https://github.com/element-hq/element-web/pull/28375)). Contributed by @t3chguy.
17+
* Fix markdown escaping wrongly passing html through ([#28363](https://github.com/element-hq/element-web/pull/28363)). Contributed by @t3chguy.
18+
* Remove "Upgrade your encryption" flow in `CreateSecretStorageDialog` ([#28290](https://github.com/element-hq/element-web/pull/28290)). Contributed by @florianduros.
19+
20+
21+
Changes in [1.11.85](https://github.com/element-hq/element-web/releases/tag/v1.11.85) (2024-11-12)
22+
==================================================================================================
23+
# Security
24+
- Fixes for [CVE-2024-51750](https://www.cve.org/CVERecord?id=CVE-2024-51750) / [GHSA-w36j-v56h-q9pc](https://github.com/element-hq/element-web/security/advisories/GHSA-w36j-v56h-q9pc)
25+
- Fixes for [CVE-2024-51749](https://www.cve.org/CVERecord?id=CVE-2024-51749) / [GHSA-5486-384g-mcx2](https://github.com/element-hq/element-web/security/advisories/GHSA-5486-384g-mcx2)
26+
- Update JS SDK with the fixes for [CVE-2024-50336](https://www.cve.org/CVERecord?id=CVE-2024-50336) / [GHSA-xvg8-m4x3-w6xr](https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-xvg8-m4x3-w6xr)
27+
28+
129
Changes in [1.11.84](https://github.com/element-hq/element-web/releases/tag/v1.11.84) (2024-11-05)
230
==================================================================================================
331
## ✨ Features

jest.config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const config: Config = {
3838
"recorderWorkletFactory": "<rootDir>/__mocks__/empty.js",
3939
"^fetch-mock$": "<rootDir>/node_modules/fetch-mock",
4040
},
41-
transformIgnorePatterns: ["/node_modules/(?!matrix-js-sdk).+$"],
41+
transformIgnorePatterns: ["/node_modules/(?!(mime|matrix-js-sdk)).+$"],
4242
collectCoverageFrom: [
4343
"<rootDir>/src/**/*.{js,ts,tsx}",
4444
// getSessionLock is piped into a different JS context via stringification, and the coverage functionality is

knip.ts

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
import { KnipConfig } from "knip";
2+
3+
export default {
4+
entry: [
5+
"src/vector/index.ts",
6+
"src/serviceworker/index.ts",
7+
"src/workers/*.worker.ts",
8+
"src/utils/exportUtils/exportJS.js",
9+
"scripts/**",
10+
"playwright/**",
11+
"test/**",
12+
"res/decoder-ring/**",
13+
],
14+
project: ["**/*.{js,ts,jsx,tsx}"],
15+
ignore: [
16+
"docs/**",
17+
"res/jitsi_external_api.min.js",
18+
// Used by jest
19+
"__mocks__/maplibre-gl.js",
20+
// Keep for now
21+
"src/hooks/useLocalStorageState.ts",
22+
"src/components/views/elements/InfoTooltip.tsx",
23+
"src/components/views/elements/StyledCheckbox.tsx",
24+
],
25+
ignoreDependencies: [
26+
// Required for `action-validator`
27+
"@action-validator/*",
28+
// Used for git pre-commit hooks
29+
"husky",
30+
// Used by jest
31+
"babel-jest",
32+
// Used by babel
33+
"@babel/runtime",
34+
"@babel/plugin-transform-class-properties",
35+
// Referenced in PCSS
36+
"github-markdown-css",
37+
// False positive
38+
"sw.js",
39+
// Used by webpack
40+
"buffer",
41+
"process",
42+
"util",
43+
// Used by workflows
44+
"ts-prune",
45+
// Required due to bug in bloom-filters https://github.com/Callidon/bloom-filters/issues/75
46+
"@types/seedrandom",
47+
],
48+
ignoreBinaries: [
49+
// Used in scripts & workflows
50+
"jq",
51+
],
52+
ignoreExportsUsedInFile: true,
53+
} satisfies KnipConfig;

0 commit comments

Comments
 (0)