Skip to content

Commit 4a0c85d

Browse files
committed
Merge tag 'v1.11.36' into sc
* Fixes for [CVE-2023-37259](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-37259) / [GHSA-c9vx-2g7w-rp65](GHSA-c9vx-2g7w-rp65) * Deprecate customisations in favour of Module API ([\element-hq#25736](element-hq#25736)). Fixes element-hq#25733. * OIDC: store initial screen in session storage ([\element-hq#25688](element-hq#25688)). Fixes element-hq#25656. Contributed by @kerryarchibald. * Allow default_server_config as a fallback config ([\element-hq#25682](element-hq#25682)). Contributed by @ShadowRZ. * OIDC: remove auth params from url after login attempt ([\element-hq#25664](element-hq#25664)). Contributed by @kerryarchibald. * feat(faq): remove keyboard shortcuts button ([\element-hq#9342](matrix-org/matrix-react-sdk#9342)). Fixes element-hq#22625. Contributed by @gefgu. * GYU: Update banner ([\element-hq#11211](matrix-org/matrix-react-sdk#11211)). Fixes element-hq#25530. Contributed by @justjanne. * Linkify mxc:// URLs as links to your media repo ([\element-hq#11213](matrix-org/matrix-react-sdk#11213)). Fixes element-hq#6942. * OIDC: Log in ([\element-hq#11199](matrix-org/matrix-react-sdk#11199)). Fixes element-hq#25657. Contributed by @kerryarchibald. * Handle all permitted url schemes in linkify ([\element-hq#11215](matrix-org/matrix-react-sdk#11215)). Fixes element-hq#4457 and element-hq#8720. * Autoapprove Element Call oidc requests ([\element-hq#11209](matrix-org/matrix-react-sdk#11209)). Contributed by @toger5. * Allow creating knock rooms ([\#11182](matrix-org/matrix-react-sdk#11182)). Contributed by @charlynguyen. * Expose and pre-populate thread ID in devtools dialog ([\element-hq#10953](matrix-org/matrix-react-sdk#10953)). * Hide URL preview if it will be empty ([\element-hq#9029](matrix-org/matrix-react-sdk#9029)). * Change wording from avatar to profile picture ([\element-hq#7015](matrix-org/matrix-react-sdk#7015)). Fixes element-hq/element-meta#1331. Contributed by @aaronraimist. * Quick and dirty devtool to explore state history ([\element-hq#11197](matrix-org/matrix-react-sdk#11197)). * Consider more user inputs when calculating zxcvbn score ([\element-hq#11180](matrix-org/matrix-react-sdk#11180)). * GYU: Account Notification Settings ([\element-hq#11008](matrix-org/matrix-react-sdk#11008)). Fixes element-hq#24567. Contributed by @justjanne. * Compound Typography pass ([\element-hq#11103](matrix-org/matrix-react-sdk#11103)). Fixes element-hq#25548. * OIDC: navigate to authorization endpoint ([\#11096](matrix-org/matrix-react-sdk#11096)). Fixes element-hq#25574. Contributed by @kerryarchibald. * Fix read receipt sending behaviour around thread roots ([\element-hq#3600](matrix-org/matrix-js-sdk#3600)). * Fix missing metaspace notification badges ([\element-hq#11269](matrix-org/matrix-react-sdk#11269)). Fixes element-hq#25679. * Make checkboxes less rounded ([\element-hq#11224](matrix-org/matrix-react-sdk#11224)). Contributed by @andybalaam. * GYU: Fix issues with audible keywords without activated mentions ([\element-hq#11218](matrix-org/matrix-react-sdk#11218)). Contributed by @justjanne. * PosthogAnalytics unwatch settings on logout ([\element-hq#11207](matrix-org/matrix-react-sdk#11207)). Fixes element-hq#25703. * Avoid trying to set room account data for pinned events as guest ([\element-hq#11216](matrix-org/matrix-react-sdk#11216)). Fixes element-hq#6300. * GYU: Disable sound for DMs checkbox when DM notifications are disabled ([\element-hq#11210](matrix-org/matrix-react-sdk#11210)). Contributed by @justjanne. * force to allow calls without video and audio in embedded mode ([\element-hq#11131](matrix-org/matrix-react-sdk#11131)). Contributed by @EnricoSchw. * Fix room tile text clipping ([\element-hq#11196](matrix-org/matrix-react-sdk#11196)). Fixes element-hq#25718. * Handle newlines in user pills ([\element-hq#11166](matrix-org/matrix-react-sdk#11166)). Fixes element-hq#10994. * Limit width of user menu in space panel ([\element-hq#11192](matrix-org/matrix-react-sdk#11192)). Fixes element-hq#22627. * Add isLocation to ComposerEvent analytics events ([\element-hq#11187](matrix-org/matrix-react-sdk#11187)). Contributed by @andybalaam. * Fix: hide unsupported login elements ([\element-hq#11185](matrix-org/matrix-react-sdk#11185)). Fixes element-hq#25711. Contributed by @kerryarchibald. * Scope smaller font size to user info panel ([\element-hq#11178](matrix-org/matrix-react-sdk#11178)). Fixes element-hq#25683. * Apply i18n to strings in the html export ([\element-hq#11176](matrix-org/matrix-react-sdk#11176)). * Inhibit url previews on MXIDs containing slashes same as those without ([\element-hq#11160](matrix-org/matrix-react-sdk#11160)). * Make event info size consistent with state events ([\element-hq#11181](matrix-org/matrix-react-sdk#11181)). * Fix markdown content spacing ([\element-hq#11177](matrix-org/matrix-react-sdk#11177)). Fixes element-hq#25685. * Fix font-family definition for emojis ([\element-hq#11170](matrix-org/matrix-react-sdk#11170)). Fixes element-hq#25686. * Fix spurious error sending receipt in thread errors ([\element-hq#11157](matrix-org/matrix-react-sdk#11157)). * Consider the empty push rule actions array equiv to deprecated dont_notify ([\element-hq#11155](matrix-org/matrix-react-sdk#11155)). Fixes element-hq#25674. * Only trap escape key for cancel reply if there is a reply ([\element-hq#11140](matrix-org/matrix-react-sdk#11140)). Fixes element-hq#25640. * Update linkify to 4.1.1 ([\element-hq#11132](matrix-org/matrix-react-sdk#11132)). Fixes element-hq#23806.
2 parents 2665d1b + 494cb39 commit 4a0c85d

Some content is hidden

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

87 files changed

+977
-658
lines changed

.github/cfp_headers

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
! Access-Control-Allow-Origin
33
X-XSS-Protection: 1; mode=block
44
X-Content-Type-Options: nosniff
5+
X-Frame-Options: SAMEORIGIN
6+
Content-Security-Policy: frame-ancestors 'self'
57
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
68

79
/version

.github/workflows/static_analysis.yaml

-38
Original file line numberDiff line numberDiff line change
@@ -26,44 +26,6 @@ jobs:
2626
- name: Typecheck
2727
run: "yarn run lint:types"
2828

29-
tsc-strict:
30-
name: Typescript Strict Error Checker
31-
if: github.event_name == 'pull_request'
32-
runs-on: ubuntu-latest
33-
permissions:
34-
pull-requests: read
35-
checks: write
36-
steps:
37-
- uses: actions/checkout@v3
38-
39-
- name: Install Deps
40-
run: "scripts/layered.sh"
41-
42-
- name: Get diff lines
43-
id: diff
44-
uses: Equip-Collaboration/diff-line-numbers@e752977e2cb4207d671bb9e4dad18c07c1b73d52 # v1.1.0
45-
with:
46-
include: '["\\.tsx?$"]'
47-
48-
- name: Detecting files changed
49-
id: files
50-
uses: futuratrepadeira/changed-files@0239328a3a6268aad16af7c3e4efc78e32d6c0f0 # v4.0.1
51-
with:
52-
repo-token: ${{ secrets.GITHUB_TOKEN }}
53-
pattern: '^.*\.tsx?$'
54-
55-
- uses: t3chguy/typescript-check-action@main
56-
with:
57-
repo-token: ${{ secrets.GITHUB_TOKEN }}
58-
use-check: false
59-
check-fail-mode: added
60-
output-behaviour: annotate
61-
ts-extra-args: "--strict --noImplicitAny"
62-
files-changed: ${{ steps.files.outputs.files_updated }}
63-
files-added: ${{ steps.files.outputs.files_created }}
64-
files-deleted: ${{ steps.files.outputs.files_deleted }}
65-
line-numbers: ${{ steps.diff.outputs.lineNumbers }}
66-
6729
i18n_lint:
6830
name: "i18n Check"
6931
uses: matrix-org/matrix-react-sdk/.github/workflows/i18n_check.yml@develop

.github/workflows/update-topics.yaml

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Update release topics
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
expected_status:
6+
description: What type of release is the next expected release
7+
required: true
8+
default: RC
9+
type: choice
10+
options:
11+
- RC
12+
- Release
13+
expected_date:
14+
description: Expected release date e.g. July 11th
15+
required: true
16+
type: string
17+
concurrency: ${{ github.workflow }}
18+
jobs:
19+
bot:
20+
name: Release topic update
21+
runs-on: ubuntu-latest
22+
environment: Matrix
23+
steps:
24+
- id: stable
25+
uses: fangqiuming/latest-release-version@45b2da0e20968cd18c356c548d3c5ccb7318bb8f
26+
27+
- uses: actions/github-script@v6
28+
env:
29+
HS_URL: ${{ secrets.BETABOT_HS_URL }}
30+
LOBBY_ROOM_ID: ${{ secrets.ROOM_ID }}
31+
PUBLIC_ROOM_ID: "!YTvKGNlinIzlkMTVRl:matrix.org"
32+
ANNOUNCEMENT_ROOM_ID: "!bijaLdadorKgNGtHdA:matrix.org"
33+
TOKEN: ${{ secrets.BETABOT_ACCESS_TOKEN }}
34+
RELEASE_TOPIC: "Stable: ${{ steps.stable.outputs.tag_name }} | Release status: ${{ inputs.expected_status }} expected ${{ inputs.expected_date }}"
35+
with:
36+
script: |
37+
const { HS_URL, TOKEN, RELEASE_TOPIC, LOBBY_ROOM_ID, PUBLIC_ROOM_ID, ANNOUNCEMENT_ROOM_ID } = process.env;
38+
39+
const regex = /Stable: v(\d+.\d+.\d+) \| Release status: (\w+) expected (\w+ \d+\w+)/gm;
40+
41+
async function updateReleaseInTopic(roomId) {
42+
const apiUrl = `${HS_URL}/_matrix/client/v3/rooms/${roomId}/state/m.room.topic/`;
43+
const headers = {
44+
"Content-Type": "application/json",
45+
"Authorization": `Bearer ${TOKEN}`,
46+
};
47+
await fetch(`${HS_URL}/_matrix/client/v3/rooms/${roomId}/join`, {
48+
method: "POST",
49+
headers,
50+
body: "{}",
51+
});
52+
53+
let res = await fetch(apiUrl, {
54+
method: "GET",
55+
headers,
56+
});
57+
58+
const data = await res.json();
59+
const topic = data.topic.replace(regex, RELEASE_TOPIC);
60+
if (topic === data.topic) {
61+
console.log(roomId, "nothing to do");
62+
return;
63+
}
64+
if (data["org.matrix.msc3765.topic"]) {
65+
data["org.matrix.msc3765.topic"].forEach(d => {
66+
d.body = d.body.replace(regex, RELEASE_TOPIC);
67+
});
68+
}
69+
70+
res = await fetch(apiUrl, {
71+
method: "PUT",
72+
body: JSON.stringify({
73+
...data,
74+
topic,
75+
}),
76+
headers,
77+
});
78+
79+
if (res.ok) {
80+
console.log(roomId, "topic updated:", topic);
81+
} else {
82+
console.log(roomId, await res.text());
83+
}
84+
}
85+
86+
await updateReleaseInTopic(LOBBY_ROOM_ID);
87+
await updateReleaseInTopic(PUBLIC_ROOM_ID);
88+
await updateReleaseInTopic(ANNOUNCEMENT_ROOM_ID);

CHANGELOG.md

+54
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,57 @@
1+
Changes in [1.11.36](https://github.com/vector-im/element-web/releases/tag/v1.11.36) (2023-07-18)
2+
=================================================================================================
3+
4+
## 🔒 Security
5+
* Fixes for [CVE-2023-37259](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-37259) / [GHSA-c9vx-2g7w-rp65](https://github.com/matrix-org/matrix-react-sdk/security/advisories/GHSA-c9vx-2g7w-rp65)
6+
7+
## 🦖 Deprecations
8+
* Deprecate customisations in favour of Module API ([\#25736](https://github.com/vector-im/element-web/pull/25736)). Fixes #25733.
9+
10+
## ✨ Features
11+
* OIDC: store initial screen in session storage ([\#25688](https://github.com/vector-im/element-web/pull/25688)). Fixes #25656. Contributed by @kerryarchibald.
12+
* Allow default_server_config as a fallback config ([\#25682](https://github.com/vector-im/element-web/pull/25682)). Contributed by @ShadowRZ.
13+
* OIDC: remove auth params from url after login attempt ([\#25664](https://github.com/vector-im/element-web/pull/25664)). Contributed by @kerryarchibald.
14+
* feat(faq): remove keyboard shortcuts button ([\#9342](https://github.com/matrix-org/matrix-react-sdk/pull/9342)). Fixes #22625. Contributed by @gefgu.
15+
* GYU: Update banner ([\#11211](https://github.com/matrix-org/matrix-react-sdk/pull/11211)). Fixes #25530. Contributed by @justjanne.
16+
* Linkify mxc:// URLs as links to your media repo ([\#11213](https://github.com/matrix-org/matrix-react-sdk/pull/11213)). Fixes #6942.
17+
* OIDC: Log in ([\#11199](https://github.com/matrix-org/matrix-react-sdk/pull/11199)). Fixes #25657. Contributed by @kerryarchibald.
18+
* Handle all permitted url schemes in linkify ([\#11215](https://github.com/matrix-org/matrix-react-sdk/pull/11215)). Fixes #4457 and #8720.
19+
* Autoapprove Element Call oidc requests ([\#11209](https://github.com/matrix-org/matrix-react-sdk/pull/11209)). Contributed by @toger5.
20+
* Allow creating knock rooms ([\#11182](https://github.com/matrix-org/matrix-react-sdk/pull/11182)). Contributed by @charlynguyen.
21+
* Expose and pre-populate thread ID in devtools dialog ([\#10953](https://github.com/matrix-org/matrix-react-sdk/pull/10953)).
22+
* Hide URL preview if it will be empty ([\#9029](https://github.com/matrix-org/matrix-react-sdk/pull/9029)).
23+
* Change wording from avatar to profile picture ([\#7015](https://github.com/matrix-org/matrix-react-sdk/pull/7015)). Fixes vector-im/element-meta#1331. Contributed by @aaronraimist.
24+
* Quick and dirty devtool to explore state history ([\#11197](https://github.com/matrix-org/matrix-react-sdk/pull/11197)).
25+
* Consider more user inputs when calculating zxcvbn score ([\#11180](https://github.com/matrix-org/matrix-react-sdk/pull/11180)).
26+
* GYU: Account Notification Settings ([\#11008](https://github.com/matrix-org/matrix-react-sdk/pull/11008)). Fixes #24567. Contributed by @justjanne.
27+
* Compound Typography pass ([\#11103](https://github.com/matrix-org/matrix-react-sdk/pull/11103)). Fixes #25548.
28+
* OIDC: navigate to authorization endpoint ([\#11096](https://github.com/matrix-org/matrix-react-sdk/pull/11096)). Fixes #25574. Contributed by @kerryarchibald.
29+
30+
## 🐛 Bug Fixes
31+
* Fix read receipt sending behaviour around thread roots ([\#3600](https://github.com/matrix-org/matrix-js-sdk/pull/3600)).
32+
* Fix missing metaspace notification badges ([\#11269](https://github.com/matrix-org/matrix-react-sdk/pull/11269)). Fixes #25679.
33+
* Make checkboxes less rounded ([\#11224](https://github.com/matrix-org/matrix-react-sdk/pull/11224)). Contributed by @andybalaam.
34+
* GYU: Fix issues with audible keywords without activated mentions ([\#11218](https://github.com/matrix-org/matrix-react-sdk/pull/11218)). Contributed by @justjanne.
35+
* PosthogAnalytics unwatch settings on logout ([\#11207](https://github.com/matrix-org/matrix-react-sdk/pull/11207)). Fixes #25703.
36+
* Avoid trying to set room account data for pinned events as guest ([\#11216](https://github.com/matrix-org/matrix-react-sdk/pull/11216)). Fixes #6300.
37+
* GYU: Disable sound for DMs checkbox when DM notifications are disabled ([\#11210](https://github.com/matrix-org/matrix-react-sdk/pull/11210)). Contributed by @justjanne.
38+
* force to allow calls without video and audio in embedded mode ([\#11131](https://github.com/matrix-org/matrix-react-sdk/pull/11131)). Contributed by @EnricoSchw.
39+
* Fix room tile text clipping ([\#11196](https://github.com/matrix-org/matrix-react-sdk/pull/11196)). Fixes #25718.
40+
* Handle newlines in user pills ([\#11166](https://github.com/matrix-org/matrix-react-sdk/pull/11166)). Fixes #10994.
41+
* Limit width of user menu in space panel ([\#11192](https://github.com/matrix-org/matrix-react-sdk/pull/11192)). Fixes #22627.
42+
* Add isLocation to ComposerEvent analytics events ([\#11187](https://github.com/matrix-org/matrix-react-sdk/pull/11187)). Contributed by @andybalaam.
43+
* Fix: hide unsupported login elements ([\#11185](https://github.com/matrix-org/matrix-react-sdk/pull/11185)). Fixes #25711. Contributed by @kerryarchibald.
44+
* Scope smaller font size to user info panel ([\#11178](https://github.com/matrix-org/matrix-react-sdk/pull/11178)). Fixes #25683.
45+
* Apply i18n to strings in the html export ([\#11176](https://github.com/matrix-org/matrix-react-sdk/pull/11176)).
46+
* Inhibit url previews on MXIDs containing slashes same as those without ([\#11160](https://github.com/matrix-org/matrix-react-sdk/pull/11160)).
47+
* Make event info size consistent with state events ([\#11181](https://github.com/matrix-org/matrix-react-sdk/pull/11181)).
48+
* Fix markdown content spacing ([\#11177](https://github.com/matrix-org/matrix-react-sdk/pull/11177)). Fixes #25685.
49+
* Fix font-family definition for emojis ([\#11170](https://github.com/matrix-org/matrix-react-sdk/pull/11170)). Fixes #25686.
50+
* Fix spurious error sending receipt in thread errors ([\#11157](https://github.com/matrix-org/matrix-react-sdk/pull/11157)).
51+
* Consider the empty push rule actions array equiv to deprecated dont_notify ([\#11155](https://github.com/matrix-org/matrix-react-sdk/pull/11155)). Fixes #25674.
52+
* Only trap escape key for cancel reply if there is a reply ([\#11140](https://github.com/matrix-org/matrix-react-sdk/pull/11140)). Fixes #25640.
53+
* Update linkify to 4.1.1 ([\#11132](https://github.com/matrix-org/matrix-react-sdk/pull/11132)). Fixes #23806.
54+
155
Changes in [1.11.35](https://github.com/vector-im/element-web/releases/tag/v1.11.35) (2023-07-04)
256
=================================================================================================
357

docs/config.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ One of the following options **must** be supplied:
4545
information. These are the same values seen as `base_url` in the `default_server_config` example, with `default_is_url`
4646
being optional.
4747

48-
If a combination of these three methods is used then Element will fail to load. This is because it is unclear which
49-
should be considered "first".
48+
If both `default_server_config` and `default_server_name` are used, Element will try to look up the connection
49+
infomation using `.well-known`, and if that fails, take `default_server_config` as the homeserver connection
50+
infomation.
5051

5152
## Labs flags
5253

docs/customisations.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Customisations
22

3+
### 🦖 DEPRECATED
4+
5+
Customisations have been deprecated in favour of the [Module API](https://github.com/vector-im/element-web/blob/develop/docs/modules.md).
6+
If you have use cases from customisations which are not yet available via the Module API please open an issue.
7+
Customisations will be removed from the codebase in a future release.
8+
9+
---
10+
311
Element Web and the React SDK support "customisation points" that can be used to
412
easily add custom logic specific to a particular deployment of Element Web.
513

element.io/app/config.json

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
{
2-
"default_server_name": "matrix.org",
2+
"default_server_config": {
3+
"m.homeserver": {
4+
"base_url": "https://matrix-client.matrix.org"
5+
},
6+
"m.identity_server": {
7+
"base_url": "https://vector.im"
8+
}
9+
},
310
"brand": "SchildiChat",
411
"integrations_ui_url": "https://scalar.vector.im/",
512
"integrations_rest_url": "https://scalar.vector.im/api",

element.io/develop/config.json

+8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
{
22
"default_server_name": "matrix.org",
3+
"default_server_config": {
4+
"m.homeserver": {
5+
"base_url": "https://matrix-client.matrix.org"
6+
},
7+
"m.identity_server": {
8+
"base_url": "https://vector.im"
9+
}
10+
},
311
"brand": "Element",
412
"integrations_ui_url": "https://scalar.vector.im/",
513
"integrations_rest_url": "https://scalar.vector.im/api",

package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "element-web",
3-
"version": "1.11.35",
3+
"version": "1.11.36",
44
"description": "A feature-rich client for Matrix.org",
55
"author": "New Vector Ltd.",
66
"repository": {
@@ -70,12 +70,12 @@
7070
},
7171
"dependencies": {
7272
"@matrix-org/olm": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.14.tgz",
73-
"@matrix-org/react-sdk-module-api": "^0.0.5",
73+
"@matrix-org/react-sdk-module-api": "^0.0.6",
7474
"gfm.css": "^1.1.2",
7575
"jsrsasign": "^10.5.25",
7676
"katex": "^0.16.0",
77-
"matrix-js-sdk": "26.2.0",
78-
"matrix-react-sdk": "3.75.0",
77+
"matrix-js-sdk": "27.0.0",
78+
"matrix-react-sdk": "3.76.0",
7979
"matrix-widget-api": "^1.3.1",
8080
"react": "17.0.2",
8181
"react-dom": "17.0.2",
@@ -123,7 +123,7 @@
123123
"cpx": "^1.5.0",
124124
"css-loader": "^4",
125125
"dotenv": "^16.0.2",
126-
"eslint": "8.41.0",
126+
"eslint": "8.43.0",
127127
"eslint-config-google": "^0.14.0",
128128
"eslint-config-prettier": "^8.5.0",
129129
"eslint-plugin-deprecate": "^0.7.0",
@@ -170,7 +170,7 @@
170170
"simple-proxy-agent": "^1.1.0",
171171
"string-replace-loader": "3",
172172
"style-loader": "2",
173-
"stylelint": "^15.3.0",
173+
"stylelint": "^15.10.1",
174174
"stylelint-config-standard": "^33.0.0",
175175
"stylelint-scss": "^5.0.0",
176176
"terser-webpack-plugin": "^4.0.0",

scripts/layered.sh

+14-11
Original file line numberDiff line numberDiff line change
@@ -21,27 +21,30 @@ export PR_ORG=vector-im
2121
export PR_REPO=element-web
2222

2323
# Set up the js-sdk first
24-
node_modules/matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-js-sdk
24+
node_modules/matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-js-sdk develop
2525
pushd matrix-js-sdk
2626
yarn link
2727
yarn install --frozen-lockfile
2828
popd
2929

30-
# Also set up matrix-analytics-events so we get the latest from
31-
# the main branch or a branch with matching name
32-
node_modules/matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-analytics-events main
33-
pushd matrix-analytics-events
34-
yarn link
35-
yarn install --frozen-lockfile
36-
yarn build:ts
37-
popd
30+
# Also set up matrix-analytics-events for branch with matching name
31+
node_modules/matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-analytics-events
32+
# We don't pass a default branch so cloning may fail when we are not in a PR
33+
# This is expected as this project does not share a release cycle but we still branch match it
34+
if [ -d matrix-analytics-events ]; then
35+
pushd matrix-analytics-events
36+
yarn link
37+
yarn install --frozen-lockfile
38+
yarn build:ts
39+
popd
40+
fi
3841

3942
# Now set up the react-sdk
40-
node_modules/matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-react-sdk
43+
node_modules/matrix-react-sdk/scripts/fetchdep.sh matrix-org matrix-react-sdk develop
4144
pushd matrix-react-sdk
4245
yarn link
4346
yarn link matrix-js-sdk
44-
yarn link @matrix-org/analytics-events
47+
[ -d matrix-analytics-events ] && yarn link @matrix-org/analytics-events
4548
yarn install --frozen-lockfile
4649
popd
4750

0 commit comments

Comments
 (0)