Compare commits

...

143 Commits

Author SHA1 Message Date
RiotRobot
3d215dc777 Merge branch 'master' into develop 2023-04-11 14:35:13 +01:00
RiotRobot
bbaca4413e v1.11.29 2023-04-11 14:34:54 +01:00
RiotRobot
54d1c138c7 Prepare changelog for v1.11.29 2023-04-11 14:34:54 +01:00
renovate[bot]
5e9301bdf1 Lock file maintenance (#623)
* Lock file maintenance

* Lock file maintenance

* Claw back minipass from 4.2.7 which is broken

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-11 11:19:12 +00:00
renovate[bot]
1a99740bc8 Update dependency glob to v9 (#575)
* Update dependency glob to v9

* Adjust copy.ts to promisifed glob

* Switch asar -> @electron/asar

* Update rimraf for glob v9 compatibility

* Iterate

* Iterate

* Patch @electron/asar

* Fix another way

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Janne Mareike Koschinski <jannemk@element.io>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-04-06 12:41:38 +00:00
renovate[bot]
cf24a95d31 Update dependency electron to v24 (#611)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-06 13:31:04 +01:00
renovate[bot]
07341a0498 Update jest monorepo to v29.5.0 (#571)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-06 11:50:50 +01:00
Michael Telatynski
f6acfb8778 Update pull_request.yaml 2023-04-06 10:41:49 +01:00
renovate[bot]
417e41668c Update dependency playwright to v1.32.1 (#621)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-06 09:12:28 +00:00
renovate[bot]
e014ccc653 Update babel monorepo to v7.21.4 (#616)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-06 08:47:49 +00:00
renovate[bot]
34d1c6fc24 Update dependency @types/node to v16.18.23 (#617)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-06 08:06:04 +00:00
renovate[bot]
fdfeb0454f Update dependency typescript to v5 (#612)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-05 20:07:37 +00:00
renovate[bot]
1ec6c6e5db Update typescript-eslint monorepo to v5.57.1 (#618)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-05 19:08:25 +00:00
renovate[bot]
8be59eba56 Update all non-major dependencies (#619)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-05 17:31:39 +00:00
Michael Telatynski
8b16f2d0d9 Fix error when breadcrumb image fails to load (#609) 2023-04-05 10:56:12 +00:00
RiotRobot
ce2ce8bea1 v1.11.29-rc.1 2023-04-04 12:18:48 +01:00
RiotRobot
7c3e0f4d99 Prepare changelog for v1.11.29-rc.1 2023-04-04 12:18:48 +01:00
Andy Balaam
224bccaf95 Merge pull request #608 from RiotTranslateBot/weblate-element-desktop-element-desktop
Translations update from Weblate
2023-04-04 11:41:37 +01:00
Weblate
e7e8c8e81a Merge branch 'origin/develop' into Weblate. 2023-04-04 08:09:29 +00:00
Michael Telatynski
f24e90b927 Update windows-requirements.md 2023-04-04 09:09:25 +01:00
Weblate
39b2ca0bc1 Merge branch 'origin/develop' into Weblate. 2023-04-03 15:31:20 +00:00
Michael Telatynski
077a58a2e8 Fix wrong sqlcipher build being used due to cache conflict (#606) 2023-04-03 15:31:14 +00:00
Weblate
03161c7433 Merge branch 'origin/develop' into Weblate. 2023-04-03 14:21:11 +00:00
Michael Telatynski
7c0f11914b Add grep to dockerbuild image (#607) 2023-04-03 14:21:04 +00:00
Weblate
119fdc2db3 Merge branch 'origin/develop' into Weblate. 2023-04-03 08:50:25 +00:00
Michael Telatynski
06d6f11670 Prefer env for passing github context vars (#590) 2023-04-03 08:50:20 +00:00
Weblate
9334d87ad8 Merge branch 'origin/develop' into Weblate. 2023-04-03 08:32:41 +00:00
Michael Telatynski
50d38e2abd Use branch specific linux dockerbuild tags (#601) 2023-04-03 09:32:37 +01:00
sefidel
3846f45529 Translated using Weblate (Korean)
Currently translated at 22.2% (10 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/ko/
2023-04-03 02:33:48 +00:00
sefidel
df66db90f5 Added translation using Weblate (Korean) 2023-04-02 02:24:55 +00:00
Weblate
b22d6640c2 Merge branch 'origin/develop' into Weblate. 2023-03-31 18:13:59 +00:00
Michael Telatynski
0663de091f Enable CodeQL (#603) 2023-03-31 19:13:55 +01:00
Weblate
9cb3e2b551 Merge branch 'origin/develop' into Weblate. 2023-03-31 15:17:48 +00:00
Michael Telatynski
5bd1c663e2 Use frozen lockfile instead of pure lockfile on yarn install (#605) 2023-03-31 15:17:43 +00:00
Weblate
20f9a8daf8 Merge branch 'origin/develop' into Weblate. 2023-03-31 14:42:47 +00:00
RiotRobot
19fd0b99f5 Merge branch 'master' into develop 2023-03-31 15:41:56 +01:00
RiotRobot
60171c780c v1.11.28 2023-03-31 15:39:31 +01:00
RiotRobot
75276cff7b Prepare changelog for v1.11.28 2023-03-31 15:39:31 +01:00
RiotRobot
266fc707b0 Fix broken lockfile element-web/issues/25008 2023-03-31 15:23:40 +01:00
Weblate
81a5ba677a Merge branch 'origin/develop' into Weblate. 2023-03-31 12:12:10 +00:00
RiotRobot
2ca8b7be61 Merge branch 'master' into develop 2023-03-31 12:44:40 +01:00
RiotRobot
349b5e0081 v1.11.27 2023-03-31 11:24:13 +01:00
RiotRobot
09923b3fe4 Prepare changelog for v1.11.27 2023-03-31 11:24:12 +01:00
Weblate
034bbcfa46 Merge branch 'origin/develop' into Weblate. 2023-03-31 10:00:36 +00:00
Michael Telatynski
c10e666dad Ship linux tarball with static sqlcipher (#597) 2023-03-31 11:00:30 +01:00
RiotRobot
a479c8607b Merge branch 'master' into staging 2023-03-31 10:56:21 +01:00
Andy Balaam
ae1998a024 Merge pull request #602 from vector-im/backport-599-to-staging
Run build_linux in docker using an older glibc (#599)
2023-03-31 09:55:01 +01:00
Weblate
f0c7f615ee Merge branch 'origin/develop' into Weblate. 2023-03-31 08:45:38 +00:00
renovate[bot]
743f5dc5de Update typescript-eslint monorepo to v5.57.0 (#538)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-31 09:45:33 +01:00
Michael Telatynski
ba45d84771 Run build_linux in docker using an older glibc (#599)
(cherry picked from commit 718d5a8037)
2023-03-31 09:24:02 +01:00
Weblate
675798b4c9 Merge branch 'origin/develop' into Weblate. 2023-03-31 08:18:18 +00:00
Michael Telatynski
f8aba49155 Enable gatekeeperAssess (#600) 2023-03-31 09:18:13 +01:00
Weblate
389e744cf1 Merge branch 'origin/develop' into Weblate. 2023-03-31 07:50:18 +00:00
renovate[bot]
439760f8ee Update dependency @types/node to v16.18.21 (#569)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-31 08:50:13 +01:00
Weblate
9048af7003 Merge branch 'origin/develop' into Weblate. 2023-03-30 13:23:04 +00:00
Michael Telatynski
718d5a8037 Run build_linux in docker using an older glibc (#599) 2023-03-30 14:22:58 +01:00
Weblate
dd66fb8010 Merge branch 'origin/develop' into Weblate. 2023-03-30 12:54:50 +00:00
Michael Telatynski
a9cffb8ce5 Automate pushing dockerbuild image to ghcr.io (#598) 2023-03-30 13:54:45 +01:00
Weblate
f703771a00 Merge branch 'origin/develop' into Weblate. 2023-03-29 13:23:40 +00:00
Michael Telatynski
40058d36c4 Remove element-builder specific scripts (#586) 2023-03-29 14:23:34 +01:00
Weblate
e00144015f Merge branch 'origin/develop' into Weblate. 2023-03-29 13:07:42 +00:00
Andy Balaam
762881bd8a Merge pull request #595 from vector-im/andybalaam/changelog-for-1-11-26
Update changelog for v1.11.26 now the security issue is public
2023-03-29 14:07:35 +01:00
Andy Balaam
2787266d48 Update changelog for v1.11.26 now the security issue is public 2023-03-28 21:01:53 +01:00
Andy Balaam
62e6851250 Backport package.json changes from develop 2023-03-28 17:32:29 +01:00
Michael Telatynski
201000da39 Backport more build config to master 2023-03-28 16:38:57 +01:00
Michael Telatynski
38ccd77b81 Backport packaging scripts to master 2023-03-28 16:16:24 +01:00
Weblate
61dd2e3ce4 Merge branch 'origin/develop' into Weblate. 2023-03-28 13:50:47 +00:00
waclaw66
55841e4d4d Translated using Weblate (Czech)
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/cs/
2023-03-28 13:50:47 +00:00
RiotRobot
694015f7db Merge branch 'master' into develop 2023-03-28 14:50:40 +01:00
RiotRobot
722e5ff0ac v1.11.26 2023-03-28 14:50:26 +01:00
RiotRobot
425f3186b8 Prepare changelog for v1.11.26 2023-03-28 14:50:25 +01:00
waclaw66
dd26855c15 Added translation using Weblate (Czech) 2023-03-28 08:20:06 +00:00
Claudio Satriano
b7b3708b0b Translated using Weblate (Italian)
Currently translated at 95.5% (43 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/it/
2023-03-24 15:15:44 +00:00
Weblate
4384e9b506 Merge branch 'origin/develop' into Weblate. 2023-03-23 17:03:44 +00:00
Michael Telatynski
f23892f54d Fix typo in github actions workflow (#589) 2023-03-23 17:03:39 +00:00
Weblate
7fb557cf3d Merge branch 'origin/develop' into Weblate. 2023-03-23 16:49:06 +00:00
Michael Telatynski
540bd91966 Update updates.md 2023-03-23 16:49:01 +00:00
Weblate
56cab854fc Merge branch 'origin/develop' into Weblate. 2023-03-23 15:17:13 +00:00
Michael Telatynski
f8d331c656 Switch to live R2 bucket for github actions packaging (#588) 2023-03-23 15:17:07 +00:00
Weblate
6e254a761b Merge branch 'origin/develop' into Weblate. 2023-03-23 13:22:35 +00:00
Michael Telatynski
1654030c5f Iterate ARM support in CI (#587) 2023-03-23 13:22:29 +00:00
Weblate
f34bcca76d Merge branch 'origin/develop' into Weblate. 2023-03-22 09:41:56 +00:00
Michael Telatynski
7a1a0fabdb Add support for Windows arm64 (#423) 2023-03-22 09:41:51 +00:00
Weblate
440c9862f1 Merge branch 'origin/develop' into Weblate. 2023-03-22 09:40:43 +00:00
Michael Telatynski
204945299e Use notarize support built into electron-builder (#558) 2023-03-22 09:40:39 +00:00
Weblate
2e0c0becd5 Merge branch 'origin/develop' into Weblate. 2023-03-22 09:31:48 +00:00
Michael Telatynski
3b08d4fa43 Show recent room breadcrumbs on touchbar (#183) 2023-03-22 09:31:42 +00:00
Weblate
75aa07a128 Merge branch 'origin/develop' into Weblate. 2023-03-20 08:22:05 +00:00
Michael Telatynski
775b03572c Correctly specify minimum Node version (#582) 2023-03-20 09:22:00 +01:00
Weblate
41c0be9761 Merge branch 'origin/develop' into Weblate. 2023-03-20 08:17:39 +00:00
Michael Telatynski
74579317db Switch to production ssl.com cert (#585) 2023-03-20 08:17:34 +00:00
Weblate
9ed1018f1b Merge branch 'origin/develop' into Weblate. 2023-03-17 15:33:24 +00:00
Michael Telatynski
18d80e4e9c Clear electron data when logging out (#578) 2023-03-17 15:33:19 +00:00
Weblate
d9eeeabbb4 Merge branch 'origin/develop' into Weblate. 2023-03-17 15:17:33 +00:00
Michael Telatynski
c560bb2de7 Update GPG keyring with extended validity period (#584) 2023-03-17 15:17:29 +00:00
Weblate
a276cf26c7 Merge branch 'origin/develop' into Weblate. 2023-03-16 10:31:11 +00:00
Michael Telatynski
8235275d2c Send Electron crashpad reports to Sentry from Nightly (#579)
* Send Electron crashpad reports to Sentry from Nightly

* Update electron-main.ts

* Increase timeout

* Fix preload injection breaking things

* Iterate

* Iterate

* Iterate

* iterate
2023-03-16 10:31:06 +00:00
Weblate
0d7547a417 Merge branch 'origin/develop' into Weblate. 2023-03-16 10:14:00 +00:00
Michael Telatynski
3d578e815a Fix reprepro test ipv4 vs ipv6 (#581) 2023-03-16 10:13:55 +00:00
Weblate
e302bb7fc3 Merge branch 'origin/develop' into Weblate. 2023-03-15 13:57:40 +00:00
RiotRobot
6cfbd2e932 Merge branch 'master' into develop 2023-03-15 13:57:34 +00:00
Andy Balaam
34ccea0378 Fix changelog for 1.11.25
Auto-generated changelog was accidentally committed. Replacing with the
correct one.
2023-03-15 13:50:04 +00:00
Weblate
4c1373dcb0 Merge branch 'origin/develop' into Weblate. 2023-03-15 13:46:54 +00:00
Andy Balaam
c80763c7b7 Merge pull request #580 from vector-im/andybalaam/update-changelog-1.11.25
Fix changelog for 1.11.25
2023-03-15 13:46:48 +00:00
Andy Balaam
a440bc89ec Fix changelog for 1.11.25
Auto-generated changelog was accidentally committed. Replacing with the
correct one.
2023-03-15 13:20:25 +00:00
Weblate
790afe42cb Merge branch 'origin/develop' into Weblate. 2023-03-15 13:14:48 +00:00
RiotRobot
ef91afa057 Merge branch 'master' into develop 2023-03-15 13:14:42 +00:00
RiotRobot
bb0ccfdbab v1.11.25 2023-03-15 13:14:27 +00:00
RiotRobot
5aec4945f9 Prepare changelog for v1.11.25 2023-03-15 13:14:26 +00:00
RiotRobot
51941ed766 v1.11.25-rc.3 2023-03-14 11:50:28 +00:00
RiotRobot
b503dcd9ef Prepare changelog for v1.11.25-rc.3 2023-03-14 11:50:27 +00:00
Weblate
a591b980f8 Merge branch 'origin/develop' into Weblate. 2023-03-14 11:16:50 +00:00
renovate[bot]
c9110bc3e4 Update all non-major dependencies (#568)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-14 11:16:45 +00:00
Open Culture Foundation
391e10abab Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/zh_Hant/
2023-03-14 00:33:44 +00:00
Weblate
6d12148db2 Merge branch 'origin/develop' into Weblate. 2023-03-13 08:24:05 +00:00
renovate[bot]
33429a4b1b Update dependency @aws-sdk/client-s3 to v3.288.0 (#577)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-13 08:24:00 +00:00
Weblate
67dd6b90b6 Merge branch 'origin/develop' into Weblate. 2023-03-12 20:28:20 +00:00
renovate[bot]
e1190a2210 Update dependency playwright to v1.31.2 (#570)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-12 20:28:16 +00:00
Weblate
03864ebc4f Merge branch 'origin/develop' into Weblate. 2023-03-12 19:43:10 +00:00
renovate[bot]
1b6c9092f5 Update dependency eslint-plugin-unicorn to v46 (#574)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-13 08:43:06 +13:00
Open Culture Foundation
b8606103be Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/zh_Hant/
2023-03-12 16:33:42 +00:00
Peter Chen
fc2add64cb Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/zh_Hant/
2023-03-10 17:33:41 +00:00
RiotRobot
9926ebe89e v1.11.25-rc.2 2023-03-10 15:20:00 +00:00
RiotRobot
ad08b96905 Prepare changelog for v1.11.25-rc.2 2023-03-10 15:20:00 +00:00
ElementRobot
b558bec1b5 [Backport staging] Recommend element-io-archive-keyring from our Debian package (#567)
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2023-03-10 09:52:05 +00:00
Michael Telatynski
8b110b621f Recommend element-io-archive-keyring from our Debian package (#566) 2023-03-10 09:21:02 +00:00
Michael Telatynski
14fb3f5ce4 Rename control to control 2023-03-09 10:28:53 +00:00
Michael Telatynski
2bb999ebb6 Build element-io-archive-keyring package (#565) 2023-03-09 10:26:37 +00:00
renovate[bot]
104d985c24 Update babel monorepo to v7.21.0 (#554)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-08 08:17:47 +00:00
Michael Telatynski
22fe702b83 Include changelogs in deb package (#563)
* Initial attempt at custom Debian changelogs

* Iterate

* Quotes...

* Iterate

* facepalm

* Iterate

* Remove reundant line

* Ifs

* Test

* Iterate

* Iterate

* Brackets

* inconsistent?

* Update build_and_test.yaml

* Update build_and_test.yaml
2023-03-07 15:53:53 +00:00
RiotRobot
fa6e7ce0a5 v1.11.25-rc.1 2023-03-07 12:09:39 +00:00
RiotRobot
32c5ab7df3 Prepare changelog for v1.11.25-rc.1 2023-03-07 12:09:38 +00:00
Andy Balaam
25af58e86f Merge pull request #564 from RiotTranslateBot/weblate-element-desktop-element-desktop
Translations update from Weblate
2023-03-07 10:47:15 +00:00
Weblate
9fb00348c4 Merge branch 'origin/develop' into Weblate. 2023-03-06 08:57:02 +00:00
Michael Telatynski
126d2c336b Assert release & nightly builds are signed, notarised & accessible before deployment (#559) 2023-03-06 08:56:49 +00:00
Weblate
91576f3939 Merge branch 'origin/develop' into Weblate. 2023-03-05 23:05:12 +00:00
renovate[bot]
383793640d Update dependency @aws-sdk/client-s3 to v3.281.0 (#550)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-03-06 12:05:08 +13:00
Open Culture Foundation
fe74834456 Translated using Weblate (Chinese (Traditional))
Currently translated at 100.0% (45 of 45 strings)

Translation: Element Desktop/element-desktop
Translate-URL: https://translate.element.io/projects/element-desktop/element-desktop/zh_Hant/
2023-03-05 12:33:40 +00:00
Artem Polivanchuk
9570864dd3 Added translation using Weblate (Ukrainian) 2023-03-04 14:09:44 +00:00
Andy Balaam
633805dcc2 Merge pull request #560 from vector-im/andybalaam/fix-release-notes-1.11.24
Remove items incorrectly included in changelog for 1.11.24
2023-03-03 14:28:35 +00:00
Andy Balaam
e04e500fd5 Remove items incorrectly included in changlog for 1.11.24 2023-03-03 12:52:04 +00:00
Michael Telatynski
68d2e34841 Guard reprepro db via concurrency limits (#555) 2023-03-02 16:54:57 +00:00
Michael Telatynski
88ef8deb78 Fix macOS notarisation using keychain credentials (#557) 2023-03-01 10:49:41 +00:00
46 changed files with 2952 additions and 2465 deletions

View File

@@ -39,19 +39,16 @@ on:
required: true
type: boolean
default: true
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
concurrency: ${{ github.workflow }}
env:
# XXX: UPDATE THIS BEFORE WHEN GOING LIVE
R2_BUCKET: "packages-element-io-test"
R2_BUCKET: "packages-element-io"
jobs:
prepare:
uses: ./.github/workflows/build_prepare.yaml
with:
config: element.io/${{ inputs.mode || 'nightly' }}
version: ${{ inputs.mode == 'release' && '' || 'develop' }}
calculate-nightly-versions: ${{ inputs.mode != 'release' }}
nightly: ${{ inputs.mode != 'release' }}
secrets:
CF_R2_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
CF_R2_TOKEN: ${{ secrets.CF_R2_TOKEN }}
@@ -90,30 +87,45 @@ jobs:
with:
sign: true
deploy-mode: true
# XXX: UPDATE THIS BEFORE WHEN GOING LIVE
base-url: https://packages-element-io-test.element.io/${{ inputs.mode == 'release' && 'desktop' || 'nightly' }}
base-url: https://packages.element.io/${{ inputs.mode == 'release' && 'desktop' || 'nightly' }}
version: ${{ needs.prepare.outputs.macos-version }}
# We do not put this call into deploy-mode as we do not want it to add to the packages.element.io artifact
# We ship this build via reprepro only
linux:
if: github.event_name != 'workflow_dispatch' || inputs.linux
needs: prepare
name: Linux
name: Linux (sqlcipher system)
uses: ./.github/workflows/build_linux.yaml
secrets: inherit
with:
config: element.io/${{ inputs.mode || 'nightly' }}
sqlcipher: system
deploy-mode: true
version: ${{ needs.prepare.outputs.linux-version }}
# We ship the static build via static tarball only
linux_static:
if: github.event_name != 'workflow_dispatch' || inputs.linux
needs: prepare
name: Linux (sqlcipher static)
uses: ./.github/workflows/build_linux.yaml
with:
deploy-mode: true
config: element.io/${{ inputs.mode || 'nightly' }}
sqlcipher: static
version: ${{ needs.prepare.outputs.linux-version }}
# This deploy job only handles Windows, macOS & linux_static as those are stateless and static.
# Linux will be deployed via reprepro after it, but we list it as a dependency to abort if it fails.
deploy:
needs:
- macos
- linux
- linux_static
- windows_32bit
- windows_64bit
runs-on: ubuntu-latest
name: Deploy
if: always() && (github.event != 'workflow_dispatch' || inputs.deploy)
if: github.event_name != 'workflow_dispatch' || (inputs.deploy && (inputs.macos || inputs.windows_32bit || inputs.windows_64bit))
environment: packages.element.io
steps:
- name: Download artifacts
@@ -122,18 +134,7 @@ jobs:
name: packages.element.io
path: packages.element.io
- name: Deploy debian repo
if: github.event_name != 'workflow_dispatch' || inputs.linux
run: |
mv packages.element.io/debian .
aws s3 cp --recursive debian/ s3://$R2_BUCKET/debian --endpoint-url $R2_URL --region auto
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
R2_URL: ${{ secrets.CF_R2_S3_API }}
- name: Deploy artifacts
if: github.event_name != 'workflow_dispatch' || inputs.macos || inputs.windows_32bit || inputs.windows_64bit
run: |
aws s3 cp --recursive packages.element.io/ s3://$R2_BUCKET/$DEPLOYMENT_DIR --endpoint-url $R2_URL --region auto
env:
@@ -141,3 +142,15 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
R2_URL: ${{ secrets.CF_R2_S3_API }}
DEPLOYMENT_DIR: ${{ inputs.mode == 'release' && 'desktop' || 'nightly' }}
reprepro:
needs:
- linux
# We queue this after the other deploy stage as we want to abort if that fails
- deploy
name: Run reprepro
if: github.event_name != 'workflow_dispatch' || (inputs.deploy && inputs.linux)
uses: ./.github/workflows/reprepro.yaml
secrets: inherit
with:
artifact-name: linux-sqlcipher-system

View File

@@ -31,6 +31,7 @@ jobs:
matrix:
sqlcipher: [system, static]
with:
config: ${{ github.event.pull_request.base.ref == 'develop' && 'element.io/nightly' || 'element.io/release' }}
sqlcipher: ${{ matrix.sqlcipher }}
macos:
@@ -79,7 +80,7 @@ jobs:
cache: "yarn"
- name: Install Deps
run: "yarn install --pure-lockfile"
run: "yarn install --frozen-lockfile"
- uses: actions/download-artifact@v3
with:
@@ -91,7 +92,7 @@ jobs:
if: matrix.prepare_cmd
- name: Run tests
uses: GabrielBB/xvfb-action@v1
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3 # v1
timeout-minutes: 5
with:
run: "yarn test"

53
.github/workflows/build_keyring.yaml vendored Normal file
View File

@@ -0,0 +1,53 @@
name: Build Keyring package
on:
workflow_dispatch:
inputs:
deploy:
description: Deploy artifacts
required: true
type: boolean
default: true
fingerprint:
description: The expected gpg fingerprint
required: true
type: string
concurrency: ${{ github.workflow }}
jobs:
build:
name: Build Keyring package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
mkdir -p element-io-archive-keyring/usr/share/keyrings/
cp packages.element.io/debian/element-io-archive-keyring.gpg element-io-archive-keyring/usr/share/keyrings/element-io-archive-keyring.gpg
- name: Check fingerprint
run: |
gpg --import element-io-archive-keyring/usr/share/keyrings/element-io-archive-keyring.gpg
gpg --fingerprint "$FINGERPRINT"
env:
FINGERPRINT: ${{ inputs.fingerprint }}
- name: Build deb package
run: |
chmod u=rw,go=r element-io-archive-keyring/usr/share/keyrings/element-io-archive-keyring.gpg
dpkg-deb -Zxz --root-owner-group --build element-io-archive-keyring element-io-archive-keyring.deb
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: element-io-archive-keyring
path: "*.deb"
retention-days: 1
reprepro:
needs: build
name: Run reprepro
if: inputs.deploy
uses: ./.github/workflows/reprepro.yaml
secrets: inherit
with:
artifact-name: element-io-archive-keyring

View File

@@ -3,18 +3,11 @@
# the correct cache scoping, and additional care must be taken to not run untrusted actions on the develop branch.
on:
workflow_call:
secrets:
GPG_PRIVATE_KEY:
required: false
GPG_PASSPHRASE:
required: false
CF_R2_ACCESS_KEY_ID:
required: false
CF_R2_TOKEN:
required: false
CF_R2_S3_API:
required: false
inputs:
config:
type: string
required: true
description: "The config directory to use"
version:
type: string
required: false
@@ -24,13 +17,17 @@ on:
required: true
description: "How to link sqlcipher, one of 'system' | 'static'"
deploy-mode:
type: string
type: boolean
required: false
description: "Whether to arrange artifacts in the arrangement needed for deployment, skipping unrelated ones, this uses reprepro and requires 'packages.element.io' environment"
description: "Whether to arrange artifacts in the arrangement needed for deployment, skipping unrelated ones"
jobs:
build:
runs-on: ubuntu-latest
environment: ${{ inputs.deploy-mode && 'packages.element.io' || '' }}
container:
image: ghcr.io/vector-im/element-desktop-dockerbuild:${{ github.ref_name == 'master' && 'master' || 'develop' }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
@@ -42,27 +39,20 @@ jobs:
id: cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ hashFiles('hakDependencies.json', 'electronVersion') }}
key: ${{ runner.os }}-${{ inputs.sqlcipher }}-${{ hashFiles('hakDependencies.json', 'electronVersion') }}
path: |
./.hak
- name: Install Rust
if: steps.cache.outputs.cache-hit != 'true'
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install libsqlcipher-dev
if: steps.cache.outputs.cache-hit != 'true' && inputs.sqlcipher == 'system'
run: sudo apt-get install -y libsqlcipher-dev
- uses: actions/setup-node@v3
with:
cache: "yarn"
env:
# Workaround for https://github.com/actions/setup-node/issues/317
FORCE_COLOR: 0
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --pure-lockfile"
run: "yarn install --frozen-lockfile"
- name: Build Natives
if: steps.cache.outputs.cache-hit != 'true'
@@ -76,53 +66,72 @@ jobs:
run: |
echo "config-args=--nightly '${{ inputs.version }}'" >> $GITHUB_OUTPUT
- name: Generate debian control file
- name: Generate debian files and arguments
id: debian
run: |
cp element.io/${{ inputs.version && 'nightly' || 'release' }}/control.template debcontrol
INPUT_VERSION="${{ inputs.version }}"
if [ -f changelog.Debian ]; then
echo "config-args=--deb-changelog changelog.Debian" >> $GITHUB_OUTPUT
fi
cp "$DIR/control.template" debcontrol
VERSION=${INPUT_VERSION:-$(cat package.json | jq -r .version)}
echo "Version: $VERSION" >> debcontrol
env:
DIR: ${{ inputs.config }}
INPUT_VERSION: ${{ inputs.version }}
- name: Build App
run: |
scripts/generate-builder-config.ts ${{ steps.nightly.outputs.config-args }} --deb-custom-control=debcontrol
npx ts-node scripts/generate-builder-config.ts \
${{ steps.nightly.outputs.config-args }} \
${{ steps.debian.outputs.config-args }} \
--deb-custom-control=debcontrol
yarn build --publish never -l --config electron-builder.json
- name: Load GPG key
if: inputs.deploy-mode
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 # v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
fingerprint: 75741890063E5E9A46135D01C2850B265AC085BD
- name: Check ldd
run: |
ldd dist/linux-unpacked/resources/app.asar.unpacked/node_modules/matrix-seshat/native/index.node
if [ "$SQLCIPHER_STATIC" == "1" ]; then
ldd dist/linux-unpacked/resources/app.asar.unpacked/node_modules/matrix-seshat/native/index.node | grep -v libsqlcipher.so.0
ldd dist/linux-unpacked/resources/app.asar.unpacked/node_modules/matrix-seshat/native/index.node | grep libcrypto.so.1.1
else
ldd dist/linux-unpacked/resources/app.asar.unpacked/node_modules/matrix-seshat/native/index.node | grep libsqlcipher.so.0
ldd dist/linux-unpacked/resources/app.asar.unpacked/node_modules/matrix-seshat/native/index.node | grep -v libcrypto.so.1.1
fi
env:
SQLCIPHER_STATIC: ${{ inputs.sqlcipher == 'static' && '1' || '' }}
- name: Prepare artifacts for deployment (reprepro)
- name: Stash deb package
if: inputs.deploy-mode
uses: actions/upload-artifact@v3
with:
name: linux-sqlcipher-${{ inputs.sqlcipher }}-deb
path: dist/*.deb
retention-days: 1
- name: Prepare artifacts for deployment
if: inputs.deploy-mode
run: |
# Clear out the template packages.element.io directory, it has a dedicated deploy workflow
rm -R packages.element.io/*
mv dist _dist
mkdir -p "dist/install/linux/glibc-x86-64/"
mv _dist/*.tar.gz "dist/install/linux/glibc-x86-64"
# Install reprepro
sudo apt-get install -y reprepro
# We don't wish to store the tarball for every nightly ever, so we only keep the latest
- name: "[Nightly] Strip version from tarball"
if: inputs.deploy-mode && inputs.version != ''
run: |
mv dist/install/linux/glibc-x86-64/*.tar.gz "dist/install/linux/glibc-x86-64/element-desktop-nightly.tar.gz"
# Fetch reprepro database
aws s3 cp --recursive s3://$R2_BUCKET debian/db/ --endpoint-url $R2_URL --region auto
grep Codename debian/conf/distributions | sed -n 's/Codename: //p' | while read -r target ; do
reprepro -b debian includedeb "$target" ./dist/*.deb
done
# Store reprepro database
aws s3 cp --recursive debian/db/ s3://$R2_BUCKET --endpoint-url $R2_URL --region auto
env:
R2_BUCKET: packages-element-io-db
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
R2_URL: ${{ secrets.CF_R2_S3_API }}
- name: "[Release] Prepare release latest symlink"
if: inputs.deploy-mode && inputs.version == ''
shell: bash
run: |
ln -s "$(find . -type f -iname "*.tar.gz" | xargs -0 -n1 -- basename)" "element-desktop.tar.gz"
working-directory: "dist/install/linux/glibc-x86-64"
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ inputs.deploy-mode && 'packages.element.io' || format('linux-sqlcipher-{0}', inputs.sqlcipher) }}
path: ${{ inputs.deploy-mode && 'packages.element.io' || 'dist' }}
path: dist
retention-days: 1

View File

@@ -24,7 +24,7 @@ on:
required: false
description: "Whether to sign & notarise the build, requires 'packages.element.io' environment"
deploy-mode:
type: string
type: boolean
required: false
description: "Whether to arrange artifacts in the arrangement needed for deployment, skipping unrelated ones"
base-url:
@@ -54,6 +54,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
uses: actions-rs/toolchain@v1
with:
default: true
toolchain: stable
target: aarch64-apple-darwin
@@ -63,7 +64,7 @@ jobs:
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --pure-lockfile"
run: "yarn install --frozen-lockfile"
- name: Build Natives
if: steps.cache.outputs.cache-hit != 'true'
@@ -79,15 +80,22 @@ jobs:
- name: "[Signed] Build App"
if: inputs.sign != ''
run: |
scripts/generate-builder-config.ts ${{ steps.nightly.outputs.config-args }}
scripts/generate-builder-config.ts ${{ steps.nightly.outputs.config-args }} --notarytool-team-id='${{ secrets.APPLE_TEAM_ID }}'
yarn build:universal --publish never --config electron-builder.json
env:
NOTARIZE_APPLE_ID: ${{ secrets.APPLE_ID }}
NOTARIZE_APPLE_ID_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
NOTARIZE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
APPLE_ID: ${{ secrets.APPLE_ID }}
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_ID_PASSWORD }}
CSC_KEY_PASSWORD: ${{ secrets.APPLE_CSC_KEY_PASSWORD }}
CSC_LINK: ${{ secrets.APPLE_CSC_LINK }}
- name: Check app was signed & notarised successfully
if: inputs.sign != ''
run: |
hdiutil attach dist/*.dmg
codesign -dv --verbose=4 /Volumes/Element*/*.app
spctl -a -vvv -t install /Volumes/Element*/*.app
hdiutil detach /Volumes/Element*
- name: "[Unsigned] Build App"
if: inputs.sign == ''
run: |

View File

@@ -10,37 +10,38 @@ on:
type: string
required: false
description: "The version tag to fetch, or 'develop', will pick automatically if not passed"
calculate-nightly-versions:
type: string
nightly:
type: boolean
required: false
description: "Whether to calculate the version strings new Nightly builds should use"
default: false
description: "Whether the build is a Nightly and to calculate the version strings new builds should use"
secrets:
# Required if `calculate-nightly-versions` is set
# Required if `nightly` is set
CF_R2_ACCESS_KEY_ID:
required: false
# Required if `calculate-nightly-versions` is set
# Required if `nightly` is set
CF_R2_TOKEN:
required: false
# Required if `calculate-nightly-versions` is set
# Required if `nightly` is set
CF_R2_S3_API:
required: false
outputs:
macos-version:
description: "The version string the next macOS Nightly should use, only output for calculate-nightly-versions"
description: "The version string the next macOS Nightly should use, only output for nightly"
value: ${{ jobs.prepare.outputs.macos-version }}
linux-version:
description: "The version string the next Linux Nightly should use, only output for calculate-nightly-versions"
description: "The version string the next Linux Nightly should use, only output for nightly"
value: ${{ jobs.prepare.outputs.linux-version }}
win32-x64-version:
description: "The version string the next Windows x64 Nightly should use, only output for calculate-nightly-versions"
description: "The version string the next Windows x64 Nightly should use, only output for nightly"
value: ${{ jobs.prepare.outputs.win32-x64-version }}
win32-x86-version:
description: "The version string the next Windows x86 Nightly should use, only output for calculate-nightly-versions"
description: "The version string the next Windows x86 Nightly should use, only output for nightly"
value: ${{ jobs.prepare.outputs.win32-x86-version }}
jobs:
prepare:
name: Prepare
environment: ${{ inputs.calculate-nightly-versions && 'packages.element.io' || '' }}
environment: ${{ inputs.nightly && 'packages.element.io' || '' }}
runs-on: ubuntu-latest
outputs:
macos-version: ${{ steps.versions.outputs.macos }}
@@ -55,7 +56,7 @@ jobs:
cache: "yarn"
- name: Install Deps
run: "yarn install --pure-lockfile"
run: "yarn install --frozen-lockfile"
- name: Fetch Element Web
run: yarn run fetch --noverify -d ${{ inputs.config }} ${{ inputs.version }}
@@ -66,19 +67,9 @@ jobs:
yarn run --silent electron --version > electronVersion
cat package.json | jq -c .hakDependencies > hakDependencies.json
- uses: actions/upload-artifact@v3
with:
name: webapp
retention-days: 1
path: |
webapp.asar
package.json
electronVersion
hakDependencies.json
- name: Calculate Nightly versions
- name: "[Nightly] Calculate versions"
id: versions
if: inputs.calculate-nightly-versions
if: inputs.nightly
run: |
MACOS=$(aws s3 cp s3://$R2_BUCKET/nightly/update/macos/releases.json - --endpoint-url $R2_URL --region auto | jq -r .currentRelease)
echo "macos=$(scripts/generate-nightly-version.ts --latest $MACOS)" >> $GITHUB_OUTPUT
@@ -93,6 +84,44 @@ jobs:
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
# XXX: UPDATE THIS BEFORE WHEN GOING LIVE
R2_BUCKET: "packages-element-io-test"
R2_BUCKET: "packages-element-io"
R2_URL: ${{ secrets.CF_R2_S3_API }}
- name: Check version
id: package
run: |
echo "version=$(cat package.json | jq -r .version)" >> $GITHUB_OUTPUT
- name: "[Release] Fetch release"
id: release
if: ${{ !inputs.nightly && inputs.version != 'develop' }}
uses: cardinalby/git-get-release-action@cedef2faf69cb7c55b285bad07688d04430b7ada # v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
tag: v${{ steps.package.outputs.version }}
- name: "[Release] Write changelog"
if: ${{ !inputs.nightly && inputs.version != 'develop' }}
run: |
TIME=$(date -d "$PUBLISHED_AT" -R)
echo "element-desktop ($VERSION) default; urgency=medium" >> changelog.Debian
echo "$BODY" | sed 's/^##/\n */g;s/^\*/ */g' | perl -pe 's/\[.+?]\((.+?)\)/\1/g' >> changelog.Debian
echo "" >> changelog.Debian
echo " -- $ACTOR <support@element.io> $TIME" >> changelog.Debian
env:
ACTOR: ${{ github.actor }}
VERSION: v${{ steps.package.outputs.version }}
BODY: ${{ steps.release.outputs.body }}
PUBLISHED_AT: ${{ steps.release.outputs.published_at }}
- uses: actions/upload-artifact@v3
with:
name: webapp
retention-days: 1
path: |
webapp.asar
package.json
electronVersion
hakDependencies.json
changelog.Debian

View File

@@ -14,7 +14,7 @@ on:
arch:
type: string
required: true
description: "The architecture to build for, one of 'x64' | 'x86'"
description: "The architecture to build for, one of 'x64' | 'x86' | 'arm64'"
version:
type: string
required: false
@@ -24,13 +24,15 @@ on:
required: false
description: "Whether to sign & notarise the build, requires 'packages.element.io' environment"
deploy-mode:
type: string
type: boolean
required: false
description: "Whether to arrange artifacts in the arrangement needed for deployment, skipping unrelated ones"
jobs:
build:
runs-on: windows-latest
environment: ${{ inputs.sign && 'packages.element.io' || '' }}
env:
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x86/signtool.exe"
steps:
- uses: kanga333/variable-mapper@master
id: config
@@ -43,6 +45,12 @@ jobs:
"target": "x86_64-pc-windows-msvc",
"dir": "x64"
},
"arm64": {
"target": "aarch64-pc-windows-msvc",
"build-args": "--arm64",
"arch": "amd64_arm64",
"dir": "arm64"
},
"x86": {
"target": "i686-pc-windows-msvc",
"build-args": "--ia32",
@@ -60,14 +68,14 @@ jobs:
id: cache
uses: actions/cache@v3
with:
key: ${{ runner.os }}-${{ hashFiles('hakDependencies.json', 'electronVersion') }}
key: ${{ runner.os }}-${{ inputs.arch }}-${{ hashFiles('hakDependencies.json', 'electronVersion') }}
path: |
./.hak
- name: Set up build tools
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ inputs.arch }}
arch: ${{ steps.config.outputs.arch || inputs.arch }}
# ActiveTCL package on choco is from 2015,
# this one is newer but includes more than we need
@@ -89,6 +97,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
uses: actions-rs/toolchain@v1
with:
default: true
toolchain: stable
target: ${{ steps.config.outputs.target }}
@@ -98,7 +107,7 @@ jobs:
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --pure-lockfile"
run: "yarn install --frozen-lockfile"
- name: Build Natives
if: steps.cache.outputs.cache-hit != 'true'
@@ -125,7 +134,7 @@ jobs:
$LogConfig | Set-Content -Path ${{ env.INSTALL_DIR }}/log4net.config
# Configure
${{ env.INSTALL_DIR }}/eSignerCKATool.exe config -mode "${{ env.MODE }}" -user "${{ secrets.ESIGNER_USER_NAME }}" -pass "${{ secrets.ESIGNER_USER_PASSWORD }}" -totp "${{ secrets.ESIGNER_USER_TOTP }}" -key "${{ env.MASTER_KEY_FILE }}" -r
${{ env.INSTALL_DIR }}/eSignerCKATool.exe config -mode product -user "${{ secrets.ESIGNER_USER_NAME }}" -pass "${{ secrets.ESIGNER_USER_PASSWORD }}" -totp "${{ secrets.ESIGNER_USER_TOTP }}" -key "${{ env.MASTER_KEY_FILE }}" -r
${{ env.INSTALL_DIR }}/eSignerCKATool.exe unload
${{ env.INSTALL_DIR }}/eSignerCKATool.exe load
@@ -138,8 +147,6 @@ jobs:
$SubjectName = ($CodeSigningCert.Subject -replace ", ?", "`n" | ConvertFrom-StringData).CN
echo "config-args=--signtool-thumbprint '$Thumbprint' --signtool-subject-name '$SubjectName'" >> $env:GITHUB_OUTPUT
env:
# XXX: UPDATE THIS BEFORE WHEN GOING LIVE
MODE: sandbox
INSTALL_DIR: C:\Users\runneradmin\eSignerCKA
MASTER_KEY_FILE: C:\Users\runneradmin\eSignerCKA\master.key
@@ -154,8 +161,11 @@ jobs:
run: |
yarn ts-node scripts/generate-builder-config.ts ${{ steps.nightly.outputs.config-args }} ${{ steps.esigner.outputs.config-args }}
yarn build --publish never -w --config electron-builder.json ${{ steps.config.outputs.build-args }}
env:
SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.22000.0/x86/signtool.exe"
- name: Check app was signed successfully
if: inputs.sign != ''
run: |
. "$env:SIGNTOOL_PATH" verify /pa (get-item ./dist/squirrel-windows*/*.exe)
- name: Prepare artifacts for deployment
if: inputs.deploy-mode

51
.github/workflows/codeql.yml vendored Normal file
View File

@@ -0,0 +1,51 @@
name: "CodeQL"
on:
push:
branches: [ "develop", master, staging ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "develop" ]
schedule:
- cron: '19 9 * * 6'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
# We have a single C file for the rebrand_stub which we don't want/need to analyse
# but it prevents us from using the built-in CodeQL scanner
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Use only 'java' to analyze code written in Java, Kotlin or both
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
steps:
- name: Checkout repository
uses: actions/checkout@v3
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"

43
.github/workflows/dockerbuild.yaml vendored Normal file
View File

@@ -0,0 +1,43 @@
name: Dockerbuild
on:
workflow_dispatch: {}
push:
branches: [master, develop]
paths:
- "dockerbuild/**"
concurrency: ${{ github.workflow }}-${{ github.ref_name }}
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}-dockerbuild
jobs:
build:
name: Docker Build
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
- name: Log in to the Container registry
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
with:
context: dockerbuild
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

View File

@@ -18,7 +18,7 @@ on:
jobs:
deploy:
name: "Deploy"
if: github.event != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
environment: packages.element.io
env:

View File

@@ -2,7 +2,6 @@ name: Pull Request
on:
pull_request_target:
types: [opened, edited, labeled, unlabeled, synchronize]
concurrency: ${{ github.workflow }}-${{ github.event.pull_request.head.ref }}
jobs:
action:
uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop

91
.github/workflows/reprepro.yaml vendored Normal file
View File

@@ -0,0 +1,91 @@
on:
workflow_call:
inputs:
artifact-name:
type: string
required: true
description: "The name of the artifact containing the debs to include"
secrets:
GPG_PRIVATE_KEY:
required: false
GPG_PASSPHRASE:
required: false
CF_R2_ACCESS_KEY_ID:
required: false
CF_R2_TOKEN:
required: false
CF_R2_S3_API:
required: false
# Protect reprepro database using concurrency
concurrency: reprepro
jobs:
reprepro:
name: Deploy debian package
environment: packages.element.io
runs-on: ubuntu-latest
env:
R2_BUCKET: "packages-element-io"
R2_DB_BUCKET: packages-element-io-db
R2_URL: ${{ secrets.CF_R2_S3_API }}
steps:
- uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: dist
- name: Load GPG key
uses: crazy-max/ghaction-import-gpg@111c56156bcc6918c056dbef52164cfa583dc549 # v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
fingerprint: 75741890063E5E9A46135D01C2850B265AC085BD
- name: Install reprepro
run: sudo apt-get install -y reprepro
- name: Fetch database
run: aws s3 cp --recursive s3://$R2_DB_BUCKET debian/db/ --endpoint-url $R2_URL --region auto
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
- name: Run reprepro
run: |
grep Codename debian/conf/distributions | sed -n 's/Codename: //p' | while read -r target ; do
reprepro -b debian includedeb "$target" ./dist/*.deb
done
- name: Check repository works
run: |
# Download signing keyring
sudo wget -O /usr/share/keyrings/element-io-archive-keyring.gpg https://packages.element.io/debian/element-io-archive-keyring.gpg
# Point apt at local apt repo
echo "deb [signed-by=/usr/share/keyrings/element-io-archive-keyring.gpg] http://127.0.0.1:8000/debian/ default main" | sudo tee /etc/apt/sources.list.d/element-io.list
# Start http server and fetch from it via apt
python3 -m http.server 8000 --bind 127.0.0.1 &
sudo apt-get update --allow-insecure-repositories
killall python3
# Validate the package in the repo quacks like the one we expect
info=$(dpkg --info ../dist/*.deb)
package=$(echo "$info" | grep "Package:" | sed -n 's/ Package: //p')
version=$(echo "$info" | grep "Version:" | sed -n 's/ Version: //p')
apt-cache show "$package" | grep "Version: $version"
working-directory: ./packages.element.io
- name: Deploy debian repo
run: |
aws s3 cp --recursive packages.element.io/debian/ s3://$R2_BUCKET/debian --endpoint-url $R2_URL --region auto
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
- name: Store database
run: aws s3 cp --recursive debian/db/ s3://$R2_DB_BUCKET --endpoint-url $R2_URL --region auto
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}

View File

@@ -16,7 +16,7 @@ jobs:
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --pure-lockfile"
run: "yarn install --frozen-lockfile"
- name: Typecheck
run: "yarn run lint:types"
@@ -37,7 +37,7 @@ jobs:
# Does not need branch matching as only analyses this layer
- name: Install Deps
run: "yarn install --pure-lockfile"
run: "yarn install --frozen-lockfile"
- name: Run Linter
run: "yarn run lint:js"

View File

@@ -1,8 +1,123 @@
Changes in [1.11.24](https://github.com/vector-im/element-desktop/releases/tag/v1.11.24) (2023-02-28)
Changes in [1.11.29](https://github.com/vector-im/element-desktop/releases/tag/v1.11.29) (2023-04-11)
=====================================================================================================
## ✨ Features
* Ship linux tarball with static sqlcipher ([\#597](https://github.com/vector-im/element-desktop/pull/597)). Fixes vector-im/element-web#18486.
* Show recent room breadcrumbs on touchbar ([\#183](https://github.com/vector-im/element-desktop/pull/183)). Fixes vector-im/element-web#15998.
* Clear electron data when logging out ([\#578](https://github.com/vector-im/element-desktop/pull/578)).
* Send Electron crashpad reports to Sentry from Nightly ([\#579](https://github.com/vector-im/element-desktop/pull/579)). Fixes vector-im/element-web#18263.
* Recommend element-io-archive-keyring from our Debian package ([\#566](https://github.com/vector-im/element-desktop/pull/566)).
* Allow desktop app to expose recent rooms in UI integrations ([\#16940](https://github.com/vector-im/element-web/pull/16940)).
* Add API params to mute audio and/or video in Jitsi calls by default ([\#24820](https://github.com/vector-im/element-web/pull/24820)). Contributed by @dhenneke.
* Style mentions as pills in rich text editor ([\#10448](https://github.com/matrix-org/matrix-react-sdk/pull/10448)). Contributed by @alunturner.
* Show room create icon if "UIComponent.roomCreation" is enabled ([\#10364](https://github.com/matrix-org/matrix-react-sdk/pull/10364)). Contributed by @maheichyk.
* Mentions as links rte ([\#10463](https://github.com/matrix-org/matrix-react-sdk/pull/10463)). Contributed by @alunturner.
* Better error handling in jump to date ([\#10405](https://github.com/matrix-org/matrix-react-sdk/pull/10405)). Contributed by @MadLittleMods.
* Show "Invite" menu option if "UIComponent.sendInvites" is enabled. ([\#10363](https://github.com/matrix-org/matrix-react-sdk/pull/10363)). Contributed by @maheichyk.
* Added `UserProfilesStore`, `LruCache` and user permalink profile caching ([\#10425](https://github.com/matrix-org/matrix-react-sdk/pull/10425)). Fixes vector-im/element-web#10559.
* Mentions as links rte ([\#10422](https://github.com/matrix-org/matrix-react-sdk/pull/10422)). Contributed by @alunturner.
* Implement MSC3952: intentional mentions ([\#9983](https://github.com/matrix-org/matrix-react-sdk/pull/9983)).
* Implement MSC3973: Search users in the user directory with the Widget API ([\#10269](https://github.com/matrix-org/matrix-react-sdk/pull/10269)). Contributed by @dhenneke.
* Permalinks to message are now displayed as pills ([\#10392](https://github.com/matrix-org/matrix-react-sdk/pull/10392)). Fixes vector-im/element-web#24751 and vector-im/element-web#24706.
* Show search,dial,explore in filterContainer if "UIComponent.filterContainer" is enabled ([\#10381](https://github.com/matrix-org/matrix-react-sdk/pull/10381)). Contributed by @maheichyk.
* Increase space panel collapse clickable area ([\#6084](https://github.com/matrix-org/matrix-react-sdk/pull/6084)). Fixes vector-im/element-web#17379. Contributed by @jaiwanth-v.
* Add fallback for replies to Polls ([\#10380](https://github.com/matrix-org/matrix-react-sdk/pull/10380)). Fixes vector-im/element-web#24197. Contributed by @kerryarchibald.
* Permalinks to rooms and users are now pillified ([\#10388](https://github.com/matrix-org/matrix-react-sdk/pull/10388)). Fixes vector-im/element-web#24825.
* Poll history - access poll history from room settings ([\#10356](https://github.com/matrix-org/matrix-react-sdk/pull/10356)). Contributed by @kerryarchibald.
* Add API params to mute audio and/or video in Jitsi calls by default ([\#10376](https://github.com/matrix-org/matrix-react-sdk/pull/10376)). Contributed by @dhenneke.
* Notifications: inline error message on notifications saving error ([\#10288](https://github.com/matrix-org/matrix-react-sdk/pull/10288)). Contributed by @kerryarchibald.
* Support dynamic room predecessor in SpaceProvider ([\#10348](https://github.com/matrix-org/matrix-react-sdk/pull/10348)). Contributed by @andybalaam.
* Support dynamic room predecessors for RoomProvider ([\#10346](https://github.com/matrix-org/matrix-react-sdk/pull/10346)). Contributed by @andybalaam.
* Support dynamic room predecessors in OwnBeaconStore ([\#10339](https://github.com/matrix-org/matrix-react-sdk/pull/10339)). Contributed by @andybalaam.
* Support dynamic room predecessors in ForwardDialog ([\#10344](https://github.com/matrix-org/matrix-react-sdk/pull/10344)). Contributed by @andybalaam.
* Support dynamic room predecessors in SpaceHierarchy ([\#10341](https://github.com/matrix-org/matrix-react-sdk/pull/10341)). Contributed by @andybalaam.
* Support dynamic room predecessors in AddExistingToSpaceDialog ([\#10342](https://github.com/matrix-org/matrix-react-sdk/pull/10342)). Contributed by @andybalaam.
* Support dynamic room predecessors in leave-behaviour ([\#10340](https://github.com/matrix-org/matrix-react-sdk/pull/10340)). Contributed by @andybalaam.
* Support dynamic room predecessors in StopGapWidgetDriver ([\#10338](https://github.com/matrix-org/matrix-react-sdk/pull/10338)). Contributed by @andybalaam.
* Support dynamic room predecessors in WidgetLayoutStore ([\#10326](https://github.com/matrix-org/matrix-react-sdk/pull/10326)). Contributed by @andybalaam.
* Support dynamic room predecessors in SpaceStore ([\#10332](https://github.com/matrix-org/matrix-react-sdk/pull/10332)). Contributed by @andybalaam.
* Sync polls push rules on changes to account_data ([\#10287](https://github.com/matrix-org/matrix-react-sdk/pull/10287)). Contributed by @kerryarchibald.
* Support dynamic room predecessors in BreadcrumbsStore ([\#10295](https://github.com/matrix-org/matrix-react-sdk/pull/10295)). Contributed by @andybalaam.
* Improved a11y for Field feedback and Secure Phrase input ([\#10320](https://github.com/matrix-org/matrix-react-sdk/pull/10320)). Contributed by @Sebbones.
* Support dynamic room predecessors in RoomNotificationStateStore ([\#10297](https://github.com/matrix-org/matrix-react-sdk/pull/10297)). Contributed by @andybalaam.
## 🐛 Bug Fixes
* Run build_linux in docker using an older glibc ([\#599](https://github.com/vector-im/element-desktop/pull/599)). Fixes vector-im/element-web#24981.
* Use a newly generated access_token while joining Jitsi ([\#24646](https://github.com/vector-im/element-web/pull/24646)). Fixes vector-im/element-web#24687. Contributed by @emrahcom.
* Fix cloudflare action pointing at commit hash instead of tag ([\#24777](https://github.com/vector-im/element-web/pull/24777)). Contributed by @justjanne.
* Allow editing with RTE to overflow for autocomplete visibility ([\#10499](https://github.com/matrix-org/matrix-react-sdk/pull/10499)). Contributed by @alunturner.
* Added auto focus to Github URL on opening of debug logs modal ([\#10479](https://github.com/matrix-org/matrix-react-sdk/pull/10479)). Contributed by @ShivamSpm.
* Fix detection of encryption for all users in a room ([\#10487](https://github.com/matrix-org/matrix-react-sdk/pull/10487)). Fixes vector-im/element-web#24995.
* Properly generate mentions when editing a reply with MSC3952 ([\#10486](https://github.com/matrix-org/matrix-react-sdk/pull/10486)). Fixes vector-im/element-web#24924. Contributed by @kerryarchibald.
* Improve performance of rendering a room with many hidden events ([\#10131](https://github.com/matrix-org/matrix-react-sdk/pull/10131)). Contributed by @andybalaam.
* Prevent future date selection in jump to date ([\#10419](https://github.com/matrix-org/matrix-react-sdk/pull/10419)). Fixes vector-im/element-web#20800. Contributed by @MadLittleMods.
* Add aria labels to message search bar to improve accessibility ([\#10476](https://github.com/matrix-org/matrix-react-sdk/pull/10476)). Fixes vector-im/element-web#24921.
* Fix decryption failure bar covering the timeline ([\#10360](https://github.com/matrix-org/matrix-react-sdk/pull/10360)). Fixes vector-im/element-web#24780 vector-im/element-web#24074 and vector-im/element-web#24183. Contributed by @luixxiul.
* Improve profile picture settings accessibility ([\#10470](https://github.com/matrix-org/matrix-react-sdk/pull/10470)). Fixes vector-im/element-web#24919.
* Handle group call redaction ([\#10465](https://github.com/matrix-org/matrix-react-sdk/pull/10465)).
* Display relative timestamp for threads on the same calendar day ([\#10399](https://github.com/matrix-org/matrix-react-sdk/pull/10399)). Fixes vector-im/element-web#24841. Contributed by @kerryarchibald.
* Fix timeline list and paragraph display issues ([\#10424](https://github.com/matrix-org/matrix-react-sdk/pull/10424)). Fixes vector-im/element-web#24602. Contributed by @alunturner.
* Use unique keys for voice broadcast pips ([\#10457](https://github.com/matrix-org/matrix-react-sdk/pull/10457)). Fixes vector-im/element-web#24959.
* Fix "show read receipts sent by other users" not applying to threads ([\#10445](https://github.com/matrix-org/matrix-react-sdk/pull/10445)). Fixes vector-im/element-web#24910.
* Fix joining public rooms without aliases in search dialog ([\#10437](https://github.com/matrix-org/matrix-react-sdk/pull/10437)). Fixes vector-im/element-web#23937.
* Add input validation for `m.direct` in `DMRoomMap` ([\#10436](https://github.com/matrix-org/matrix-react-sdk/pull/10436)). Fixes vector-im/element-web#24909.
* Reduce height reserved for "collapse" button's line on IRC layout ([\#10211](https://github.com/matrix-org/matrix-react-sdk/pull/10211)). Fixes vector-im/element-web#24605. Contributed by @luixxiul.
* Fix `creatorUserId is required` error when opening sticker picker ([\#10423](https://github.com/matrix-org/matrix-react-sdk/pull/10423)).
* Fix block/inline Element descendants error noise in `NewRoomIntro.tsx` ([\#10412](https://github.com/matrix-org/matrix-react-sdk/pull/10412)). Contributed by @MadLittleMods.
* Fix profile resizer to make first character of a line selectable in IRC layout ([\#10396](https://github.com/matrix-org/matrix-react-sdk/pull/10396)). Fixes vector-im/element-web#14764. Contributed by @luixxiul.
* Ensure space between wrapped lines of room name on IRC layout ([\#10188](https://github.com/matrix-org/matrix-react-sdk/pull/10188)). Fixes vector-im/element-web#24742. Contributed by @luixxiul.
* Remove unreadable alt attribute from the room status bar warning icon (nonsense to screenreaders) ([\#10402](https://github.com/matrix-org/matrix-react-sdk/pull/10402)). Contributed by @MadLittleMods.
* Fix big date separators when jump to date is enabled ([\#10404](https://github.com/matrix-org/matrix-react-sdk/pull/10404)). Fixes vector-im/element-web#22969. Contributed by @MadLittleMods.
* Fixes user authentication when registering via the module API ([\#10257](https://github.com/matrix-org/matrix-react-sdk/pull/10257)). Contributed by @maheichyk.
* Handle more edge cases in Space Hierarchy ([\#10280](https://github.com/matrix-org/matrix-react-sdk/pull/10280)). Contributed by @justjanne.
* Further improve performance with lots of hidden events ([\#10353](https://github.com/matrix-org/matrix-react-sdk/pull/10353)). Fixes vector-im/element-web#24480. Contributed by @andybalaam.
* Respect user cancelling upload flow by dismissing spinner ([\#10373](https://github.com/matrix-org/matrix-react-sdk/pull/10373)). Fixes vector-im/element-web#24667.
* When starting a DM, the end-to-end encryption status icon does now only appear if the DM can be encrypted ([\#10394](https://github.com/matrix-org/matrix-react-sdk/pull/10394)). Fixes vector-im/element-web#24397.
* Fix `[object Object]` in feedback metadata ([\#10390](https://github.com/matrix-org/matrix-react-sdk/pull/10390)).
* Fix pinned messages card saying nothing pinned while loading ([\#10385](https://github.com/matrix-org/matrix-react-sdk/pull/10385)). Fixes vector-im/element-web#24615.
* Fix import e2e key dialog staying disabled after paste ([\#10375](https://github.com/matrix-org/matrix-react-sdk/pull/10375)). Fixes vector-im/element-web#24818.
* Show all labs even if incompatible, with appropriate tooltip explaining requirements ([\#10369](https://github.com/matrix-org/matrix-react-sdk/pull/10369)). Fixes vector-im/element-web#24813.
* Fix UIFeature.Registration not applying to all paths ([\#10371](https://github.com/matrix-org/matrix-react-sdk/pull/10371)). Fixes vector-im/element-web#24814.
* Clicking on a user pill does now only open the profile in the right panel and no longer navigates to the home view. ([\#10359](https://github.com/matrix-org/matrix-react-sdk/pull/10359)). Fixes vector-im/element-web#24797.
* Fix start DM with pending third party invite ([\#10347](https://github.com/matrix-org/matrix-react-sdk/pull/10347)). Fixes vector-im/element-web#24781.
* Fix long display name overflowing reply tile on IRC layout ([\#10343](https://github.com/matrix-org/matrix-react-sdk/pull/10343)). Fixes vector-im/element-web#24738. Contributed by @luixxiul.
* Display redacted body on ThreadView in the same way as normal messages ([\#9016](https://github.com/matrix-org/matrix-react-sdk/pull/9016)). Fixes vector-im/element-web#24729. Contributed by @luixxiul.
* Handle more edge cases in ACL updates ([\#10279](https://github.com/matrix-org/matrix-react-sdk/pull/10279)). Contributed by @justjanne.
* Allow parsing png files to fail if thumbnailing is successful ([\#10308](https://github.com/matrix-org/matrix-react-sdk/pull/10308)).
Changes in [1.11.28](https://github.com/vector-im/element-desktop/releases/tag/v1.11.28) (2023-03-31)
=====================================================================================================
## 🐛 Bug Fixes
* Fix broken lockfile. Fixes vector-im/element-web#25008.
Changes in [1.11.27](https://github.com/vector-im/element-desktop/releases/tag/v1.11.27) (2023-03-31)
=====================================================================================================
## 🐛 Bug Fixes
* Run build_linux in docker using an older glibc ([\#599](https://github.com/vector-im/element-desktop/pull/599)). Fixes vector-im/element-web#24981.
* Fix detection of encryption for all users in a room ([\#10487](https://github.com/matrix-org/matrix-react-sdk/pull/10487)). Fixes vector-im/element-web#24995.
Changes in [1.11.26](https://github.com/vector-im/element-desktop/releases/tag/v1.11.26) (2023-03-28)
=====================================================================================================
## 🔒 Security
* Fixes for [CVE-2023-28427](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-28427) / GHSA-mwq8-fjpf-c2gr
* Fixes for [CVE-2023-28103](https://cve.mitre.org/cgi-bin/cvekey.cgi?keyword=CVE-2023-28103) / GHSA-6g43-88cp-w5gv
Changes in [1.11.25](https://github.com/vector-im/element-desktop/releases/tag/v1.11.25) (2023-03-15)
=====================================================================================================
## ✨ Features
* Remove experimental PWA support for Firefox and Safari ([\#24630](https://github.com/vector-im/element-web/pull/24630)).
* Only allow to start a DM with one email if encryption by default is enabled ([\#10253](https://github.com/matrix-org/matrix-react-sdk/pull/10253)). Fixes vector-im/element-web#23133.
* DM rooms are now encrypted if encryption by default is enabled and only inviting a single email address. Any action in the result DM room will be blocked until the other has joined. ([\#10229](https://github.com/matrix-org/matrix-react-sdk/pull/10229)).
* Reduce bottom margin of ReplyChain on compact modern layout ([\#8972](https://github.com/matrix-org/matrix-react-sdk/pull/8972)). Fixes vector-im/element-web#22748. Contributed by @luixxiul.
* Support for v2 of MSC3903 ([\#10165](https://github.com/matrix-org/matrix-react-sdk/pull/10165)). Contributed by @hughns.
* When starting a DM, existing rooms with pending third-party invites will be reused. ([\#10256](https://github.com/matrix-org/matrix-react-sdk/pull/10256)). Fixes vector-im/element-web#23139.
* Polls push rules: synchronise poll rules with message rules ([\#10263](https://github.com/matrix-org/matrix-react-sdk/pull/10263)). Contributed by @kerryarchibald.
* New verification request toast button labels ([\#10259](https://github.com/matrix-org/matrix-react-sdk/pull/10259)).
* Remove padding around integration manager iframe ([\#10148](https://github.com/matrix-org/matrix-react-sdk/pull/10148)).
* Fix block code styling in rich text editor ([\#10246](https://github.com/matrix-org/matrix-react-sdk/pull/10246)). Contributed by @alunturner.
* Poll history: fetch more poll history ([\#10235](https://github.com/matrix-org/matrix-react-sdk/pull/10235)). Contributed by @kerryarchibald.
* Sort short/exact emoji matches before longer incomplete matches ([\#10212](https://github.com/matrix-org/matrix-react-sdk/pull/10212)). Fixes vector-im/element-web#23210. Contributed by @grimhilt.
@@ -14,6 +129,30 @@ Changes in [1.11.24](https://github.com/vector-im/element-desktop/releases/tag/v
* Support joining non-peekable rooms via the module API ([\#10154](https://github.com/matrix-org/matrix-react-sdk/pull/10154)). Contributed by @maheichyk.
* The "new login" toast does now display the same device information as in the settings. "No" does now open the device settings. "Yes, it was me" dismisses the toast. ([\#10200](https://github.com/matrix-org/matrix-react-sdk/pull/10200)).
* Do not prompt for a password when doing a „reset all“ after login ([\#10208](https://github.com/matrix-org/matrix-react-sdk/pull/10208)).
## 🐛 Bug Fixes
* Fix macOS notarisation using keychain credentials ([\#557](https://github.com/vector-im/element-desktop/pull/557)).
* Let electron-builder correctly set StartupWMClass ([\#526](https://github.com/vector-im/element-desktop/pull/526)). Fixes vector-im/element-web#13780.
* Fix incorrect copy in space creation flow ([\#10296](https://github.com/matrix-org/matrix-react-sdk/pull/10296)). Fixes vector-im/element-web#24741.
* Fix space settings dialog having rogue title tooltip ([\#10293](https://github.com/matrix-org/matrix-react-sdk/pull/10293)). Fixes vector-im/element-web#24740.
* Show spinner when starting a DM from the user profile (right panel) ([\#10290](https://github.com/matrix-org/matrix-react-sdk/pull/10290)).
* Reduce height of toggle on expanded view source event ([\#10283](https://github.com/matrix-org/matrix-react-sdk/pull/10283)). Fixes vector-im/element-web#22873. Contributed by @luixxiul.
* Pillify http and non-prefixed matrix.to links ([\#10277](https://github.com/matrix-org/matrix-react-sdk/pull/10277)). Fixes vector-im/element-web#20844.
* Fix some features not being configurable via `features` ([\#10276](https://github.com/matrix-org/matrix-react-sdk/pull/10276)).
* Fix starting a DM from the right panel in some cases ([\#10278](https://github.com/matrix-org/matrix-react-sdk/pull/10278)). Fixes vector-im/element-web#24722.
* Align info EventTile and normal EventTile on IRC layout ([\#10197](https://github.com/matrix-org/matrix-react-sdk/pull/10197)). Fixes vector-im/element-web#22782. Contributed by @luixxiul.
* Fix blowout of waveform of the voice message player on narrow UI ([\#8861](https://github.com/matrix-org/matrix-react-sdk/pull/8861)). Fixes vector-im/element-web#22604. Contributed by @luixxiul.
* Fix the hidden view source toggle on IRC layout ([\#10266](https://github.com/matrix-org/matrix-react-sdk/pull/10266)). Fixes vector-im/element-web#22872. Contributed by @luixxiul.
* Fix buttons on the room header being compressed due to long room name ([\#10155](https://github.com/matrix-org/matrix-react-sdk/pull/10155)). Contributed by @luixxiul.
* Use the room avatar as a placeholder in calls ([\#10231](https://github.com/matrix-org/matrix-react-sdk/pull/10231)).
* Fix calls showing as 'connecting' after hangup ([\#10223](https://github.com/matrix-org/matrix-react-sdk/pull/10223)).
* Prevent multiple Jitsi calls started at the same time ([\#10183](https://github.com/matrix-org/matrix-react-sdk/pull/10183)). Fixes vector-im/element-web#23009.
* Make localization keys compatible with agglutinative and/or SOV type languages ([\#10159](https://github.com/matrix-org/matrix-react-sdk/pull/10159)). Contributed by @luixxiul.
Changes in [1.11.24](https://github.com/vector-im/element-desktop/releases/tag/v1.11.24) (2023-02-28)
=====================================================================================================
## ✨ Features
* Display "The sender has blocked you from receiving this message" error message instead of "Unable to decrypt message" ([\#10202](https://github.com/matrix-org/matrix-react-sdk/pull/10202)). Contributed by @florianduros.
* Polls: show warning about undecryptable relations ([\#10179](https://github.com/matrix-org/matrix-react-sdk/pull/10179)). Contributed by @kerryarchibald.
* Poll history: fetch last 30 days of polls ([\#10157](https://github.com/matrix-org/matrix-react-sdk/pull/10157)). Contributed by @kerryarchibald.
@@ -27,12 +166,7 @@ Changes in [1.11.24](https://github.com/vector-im/element-desktop/releases/tag/v
* Render poll end events in timeline ([\#10027](https://github.com/matrix-org/matrix-react-sdk/pull/10027)). Contributed by @kerryarchibald.
## 🐛 Bug Fixes
* Let electron-builder correctly set StartupWMClass ([\#526](https://github.com/vector-im/element-desktop/pull/526)). Fixes vector-im/element-web#13780.
* Use the room avatar as a placeholder in calls ([\#10231](https://github.com/matrix-org/matrix-react-sdk/pull/10231)).
* Fix calls showing as 'connecting' after hangup ([\#10223](https://github.com/matrix-org/matrix-react-sdk/pull/10223)).
* Stop access token overflowing the box ([\#10069](https://github.com/matrix-org/matrix-react-sdk/pull/10069)). Fixes vector-im/element-web#24023. Contributed by @sbjaj33.
* Prevent multiple Jitsi calls started at the same time ([\#10183](https://github.com/matrix-org/matrix-react-sdk/pull/10183)). Fixes vector-im/element-web#23009.
* Make localization keys compatible with agglutinative and/or SOV type languages ([\#10159](https://github.com/matrix-org/matrix-react-sdk/pull/10159)). Contributed by @luixxiul.
* Add link to next file in the export ([\#10190](https://github.com/matrix-org/matrix-react-sdk/pull/10190)). Fixes vector-im/element-web#20272. Contributed by @grimhilt.
* Ended poll tiles: add ended the poll message ([\#10193](https://github.com/matrix-org/matrix-react-sdk/pull/10193)). Fixes vector-im/element-web#24579. Contributed by @kerryarchibald.
* Fix accidentally inverted condition for room ordering ([\#10178](https://github.com/matrix-org/matrix-react-sdk/pull/10178)). Fixes vector-im/element-web#24527. Contributed by @justjanne.

View File

@@ -1,8 +1,9 @@
# Docker image to facilitate building Element Desktop with native bits using a glibc version with broader compatibility
FROM buildpack-deps:bionic-curl
ENV DEBIAN_FRONTEND noninteractive
RUN curl -L https://yarnpkg.com/latest.tar.gz | tar xvz && mv yarn-* /yarn && ln -s /yarn/bin/yarn /usr/bin/yarn
RUN curl --proto "=https" -L https://yarnpkg.com/latest.tar.gz | tar xvz && mv yarn-* /yarn && ln -s /yarn/bin/yarn /usr/bin/yarn
RUN apt-get -qq update && apt-get -qq dist-upgrade && \
# add repo for git-lfs
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \
@@ -14,6 +15,8 @@ RUN apt-get -qq update && apt-get -qq dist-upgrade && \
apt-get -qq install --no-install-recommends qtbase5-dev bsdtar build-essential autoconf libssl-dev gcc-multilib g++-multilib lzip rpm python libcurl4 git git-lfs ssh unzip tcl \
libsecret-1-dev libgnome-keyring-dev \
libopenjp2-tools \
# Used by github actions \
jq grep \
# Used by seshat (when not SQLCIPHER_STATIC) \
libsqlcipher-dev && \
# git-lfs
@@ -34,7 +37,7 @@ ENV FORCE_COLOR true
ENV NODE_VERSION 16.18.1
# this package is used for snapcraft and we should not clear apt list - to avoid apt-get update during snap build
RUN curl -L https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz | tar xz -C /usr/local --strip-components=1 && \
RUN curl --proto "=https" -L https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz | tar xz -C /usr/local --strip-components=1 && \
unlink /usr/local/CHANGELOG.md && unlink /usr/local/LICENSE && unlink /usr/local/README.md && \
# https://github.com/npm/npm/issues/4531
npm config set unsafe-perm true

View File

@@ -2,7 +2,7 @@ The Desktop app is capable of self-updating on macOS and Windows.
The update server base url is configurable as `update_base_url` in config.json and can be served by a static file host,
CDN or object storage.
Currently all packaging & deployment is handled by https://github.com/vector-im/element-builder/
Currently all packaging & deployment is handled by [Github actions](https://github.com/vector-im/element-desktop/blob/develop/.github/workflows/build_and_deploy.yaml)
# Windows

View File

@@ -1,11 +1,14 @@
# Windows
## Requirements to build native modules
We rely on Github Actions `windows-latest` plus a few extra utilities as per [the workflow](https://github.com/vector-im/element-desktop/blob/develop/.github/workflows/build_windows.yaml).
If you want to build native modules, make sure that the following tools are installed on your system.
- [Git for Windows](https://git-scm.com/download/win)
- [Node 14](https://nodejs.org)
- [Node 16](https://nodejs.org)
- [Python 3](https://www.python.org/downloads/) (if you type 'python' into command prompt it will offer to install it from the windows store)
- [Strawberry Perl](https://strawberryperl.com/)
- [Rustup](https://rustup.rs/)

View File

@@ -0,0 +1,7 @@
Package: element-io-archive-keyring
Architecture: all
Section: contrib/meta
Maintainer: support@element.io
Priority: optional
Version: 1.1
Description: The packages.element.io repository keyring

View File

@@ -4,7 +4,7 @@ Vendor: support@element.io
Architecture: amd64
Maintainer: support@element.io
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0, libasound2, libgbm1
Recommends: libsqlcipher0
Recommends: libsqlcipher0, element-io-archive-keyring
Section: net
Priority: extra
Homepage: https://element.io/

View File

@@ -1,81 +0,0 @@
Origin: riot.im
Codename: default
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Suite: oldoldstable
Codename: jessie
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Suite: oldstable
Codename: stretch
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Suite: stable
Codename: buster
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Suite: testing
Codename: bullseye
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Suite: unstable
Codename: sid
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Codename: xenial
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Codename: bionic
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Codename: cosmic
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Codename: disco
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal
Origin: riot.im
Codename: eoan
Architectures: amd64 i386 source
Components: main
SignWith: D7B0B66941D01538
Tracking: minimal

View File

@@ -4,7 +4,7 @@ Vendor: support@element.io
Architecture: amd64
Maintainer: support@element.io
Depends: libgtk-3-0, libnotify4, libnss3, libxss1, libxtst6, xdg-utils, libatspi2.0-0, libuuid1, libsecret-1-0, libasound2, libgbm1
Recommends: libsqlcipher0
Recommends: libsqlcipher0, element-io-archive-keyring
Replaces: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)
Breaks: riot-desktop (<< 1.7.0), riot-web (<< 1.7.0)
Section: net

View File

@@ -22,6 +22,15 @@ import fsExtra from "fs-extra";
import HakEnv from "../../scripts/hak/hakEnv";
import { DependencyInfo } from "../../scripts/hak/dep";
type WinConfiguration =
| "VC-WIN32"
| "VC-WIN64A"
| "VC-WIN64-ARM"
| "VC-WIN64-CLANGASM-ARM"
| "VC-CLANG-WIN64-CLANGASM-ARM"
| "VC-WIN32-HYBRIDCRT"
| "VC-WIN64A-HYBRIDCRT";
export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
if (hakEnv.isWin()) {
await buildOpenSslWin(hakEnv, moduleInfo);
@@ -36,7 +45,18 @@ async function buildOpenSslWin(hakEnv: HakEnv, moduleInfo: DependencyInfo): Prom
const version = moduleInfo.cfg.dependencies.openssl;
const openSslDir = path.join(moduleInfo.moduleTargetDotHakDir, `openssl-${version}`);
const openSslArch = hakEnv.getTargetArch() === "x64" ? "VC-WIN64A" : "VC-WIN32";
let openSslArch: WinConfiguration;
switch (hakEnv.getTargetArch()) {
case "x64":
openSslArch = "VC-WIN64A";
break;
case "ia32":
openSslArch = "VC-WIN32";
break;
case "arm64":
openSslArch = "VC-WIN64-ARM";
break;
}
console.log("Building openssl in " + openSslDir);
await new Promise<void>((resolve, reject) => {

View File

@@ -2,7 +2,7 @@
"name": "element-desktop",
"productName": "Element",
"main": "lib/electron-main.js",
"version": "1.11.24",
"version": "1.11.29",
"description": "A feature-rich client for Matrix.org",
"author": "Element",
"repository": {
@@ -11,6 +11,9 @@
},
"license": "Apache-2.0",
"files": [],
"engines": {
"node": ">=16.0.0"
},
"scripts": {
"i18n": "matrix-gen-i18n",
"prunei18n": "matrix-prune-i18n",
@@ -52,8 +55,10 @@
"test": "jest"
},
"dependencies": {
"@sentry/electron": "^4.3.0",
"auto-launch": "^5.0.5",
"counterpart": "^0.18.6",
"electron-clear-data": "^1.0.5",
"electron-store": "^8.0.2",
"electron-window-state": "^5.0.3",
"minimist": "^1.2.6",
@@ -65,7 +70,7 @@
"@babel/core": "^7.18.10",
"@babel/preset-env": "^7.18.10",
"@babel/preset-typescript": "^7.18.6",
"@electron/asar": "^3.2.0",
"@electron/asar": "^3.2.3",
"@electron/notarize": "^1.2.3",
"@types/auto-launch": "^5.0.1",
"@types/counterpart": "^0.18.1",
@@ -73,31 +78,30 @@
"@types/jest": "^29.0.0",
"@types/minimist": "^1.2.1",
"@types/mkdirp": "^1.0.2",
"@types/node": "16.18.12",
"@types/node": "16.18.23",
"@types/pacote": "^11.1.1",
"@types/rimraf": "^3.0.2",
"@types/tar": "^6.1.3",
"@typescript-eslint/eslint-plugin": "^5.42.0",
"@typescript-eslint/parser": "^5.42.0",
"allchange": "^1.0.6",
"app-builder-lib": "^22.14.10",
"app-builder-lib": "24.0.0",
"babel-jest": "^29.0.0",
"chokidar": "^3.5.2",
"detect-libc": "^1.0.3",
"electron": "^23.0.0",
"electron-builder": "^23.6.0",
"electron-builder-squirrel-windows": "^23.6.0",
"electron-devtools-installer": "^3.1.1",
"electron": "^24.0.0",
"electron-builder": "24.0.0",
"electron-builder-squirrel-windows": "24.1.2",
"electron-devtools-installer": "^3.2.0",
"eslint": "^8.26.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-matrix-org": "^1.0.0",
"eslint-plugin-unicorn": "^45.0.0",
"eslint-plugin-unicorn": "^46.0.0",
"expect-playwright": "^0.8.0",
"find-npm-prefix": "^1.0.2",
"fs-extra": "^11.0.0",
"glob": "^8.0.0",
"glob": "^9.0.0",
"jest": "^29.0.0",
"matrix-web-i18n": "^1.3.0",
"mkdirp": "^2.0.0",
@@ -105,18 +109,18 @@
"pacote": "^15.0.0",
"playwright": "^1.25.0",
"prettier": "^2.8.1",
"rimraf": "^3.0.2",
"rimraf": "^4.4.1",
"tar": "^6.1.2",
"ts-jest": "^29.0.0",
"ts-node": "^10.9.1",
"typescript": "4.9.5"
"typescript": "5.0.3"
},
"hakDependencies": {
"matrix-seshat": "^2.3.3",
"keytar": "^7.9.0"
},
"resolutions": {
"@types/node": "16.18.12"
"@types/node": "16.18.23"
},
"build": {
"appId": "im.riot.app",
@@ -146,19 +150,18 @@
},
"mac": {
"category": "public.app-category.social-networking",
"darkModeSupport": true
"darkModeSupport": true,
"gatekeeperAssess": true
},
"win": {
"target": [
"squirrel"
],
"sign": "scripts/electron_winSign"
]
},
"directories": {
"output": "dist"
},
"afterPack": "scripts/electron_afterPack",
"afterSign": "scripts/electron_afterSign",
"protocols": [
{
"name": "element",

View File

@@ -24,35 +24,69 @@ zj97Y0WRPkAagJzeesIx/M4pjYg9zDIZ22NWT9d7KAZemLVtREwWM4zKYEI0Hpid
GxR8jQ1rCc9RMVdO6xuhnVwUD/JyNEgtRKbBJX9qIH2Z30rvIg7ev9MJG6g52cDy
+inNdxh4u4vpqQjjLTBraRalUe/4S4I8EaUFya91RWDLrEcmgdYfrqXbLMAEcPWS
cYQdjW3ADEy47rGQ2SeaZweLuHGVx68hCcJx5E0X7eE32R8uaRjmEzgvU+wZKo0y
HFbLsQok8v7NqoqtuQGNBFy1FtQBDADPalE7/hP0kt7afhFoY/sGyO/464BA4Ozo
MaQC28d4JJCd07upnyj1aLGHfYyO6TXC1cqOQ2tThENyTfJOhVDQ9YCjqDzm4S5V
R91tNzvYNZOEIwRRPND2jpnmsCzwrnIRHNIiojHBZRnPdC01zcx4oC1m13qDiFSU
NOi/uDlAXtOf8p0zVnPypaGTG7MUBU8RmkyygvG+Z6AqNDOsDL/nIC5mf2zmLJqK
VkEeXnWhWBEVgIdr840vi/ejblmVRxanlyGVFY/5CWgylmGxxB0Oh5vz7SjpK5H5
pONBo43K2tEjnU1jmWTX7tkHYo8wyQS04uO33qh01FLnYl1I0qebfwBys88i/yhr
9afxcXae5xTLUPzPp+6WYICxRdJ41/3zwlyKbNLvyNQzv43kiRYNR3Yc44F1tHMq
1Ty3kca7Qe0zGXXeISY3fUA4zKjg0S8bi3yfO5Z/FxpMhjJ+tAcDoiVrXZwsXCsd
MnQR0KVjzIAmCuJI7OUnujuAB9aMYSEAEQEAAYkD8gQYAQoAJgIbAhYhBBLUzWAM
IkCp9KggcdewtmlB0BU4BQJgd9oUBQkHh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oNGK+n9kdtbrGb9kLfMarAvx1/GTHC6b9oQ50bQ6Igk
KOQ1/miIFEhO+ksiqQ==
=OOgy
-----END PGP PUBLIC KEY BLOCK-----

View File

Binary file not shown.

View File

@@ -1,65 +0,0 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBFy1FpcBEADemFRfa16qbsgvnEq5TPhFOssXfSLG4eGBrU0O6adDwv6QyE53
fivsepaZ21xLXP8KdfJBe40XmsYDLk6I+1cQIoKLCDhN/omaCivJ0QwsHKFqdhsD
0mmGpRzN1nNXOV856tcWsj25T4V2ttPumvCV/ArITta0X2GPbF2oYKbKjE93uZWR
xogqHrD7QVzjlDvU6+gQ/TzIA/k0cG/LlOqhHTrR/VMvSzE9LDn2YoWaC2Hk2NZE
Uby788vombTgPhTrCUmQwDsaXYUfILLhaiAdCqNc3aMcNjc3VX1YjJG0pArx9V2N
RPMR2UZQzSLgthEz/om9k7x9A9RG85Jo2AAmjrpIl4NRawpKP+uXtIdr4huCzWT4
r8e1DiMORKRvRPzua/kf+i8vjKWy16KRD5N6rNOTjfoSQxkQTgh9fvLgJUAJ+UnL
gLKXaijyyIisQ6O2zaI5jJMuSzBG129xpdCeNB0Vmfuy8fBGttTg+OoP1mhnQtDA
mh7k5EefFKDoKKgt2m+C6nlLr7pG9EA5qMHbQikmZo33phi/yIIU0w8RahueC7A1
rCvDla+lr9Y2o0Y+2VGTqkc37WadiCcF6DZ/rKMoajgafbJV3QsVBdD0rraqLfvK
/+UfbbJuZdxb7LtBMGL35ENrVfFNZDiEFJs0eumDCk/KLGBVlL25PH6kIwARAQAB
tCNyaW90LmltIHBhY2thZ2VzIDxwYWNrYWdlc0ByaW90LmltPokCVAQTAQoAPhYh
BBLUzWAMIkCp9KggcdewtmlB0BU4BQJctRaXAhsDBQkJZgGABQsJCAcCBhUKCQgL
AgQWAgMBAh4BAheAAAoJENewtmlB0BU49RsP/2wqPjk4VDhAf10oP2HWyE98nfGm
SriZFQgewbvgwWzXMdIkGpKG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5Lk54o5o8Q9Z9R7s1R39Yncaq+0+IX748wQMG
I8GbmDCt+Dw133E2hGe1Fmg4okNwnb+GEfn7jM9bng7xnjEFo4aNtZhMzErD8z2x
GYci9dVxCZZ0+EI4g/VdCd0mgExeEACPH4USF03wP8EcSSKs6DXtCHPv+PqEMD6w
0AckI2scEKQ0b45xY4ASEytQlHDpZ+HQLJ22JJ2WT9z+ZL6KC2mAafW5GTpyL6Vl
WbikiN4V2ueIV3Z1sW9m5342RmqM7OKum2F2phrWfauQxRxwp+bCU7TfbF+PNedb
dqsyXNLUdgM01GnjTL5sWNp3GJPC22RBjC1Ssc9+e+sde2/HkoBbpCd0xc7wN6cP
O+SpGJSkWnvOfEnBLGwk8fLZz3wfwVZe8A8tmPMrQNievnPvoz2urkkFYaZ8bOLt
YRK/3RtALnz4fpuwqOwNdPOGbXVhXPQZ7euJ7pCuIbCbcYxYJJd1UdFMnFB/YkXB
s/O7TOQzoIEGlNBLzg8d6rnm+Hg8o/PrKwLqYTgvrjSm2DbbP0T38tlgxM2JNP9+
AELqcgvafnaq0H+jGvM2gCu70Jv0qfzuK9BYiR4kOAq9vT2D8doWDOF4yX71KT81
ntz4qHNRyf7foTIDpxQ1QgYGtpJ3yjp4tcoElFbHBDIZ6TcPh4xP8Yw8AkvvsnYG
ARxZDEF+FfH6mikEJSoa6++byxdkmVuQzTj0ZSNev4Z68MF1NhV3vZP2GjQte14v
v+o35cEMLqEybxi6EPBLbl1B841zDty55Jp6QjK9uAxcCLHZiN5ffK6lKvdRBhT0
l91/+ZrRJQ==
=kDqh
-----END PGP PUBLIC KEY BLOCK-----

View File

@@ -1,40 +0,0 @@
const { notarize } = require("@electron/notarize");
let warned = false;
exports.default = async function (context) {
const { electronPlatformName, appOutDir } = context;
const appId = context.packager.info.appInfo.id;
if (electronPlatformName === "darwin") {
const appName = context.packager.appInfo.productFilename;
const notarizeToolCredentials = {};
if (process.env.NOTARIZE_KEYCHAIN_PROFILE) {
notarizeToolCredentials.keychainProfile = process.env.NOTARIZE_KEYCHAIN_PROFILE;
notarizeToolCredentials.keychain = process.env.NOTARIZE_KEYCHAIN;
} if (process.env.NOTARIZE_APPLE_ID && process.env.NOTARIZE_APPLE_ID_PASSWORD && process.env.NOTARIZE_TEAM_ID) {
notarizeToolCredentials.appleId = process.env.NOTARIZE_APPLE_ID;
notarizeToolCredentials.appleIdPassword = process.env.NOTARIZE_APPLE_ID_PASSWORD;
notarizeToolCredentials.teamId = process.env.NOTARIZE_TEAM_ID;
} else {
if (!warned) {
console.log("*****************************************");
console.log("* This build will NOT be notarised. *");
console.log("* Provide NOTARIZE_KEYCHAIN_PROFILE or *");
console.log("* NOTARIZE_APPLE_ID, NOTARIZE_TEAM_ID *");
console.log("* and NOTARIZE_APPLE_ID_PASSWORD *");
console.log("*****************************************");
warned = true;
}
return;
}
console.log("Notarising macOS app. This may be some time.");
return await notarize({
tool: "notarytool",
appBundleId: appId,
appPath: `${appOutDir}/${appName}.app`,
...notarizeToolCredentials,
});
}
};

View File

@@ -1,78 +0,0 @@
const { execFile } = require("child_process");
// Loosely based on computeSignToolArgs from app-builder-lib/src/codeSign/windowsCodeSign.ts
function computeSignToolArgs(options, keyContainer) {
const args = [];
if (process.env.ELECTRON_BUILDER_OFFLINE !== "true") {
const timestampingServiceUrl = options.options.timeStampServer || "http://timestamp.digicert.com";
args.push(
options.isNest || options.hash === "sha256" ? "/tr" : "/t",
options.isNest || options.hash === "sha256"
? options.options.rfc3161TimeStampServer || "http://timestamp.comodoca.com/rfc3161"
: timestampingServiceUrl,
);
}
args.push("/kc", keyContainer);
// To use the hardware token (this should probably be less hardcoded)
args.push("/csp", "eToken Base Cryptographic Provider");
// The certificate file. Somehow this appears to be the only way to specify
// the cert that works. If you specify the subject name or hash, it will
// say it can't associate the private key to the certificate.
// TODO: Find a way to pass this through from the electron-builder config
// so we don't have to hard-code this here
// fwiw https://stackoverflow.com/questions/17927895/automate-extended-validation-ev-code-signing
// is about the most useful resource on automating code signing...
args.push("/f", "element.io\\New_Vector_Ltd.pem");
if (options.hash !== "sha1") {
args.push("/fd", options.hash);
if (process.env.ELECTRON_BUILDER_OFFLINE !== "true") {
args.push("/td", "sha256");
}
}
// msi does not support dual-signing
if (options.isNest) {
args.push("/as");
}
// https://github.com/electron-userland/electron-builder/issues/2875#issuecomment-387233610
args.push("/debug");
// must be last argument
args.push(options.path);
return args;
}
let warned = false;
exports.default = async function (options) {
const keyContainer = process.env.SIGNING_KEY_CONTAINER;
if (keyContainer === undefined) {
if (!warned) {
console.warn(
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" +
"! Skipping Windows signing. !\n" +
"! SIGNING_KEY_CONTAINER not defined. !\n" +
"!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!",
);
warned = true;
}
return;
}
return new Promise((resolve, reject) => {
const args = ["sign"].concat(computeSignToolArgs(options, keyContainer));
execFile("signtool", args, {}, (error, stdout) => {
if (error) {
console.error("signtool failed with code " + error);
reject("signtool failed with code " + error);
console.log(stdout);
} else {
resolve();
}
});
});
};

View File

@@ -4,7 +4,7 @@ import * as path from "path";
import { createWriteStream, promises as fs } from "fs";
import * as childProcess from "child_process";
import tar from "tar";
import * as asar from "asar";
import * as asar from "@electron/asar";
import fetch from "node-fetch";
import { promises as stream } from "stream";

View File

@@ -7,6 +7,9 @@
* On Windows:
* Prefixes the nightly version with `0.0.1-nightly.` as it breaks if it is not semver
*
* On macOS:
* Passes --notarytool-team-id to build.mac.notarize.notarize if specified
*
* On Linux:
* Replaces spaces in the product name with dashes as spaces in paths can cause issues
* Passes --deb-custom-control to build.deb.fpm if specified
@@ -15,6 +18,7 @@
import parseArgs from "minimist";
import fsProm from "fs/promises";
import * as os from "os";
import { Configuration } from "app-builder-lib";
const ELECTRON_BUILDER_CFG_FILE = "electron-builder.json";
@@ -25,54 +29,23 @@ const argv = parseArgs<{
"nightly"?: string;
"signtool-thumbprint"?: string;
"signtool-subject-name"?: string;
"notarytool-team-id"?: string;
"deb-custom-control"?: string;
"deb-changelog"?: string;
}>(process.argv.slice(2), {
string: ["nightly", "deb-custom-control", "signtool-thumbprint", "signtool-subject-name"],
string: [
"nightly",
"deb-custom-control",
"deb-changelog",
"signtool-thumbprint",
"signtool-subject-name",
"notarytool-team-id",
],
});
interface File {
from: string;
to: string;
}
type DeepWriteable<T> = { -readonly [P in keyof T]: DeepWriteable<T[P]> };
interface PackageBuild {
appId: string;
asarUnpack: string;
files: Array<string | File>;
extraResources: Array<string | File>;
linux: {
target: string;
category: string;
maintainer: string;
desktop: {
StartupWMClass: string;
};
};
mac: {
category: string;
darkModeSupport: boolean;
};
win: {
target: {
target: string;
};
sign?: string;
signingHashAlgorithms?: string[];
certificateSubjectName?: string;
certificateSha1?: string;
};
deb?: {
fpm?: string[];
};
directories: {
output: string;
};
afterPack: string;
afterSign: string;
protocols: Array<{
name: string;
schemes: string[];
}>;
interface PackageBuild extends DeepWriteable<Omit<Configuration, "extraMetadata">> {
extraMetadata?: {
productName?: string;
name?: string;
@@ -114,10 +87,15 @@ async function main(): Promise<number | void> {
}
if (argv["signtool-thumbprint"] && argv["signtool-subject-name"]) {
delete cfg.win.sign;
cfg.win.signingHashAlgorithms = ["sha256"];
cfg.win.certificateSubjectName = argv["signtool-subject-name"];
cfg.win.certificateSha1 = argv["signtool-thumbprint"];
cfg.win!.signingHashAlgorithms = ["sha256"];
cfg.win!.certificateSubjectName = argv["signtool-subject-name"];
cfg.win!.certificateSha1 = argv["signtool-thumbprint"];
}
if (argv["notarytool-team-id"]) {
cfg.mac!.notarize = {
teamId: argv["notarytool-team-id"],
};
}
if (os.platform() === "linux") {
@@ -125,10 +103,15 @@ async function main(): Promise<number | void> {
// https://github.com/vector-im/element-web/issues/13171
cfg.extraMetadata!.productName = cfg.extraMetadata!.productName!.replace(/ /g, "-");
cfg.deb = {
fpm: [],
};
if (argv["deb-custom-control"]) {
cfg.deb = {
fpm: [`--deb-custom-control=${argv["deb-custom-control"]}`],
};
cfg.deb.fpm!.push(`--deb-custom-control=${argv["deb-custom-control"]}`);
}
if (argv["deb-changelog"]) {
cfg.deb.fpm!.push(`--deb-changelog=${argv["deb-changelog"]}`);
}
}

View File

@@ -21,33 +21,7 @@ import { DependencyInfo } from "./dep";
import HakEnv from "./hakEnv";
export default async function clean(hakEnv: HakEnv, moduleInfo: DependencyInfo): Promise<void> {
await new Promise<void>((resolve, reject) => {
rimraf(moduleInfo.moduleDotHakDir, (err?: Error | null) => {
if (err) {
reject(err);
} else {
resolve();
}
});
});
await new Promise<void>((resolve, reject) => {
rimraf(path.join(hakEnv.dotHakDir, "links", moduleInfo.name), (err?: Error | null) => {
if (err) {
reject(err);
} else {
resolve();
}
});
});
await new Promise<void>((resolve, reject) => {
rimraf(path.join(hakEnv.projectRoot, "node_modules", moduleInfo.name), (err?: Error | null) => {
if (err) {
reject(err);
} else {
resolve();
}
});
});
await rimraf(moduleInfo.moduleDotHakDir);
await rimraf(path.join(hakEnv.dotHakDir, "links", moduleInfo.name));
await rimraf(path.join(hakEnv.projectRoot, "node_modules", moduleInfo.name));
}

View File

@@ -18,7 +18,7 @@ import path from "path";
import fsProm from "fs/promises";
import childProcess from "child_process";
import rimraf from "rimraf";
import glob from "glob";
import { glob } from "glob";
import mkdirp from "mkdirp";
import HakEnv from "./hakEnv";
@@ -33,11 +33,7 @@ export default async function copy(hakEnv: HakEnv, moduleInfo: DependencyInfo):
try {
await mkdirp(moduleInfo.moduleOutDir);
process.chdir(moduleInfo.moduleOutDir);
await new Promise<void>((resolve, reject) => {
rimraf(moduleInfo.cfg.prune, {}, (err) => {
err ? reject(err) : resolve();
});
});
await rimraf(moduleInfo.cfg.prune);
} finally {
process.chdir(oldCwd);
}
@@ -47,18 +43,8 @@ export default async function copy(hakEnv: HakEnv, moduleInfo: DependencyInfo):
// If there are multiple moduleBuildDirs, singular moduleBuildDir
// is the same as moduleBuildDirs[0], so we're just listing the contents
// of the first one.
const files = await new Promise<string[]>((resolve, reject) => {
glob(
moduleInfo.cfg.copy,
{
nosort: true,
silent: true,
cwd: moduleInfo.moduleBuildDir,
},
(err, files) => {
err ? reject(err) : resolve(files);
},
);
const files = await glob(moduleInfo.cfg.copy, {
cwd: moduleInfo.moduleBuildDir,
});
if (moduleInfo.moduleBuildDirs.length > 1) {

View File

@@ -25,6 +25,7 @@ export type TargetId =
| "universal-apple-darwin"
| "i686-pc-windows-msvc"
| "x86_64-pc-windows-msvc"
| "aarch64-pc-windows-msvc"
| "i686-unknown-linux-musl"
| "i686-unknown-linux-gnu"
| "x86_64-unknown-linux-musl"
@@ -98,6 +99,13 @@ const x8664PcWindowsMsvc: WindowsTarget = {
vcVarsArch: "amd64",
};
const aarch64WindowsMsvc: WindowsTarget = {
id: "aarch64-pc-windows-msvc",
platform: "win32",
arch: "arm64",
vcVarsArch: "arm64",
};
const x8664UnknownLinuxGnu: LinuxTarget = {
id: "x86_64-unknown-linux-gnu",
platform: "linux",
@@ -162,6 +170,7 @@ export const TARGETS: Record<TargetId, Target> = {
// Windows
"i686-pc-windows-msvc": i686PcWindowsMsvc,
"x86_64-pc-windows-msvc": x8664PcWindowsMsvc,
"aarch64-pc-windows-msvc": aarch64WindowsMsvc,
// Linux
"i686-unknown-linux-musl": i686UnknownLinuxMusl,
"i686-unknown-linux-gnu": i686UnknownLinuxGnu,

View File

@@ -6,7 +6,7 @@
*/
import { promises as fs } from "fs";
import * as asar from "asar";
import * as asar from "@electron/asar";
import * as childProcess from "child_process";
export async function versionFromAsar(): Promise<string> {

View File

@@ -9,7 +9,7 @@
"strict": true,
"lib": ["es2019", "dom"]
},
"include": ["./**/*.ts"],
"include": ["../src/@types", "./**/*.ts"],
"ts-node": {
"transpileOnly": true
}

6
src/@types/glob.d.ts vendored Normal file
View File

@@ -0,0 +1,6 @@
import { GlobOptions } from "glob";
declare module "glob" {
// Workaround for @electron/asar importing IOptions instead of GlobOptions
export type IOptions = GlobOptions;
}

View File

@@ -19,7 +19,8 @@ limitations under the License.
// Squirrel on windows starts the app with various flags as hooks to tell us when we've been installed/uninstalled etc.
import "./squirrelhooks";
import { app, BrowserWindow, Menu, autoUpdater, protocol, dialog } from "electron";
import { app, BrowserWindow, Menu, autoUpdater, protocol, dialog, Input } from "electron";
import * as Sentry from "@sentry/electron/main";
import AutoLaunch from "auto-launch";
import path from "path";
import windowStateKeeper from "electron-window-state";
@@ -38,18 +39,11 @@ import webContentsHandler from "./webcontents-handler";
import * as updater from "./updater";
import { getProfileFromDeeplink, protocolInit } from "./protocol";
import { _t, AppLocalization } from "./language-helper";
import Input = Electron.Input;
const argv = minimist(process.argv, {
alias: { help: "h" },
});
// Things we need throughout the file but need to be created
// async to are initialised in setupGlobals()
let asarPath: string;
let resPath: string;
let iconPath: string;
if (argv["help"]) {
console.log("Options:");
console.log(" --profile-dir {path}: Path to where to store the profile.");
@@ -119,28 +113,32 @@ async function tryPaths(name: string, root: string, rawPaths: string[]): Promise
const homeserverProps = ["default_is_url", "default_hs_url", "default_server_name", "default_server_config"] as const;
// Find the webapp resources and set up things that require them
async function setupGlobals(): Promise<void> {
// find the webapp asar.
asarPath = await tryPaths("webapp", __dirname, [
// If run from the source checkout, this will be in the directory above
"../webapp.asar",
// but if run from a packaged application, electron-main.js will be in
// a different asar file so it will be two levels above
"../../webapp.asar",
// also try without the 'asar' suffix to allow symlinking in a directory
"../webapp",
// from a packaged application
"../../webapp",
]);
let asarPathPromise: Promise<string> | undefined;
// Get the webapp resource file path, memoizes result
function getAsarPath(): Promise<string> {
if (!asarPathPromise) {
asarPathPromise = tryPaths("webapp", __dirname, [
// If run from the source checkout, this will be in the directory above
"../webapp.asar",
// but if run from a packaged application, electron-main.js will be in
// a different asar file, so it will be two levels above
"../../webapp.asar",
// also try without the 'asar' suffix to allow symlinking in a directory
"../webapp",
// from a packaged application
"../../webapp",
]);
}
// we assume the resources path is in the same place as the asar
resPath = await tryPaths("res", path.dirname(asarPath), [
// If run from the source checkout
"res",
// if run from packaged application
"",
]);
return asarPathPromise;
}
// Loads the config from asar, and applies a config.json from userData atop if one exists
// Writes config to `global.vectorConfig`. Does nothing if `global.vectorConfig` is already set.
async function loadConfig(): Promise<void> {
if (global.vectorConfig) return;
const asarPath = await getAsarPath();
try {
// eslint-disable-next-line @typescript-eslint/no-var-requires
@@ -168,7 +166,7 @@ async function setupGlobals(): Promise<void> {
.reduce((obj, key) => {
obj[key] = global.vectorConfig[key];
return obj;
}, {} as Omit<Partial<typeof global["vectorConfig"]>, keyof typeof homeserverProps>);
}, {} as Omit<Partial<(typeof global)["vectorConfig"]>, keyof typeof homeserverProps>);
}
global.vectorConfig = Object.assign(global.vectorConfig, localConfig);
@@ -186,13 +184,41 @@ async function setupGlobals(): Promise<void> {
// Could not load local config, this is expected in most cases.
}
}
// Configure Electron Sentry and crashReporter using sentry.dsn in config.json if one is present.
async function configureSentry(): Promise<void> {
await loadConfig();
const { dsn, environment } = global.vectorConfig.sentry || {};
if (dsn) {
console.log(`Enabling Sentry with dsn=${dsn} environment=${environment}`);
Sentry.init({
dsn,
environment,
// We don't actually use this IPC, but we do not want Sentry injecting preloads
ipcMode: Sentry.IPCMode.Classic,
});
}
}
// Set up globals for Tray and AutoLaunch
async function setupGlobals(): Promise<void> {
const asarPath = await getAsarPath();
await loadConfig();
// we assume the resources path is in the same place as the asar
const resPath = await tryPaths("res", path.dirname(asarPath), [
// If run from the source checkout
"res",
// if run from packaged application
"",
]);
// The tray icon
// It's important to call `path.join` so we don't end up with the packaged asar in the final path.
const iconFile = `element.${process.platform === "win32" ? "ico" : "png"}`;
iconPath = path.join(resPath, "img", iconFile);
global.trayConfig = {
icon_path: iconPath,
icon_path: path.join(resPath, "img", iconFile),
brand: global.vectorConfig.brand || "Element",
};
@@ -206,9 +232,9 @@ async function setupGlobals(): Promise<void> {
});
}
// Look for an auto-launcher under 'Riot' and if we find one,
// port its enabled/disabled-ness over to the new 'Element' launcher
async function moveAutoLauncher(): Promise<void> {
// Look for an auto-launcher under 'Riot' and if we find one, port it's
// enabled/disabled-ness over to the new 'Element' launcher
if (!global.vectorConfig.brand || global.vectorConfig.brand === "Element") {
const oldLauncher = new AutoLaunch({
name: "Riot",
@@ -261,6 +287,8 @@ const warnBeforeExit = (event: Event, input: Input): void => {
}
};
configureSentry();
// handle uncaught errors otherwise it displays
// stack traces in popup dialogs, which is terrible (which
// it will do any time the auto update poke fails, and there's
@@ -322,7 +350,10 @@ if (global.store.get("disableHardwareAcceleration", false) === true) {
}
app.on("ready", async () => {
let asarPath: string;
try {
asarPath = await getAsarPath();
await setupGlobals();
await moveAutoLauncher();
} catch (e) {
@@ -422,7 +453,7 @@ app.on("ready", async () => {
// https://www.electronjs.org/docs/faq#the-font-looks-blurry-what-is-this-and-what-can-i-do
backgroundColor: "#fff",
icon: iconPath,
icon: global.trayConfig.icon_path,
show: false,
autoHideMenuBar: global.store.get("autoHideMenuBar", true),

47
src/i18n/strings/cs.json Normal file
View File

@@ -0,0 +1,47 @@
{
"Add to dictionary": "Přidat do slovníku",
"Failed to save image": "Chyba při ukládání obrázku",
"The image failed to save": "Obrázek se nepodařilo uložit",
"Save image as...": "Uložit obrázek jako...",
"Copy link address": "Kopírovat adresu odkazu",
"Copy image address": "Kopírovat adresu obrázku",
"Copy email address": "Kopírovat e-mailovou adresu",
"Copy image": "Kopírovat obrázek",
"File": "Soubor",
"Bring All to Front": "Přenést vše do popředí",
"Zoom": "Lupa",
"Stop Speaking": "Zastavit nahrávání hlasu",
"Start Speaking": "Spustit nahrávání hlasu",
"Speech": "Řeč",
"Unhide": "Zrušit skrytí",
"Hide Others": "Skrýt ostatní",
"Hide": "Skrýt",
"Services": "Služby",
"About": "O aplikaci",
"Element Help": "Nápověda aplikace Element",
"Help": "Nápověda",
"Close": "Zavřít",
"Minimize": "Minimalizovat",
"Window": "Okno",
"Toggle Developer Tools": "Přepnout zobrazení nástrojů pro vývojáře",
"Toggle Full Screen": "Přepnout zobrazení celé obrazovky",
"Preferences": "Předvolby",
"Zoom Out": "Oddálit",
"Zoom In": "Přiblížit",
"Actual Size": "Aktuální velikost",
"View": "Zobrazit",
"Select All": "Vybrat vše",
"Delete": "Smazat",
"Paste and Match Style": "Vložit a přizpůsobit styl",
"Paste": "Vložit",
"Copy": "Kopírovat",
"Cut": "Vyjmout",
"Redo": "Znovu",
"Undo": "Zpět",
"Edit": "Úpravy",
"Quit": "Ukončit",
"Show/Hide": "Zobrazit/Skrýt",
"Are you sure you want to quit?": "Opravdu chcete ukončit aplikaci?",
"Close %(brand)s": "Zavřít %(brand)s",
"Cancel": "Zrušit"
}

View File

@@ -14,7 +14,7 @@
"Hide Others": "Nascondi gli altri",
"Hide": "Nascondi",
"Services": "Servizi",
"About": "Al riguardo",
"About": "Informazioni su",
"Element Help": "Aiuto di Element",
"Help": "Aiuto",
"Close": "Chiudi",
@@ -29,7 +29,7 @@
"View": "Vedi",
"Select All": "Seleziona tutto",
"Delete": "Elimina",
"Paste and Match Style": "Incolla e abbina lo stile",
"Paste and Match Style": "Incolla e adegua lo stile",
"Paste": "Incolla",
"Copy": "Copia",
"Cut": "Taglia",

12
src/i18n/strings/ko.json Normal file
View File

@@ -0,0 +1,12 @@
{
"File": "파일",
"Copy email address": "이메일 주소 복사",
"Paste": "붙여넣기",
"Hide": "숨기기",
"Preferences": "환경설정",
"Undo": "실행 취소",
"Edit": "수정",
"Quit": "종료",
"Delete": "삭제",
"Cancel": "취소"
}

1
src/i18n/strings/uk.json Normal file
View File

@@ -0,0 +1 @@
{}

View File

@@ -1,6 +1,6 @@
{
"Bring All to Front": "全部移至最前",
"Add to dictionary": "加入至字典",
"Add to dictionary": "新增到字典",
"The image failed to save": "儲存圖片失敗",
"Failed to save image": "儲存圖片失敗",
"Save image as...": "另存圖片為...",
@@ -17,8 +17,8 @@
"Hide": "隱藏",
"Services": "服務",
"About": "關於",
"Element Help": "Element 協助",
"Help": "協助",
"Element Help": "Element 說明",
"Help": "說明",
"Close": "關閉",
"Minimize": "最小化",
"Window": "視窗",
@@ -38,9 +38,9 @@
"Redo": "取消復原",
"Undo": "復原",
"Edit": "編輯",
"Quit": "退出",
"Quit": "離開",
"Show/Hide": "顯示/隱藏",
"Are you sure you want to quit?": "您確定要退出嗎?",
"Are you sure you want to quit?": "您確定要離開嗎?",
"Cancel": "取消",
"Copy image address": "複製圖片地址",
"Close %(brand)s": "關閉 %(brand)s"

View File

@@ -14,7 +14,8 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
import { app, autoUpdater, desktopCapturer, ipcMain, powerSaveBlocker } from "electron";
import { app, autoUpdater, desktopCapturer, ipcMain, powerSaveBlocker, TouchBar, nativeImage } from "electron";
import { relaunchApp } from "electron-clear-data";
import IpcMainEvent = Electron.IpcMainEvent;
import { recordSSOSession } from "./protocol";
@@ -186,6 +187,64 @@ ipcMain.on("ipcCall", async function (_ev: IpcMainEvent, payload) {
}));
break;
case "clearStorage":
global.store.clear();
global.mainWindow.webContents.session.flushStorageData();
await global.mainWindow.webContents.session.clearStorageData();
relaunchApp();
break;
case "breadcrumbs": {
if (process.platform === "darwin") {
const { TouchBarPopover, TouchBarButton } = TouchBar;
const recentsBar = new TouchBar({
items: args[0].map((r: { roomId: string; avatarUrl: string | null; initial: string }) => {
const defaultColors = ["#0DBD8B", "#368bd6", "#ac3ba8"];
let total = 0;
for (let i = 0; i < r.roomId.length; ++i) {
total += r.roomId.charCodeAt(i);
}
const button = new TouchBarButton({
label: r.initial,
backgroundColor: defaultColors[total % defaultColors.length],
click: (): void => {
global.mainWindow?.loadURL(`vector://vector/webapp/#/room/${r.roomId}`);
},
});
if (r.avatarUrl) {
fetch(r.avatarUrl)
.then((resp) => {
if (!resp.ok) return;
return resp.arrayBuffer();
})
.then((arrayBuffer) => {
if (!arrayBuffer) return;
const buffer = Buffer.from(arrayBuffer);
button.icon = nativeImage.createFromBuffer(buffer);
button.label = "";
button.backgroundColor = "";
});
}
return button;
}),
});
const touchBar = new TouchBar({
items: [
new TouchBarPopover({
label: "Recents",
showCloseButton: true,
items: recentsBar,
}),
],
});
global.mainWindow.setTouchBar(touchBar);
}
break;
}
default:
global.mainWindow.webContents.send("ipcReply", {
id: payload.id,

View File

@@ -23,7 +23,7 @@ import { ElectronApplication, Page } from "playwright-core";
describe("App launch", () => {
const artifactsPath = path.join(process.cwd(), "test_artifacts");
fs.mkdirSync(artifactsPath);
if (!fs.existsSync(artifactsPath)) fs.mkdirSync(artifactsPath);
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), "element-desktop-tests"));
console.log("Using temp profile directory: ", tmpDir);

3866
yarn.lock
View File

File diff suppressed because it is too large Load Diff