From 48545d6a838a9d9651a8e43845c15a3715121f2d Mon Sep 17 00:00:00 2001 From: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com> Date: Wed, 10 May 2023 12:58:35 -0700 Subject: [PATCH] Update electron to 24.2.0 --- .github/workflows/benchmark.yml | 2 +- .github/workflows/ci.yml | 10 ++++----- .github/workflows/danger.yml | 2 +- .nvmrc | 2 +- build/installer.nsh | 2 +- package.json | 10 ++++----- ts/state/smart/StoryCreator.tsx | 8 ++++++- ts/util/handleVideoAttachment.ts | 2 +- yarn.lock | 38 ++++++++++++++++---------------- 9 files changed, 41 insertions(+), 35 deletions(-) diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 5302dadcf61f..dbe94c50f983 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -28,7 +28,7 @@ jobs: - name: Setup node.js uses: actions/setup-node@v3 with: - node-version: '16.17.1' + node-version: '18.14.0' - name: Install global dependencies run: npm install -g yarn@1.22.10 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aeaf2f28304d..2e72d3d8152f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '16.17.1' + node-version: '18.14.0' - run: npm install -g yarn@1.22.10 - name: Cache Desktop node_modules @@ -72,7 +72,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '16.17.1' + node-version: '18.14.0' - run: npm install -g yarn@1.22.10 - name: Cache Desktop node_modules @@ -113,7 +113,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '16.17.1' + node-version: '18.14.0' - run: sudo apt-get install xvfb - run: npm install -g yarn@1.22.10 @@ -168,7 +168,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: - node-version: '16.17.1' + node-version: '18.14.0' - run: npm install -g yarn@1.22.10 - name: Cache Desktop node_modules @@ -228,7 +228,7 @@ jobs: - name: Setup node.js uses: actions/setup-node@v3 with: - node-version: '16.17.1' + node-version: '18.14.0' - name: Install global dependencies run: npm install -g yarn@1.22.10 diff --git a/.github/workflows/danger.yml b/.github/workflows/danger.yml index 4b18344635e6..bfe3e4c874e7 100644 --- a/.github/workflows/danger.yml +++ b/.github/workflows/danger.yml @@ -15,7 +15,7 @@ jobs: fetch-depth: 0 # fetch all history - uses: actions/setup-node@v3 with: - node-version: '16.17.1' + node-version: '18.14.0' - run: npm install -g yarn@1.22.10 - name: Cache danger node_modules id: cache-desktop-modules diff --git a/.nvmrc b/.nvmrc index c85fa1bbef83..e6db45a90794 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -16.17.1 +18.14.0 diff --git a/build/installer.nsh b/build/installer.nsh index ad9d462bd0bb..a8e40efa285a 100644 --- a/build/installer.nsh +++ b/build/installer.nsh @@ -10,7 +10,7 @@ ManifestDPIAware true Var /Global OLD_SIGNAL_VERSION # Check minimum OS version - ${IfNot} ${AtLeastWin7} + ${IfNot} ${AtLeastWin10} MessageBox MB_OK|MB_ICONEXCLAMATION "$(signalMinWinVersionErr)" DetailPrint `Windows version check failed` Abort diff --git a/package.json b/package.json index 770a4b57c777..9d851b79dc32 100644 --- a/package.json +++ b/package.json @@ -228,7 +228,7 @@ "@types/lru-cache": "5.1.0", "@types/memoizee": "0.4.2", "@types/mocha": "9.0.0", - "@types/node": "16.18.3", + "@types/node": "18.15.11", "@types/node-fetch": "2.6.2", "@types/normalize-path": "3.0.0", "@types/pify": "3.0.2", @@ -264,7 +264,7 @@ "css-loader": "3.2.0", "danger": "11.1.2", "debug": "4.3.3", - "electron": "22.3.5", + "electron": "24.3.0", "electron-builder": "23.0.8", "electron-mocha": "11.0.2", "electron-notarize": "1.2.1", @@ -285,7 +285,7 @@ "npm-run-all": "4.1.5", "nyc": "11.4.1", "patch-package": "6.4.7", - "playwright": "1.31.2", + "playwright": "1.33.0", "prettier": "2.8.0", "sass": "1.49.7", "sass-loader": "10.2.0", @@ -317,7 +317,7 @@ "read-last-lines/mz/thenify-all/thenify": "3.3.1" }, "engines": { - "node": "16.17.1" + "node": "18.14.0" }, "build": { "appId": "org.whispersystems.signal-desktop", @@ -377,7 +377,7 @@ ], "releaseInfo": { "vendor": { - "minOSVersion": "6.1.0" + "minOSVersion": "10.0.10240" } }, "signDlls": true, diff --git a/ts/state/smart/StoryCreator.tsx b/ts/state/smart/StoryCreator.tsx index 2131712802ba..9eff75b73b6a 100644 --- a/ts/state/smart/StoryCreator.tsx +++ b/ts/state/smart/StoryCreator.tsx @@ -85,9 +85,15 @@ export function SmartStoryCreator(): JSX.Element | null { ); const addStoryData = useSelector(getAddStoryData); - const file = addStoryData?.type === 'Media' ? addStoryData.file : undefined; + let file: File | undefined; const isSending = addStoryData?.sending || false; + if (addStoryData?.type === 'Media') { + // Note that the source type is ReadonlyDeep, but browser APIs don't + // support that. Hence the cast. + file = addStoryData.file as File; + } + const recentEmojis = useRecentEmojis(); const skinTone = useSelector(getEmojiSkinTone); const { onSetSkinTone } = useItemsActions(); diff --git a/ts/util/handleVideoAttachment.ts b/ts/util/handleVideoAttachment.ts index b5e009f17681..3f7b1143a87c 100644 --- a/ts/util/handleVideoAttachment.ts +++ b/ts/util/handleVideoAttachment.ts @@ -10,7 +10,7 @@ import type { InMemoryAttachmentDraftType } from '../types/Attachment'; import { fileToBytes } from './fileToBytes'; export async function handleVideoAttachment( - file: Readonly + file: File ): Promise { const objectUrl = URL.createObjectURL(file); if (!objectUrl) { diff --git a/yarn.lock b/yarn.lock index 6c1ae18d2ef5..df26058f53c3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4140,12 +4140,12 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.17.tgz#a8ddf6e0c2341718d74ee3dc413a13a042c45a0c" integrity sha512-e8PUNQy1HgJGV3iU/Bp2+D/DXh3PYeyli8LgIwsQcs1Ar1LoaWHSIT6Rw+H2rNJmiq6SNWiDytfx8+gYj7wDHw== -"@types/node@16.18.3": - version "16.18.3" - resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.3.tgz#d7f7ba828ad9e540270f01ce00d391c54e6e0abc" - integrity sha512-jh6m0QUhIRcZpNv7Z/rpN+ZWXOicUUQbSoWks7Htkbb9IjFQj4kzcX/xFCkjstCj5flMsN8FiSvt+q+Tcs4Llg== +"@types/node@18.15.11", "@types/node@^18.11.18": + version "18.15.11" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.11.tgz#b3b790f09cb1696cffcec605de025b088fa4225f" + integrity sha512-E5Kwq2n4SbMzQOn6wnmBjuK9ouqlURrcZDVfbo9ftDDTFt3nk7ZKK4GMOzoYgnpQJKcxwQw+lGaBvvlMo0qN/Q== -"@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0", "@types/node@^16.11.26": +"@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0": version "16.11.38" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.11.38.tgz#be0edd097b23eace6c471c525a74b3f98803017f" integrity sha512-hjO/0K140An3GWDw2HJfq7gko3wWeznbjXgg+rzPdVzhe198hp4x2i1dgveAOEiFKd8sOilAxzoSJiVv5P/CUg== @@ -8204,13 +8204,13 @@ electron-window@^0.8.0: dependencies: is-electron-renderer "^2.0.0" -electron@22.3.5: - version "22.3.5" - resolved "https://registry.yarnpkg.com/electron/-/electron-22.3.5.tgz#a53a318cbb25a44914dfedd30a9ad6120632197f" - integrity sha512-CTdnoTbO3sDiMv47TX3ZO640Ca57v1qpiqGChFF8oZbtfHuQjTPPaE4hsoynf22wwnBiyJNL41DpB/pfp9USnA== +electron@24.3.0: + version "24.3.0" + resolved "https://registry.yarnpkg.com/electron/-/electron-24.3.0.tgz#d1ef519b0d6d86cc4992519b49821372cb957fe6" + integrity sha512-M7PpfpOzGdLeZPr2xhxXuvJeoXPEHMH40Rtv8BCGleRPolwna9BepAGc0H0F+Uz5kGKOv3xcm99fTurvXUH0nw== dependencies: "@electron/get" "^2.0.0" - "@types/node" "^16.11.26" + "@types/node" "^18.11.18" extract-zip "^2.0.1" element-resize-detector@^1.2.2: @@ -14519,17 +14519,17 @@ pkg-dir@^5.0.0: dependencies: find-up "^5.0.0" -playwright-core@1.31.2: - version "1.31.2" - resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.31.2.tgz#debf4b215d14cb619adb7e511c164d068075b2ed" - integrity sha512-a1dFgCNQw4vCsG7bnojZjDnPewZcw7tZUNFN0ZkcLYKj+mPmXvg4MpaaKZ5SgqPsOmqIf2YsVRkgqiRDxD+fDQ== +playwright-core@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.33.0.tgz#269efe29a927cd6d144d05f3c2d2f72bd72447a1" + integrity sha512-aizyPE1Cj62vAECdph1iaMILpT0WUDCq3E6rW6I+dleSbBoGbktvJtzS6VHkZ4DKNEOG9qJpiom/ZxO+S15LAw== -playwright@1.31.2: - version "1.31.2" - resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.31.2.tgz#4252280586c596746122cd1fdf9f8ff6a63fa852" - integrity sha512-jpC47n2PKQNtzB7clmBuWh6ftBRS/Bt5EGLigJ9k2QAKcNeYXZkEaDH5gmvb6+AbcE0DO6GnXdbl9ogG6Eh+og== +playwright@1.33.0: + version "1.33.0" + resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.33.0.tgz#88df1cffe97718ab8a02303e12c9133681ec7fab" + integrity sha512-+zzU3V2TslRX2ETBRgQKsKytYBkJeLZ2xzUj4JohnZnxQnivoUvOvNbRBYWSYykQTO0Y4zb8NwZTYFUO+EpPBQ== dependencies: - playwright-core "1.31.2" + playwright-core "1.33.0" plist@^3.0.1, plist@^3.0.4: version "3.0.5"