From 199e09c64b59899b143d1a8e83b334dfec6400fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Lidwin?= Date: Fri, 22 Mar 2024 16:40:58 +0100 Subject: [PATCH] [TECH]: update electron (#3628) * tech: update electron * fix: lint * fix: e2e --- package.json | 4 +-- src/backend/api/helpers.ts | 4 +-- src/common/typedefs/ipcBridge.d.ts | 8 ++---- yarn.lock | 44 +++++++++++++++--------------- 4 files changed, 28 insertions(+), 32 deletions(-) diff --git a/package.json b/package.json index 2496ed685f..cd2bd3056c 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ }, "devDependencies": { "@electron/notarize": "^2.1.0", - "@playwright/test": "1.39.0", + "@playwright/test": "1.42.1", "@testing-library/dom": "9.0.1", "@testing-library/jest-dom": "5.16.4", "@testing-library/react": "14.0.0", @@ -124,7 +124,7 @@ "@typescript-eslint/parser": "5.47.1", "@vitejs/plugin-react-swc": "3.2.0", "cross-env": "7.0.3", - "electron": "castlabs/electron-releases#27.0.0+wvcus", + "electron": "castlabs/electron-releases#29.1.3+wvcus", "electron-builder": "24.6.4", "electron-devtools-installer": "3.2.0", "eslint": "8.36.0", diff --git a/src/backend/api/helpers.ts b/src/backend/api/helpers.ts index 938d5f2ca6..0f92d2c975 100644 --- a/src/backend/api/helpers.ts +++ b/src/backend/api/helpers.ts @@ -1,4 +1,4 @@ -import { ipcRenderer, TitleBarOverlayOptions } from 'electron' +import { ipcRenderer, TitleBarOverlay } from 'electron' import { Runner, InstallPlatform, @@ -135,7 +135,7 @@ export const getThemeCSS = async (theme: string) => export const getCustomThemes = async () => ipcRenderer.invoke('getCustomThemes') -export const setTitleBarOverlay = (options: TitleBarOverlayOptions) => +export const setTitleBarOverlay = (options: TitleBarOverlay) => ipcRenderer.send('setTitleBarOverlay', options) export const isGameAvailable = async (args: { diff --git a/src/common/typedefs/ipcBridge.d.ts b/src/common/typedefs/ipcBridge.d.ts index cf4b15b0e5..8289829aff 100644 --- a/src/common/typedefs/ipcBridge.d.ts +++ b/src/common/typedefs/ipcBridge.d.ts @@ -1,9 +1,5 @@ import { EventEmitter } from 'node:events' -import { - IpcMainEvent, - OpenDialogOptions, - TitleBarOverlayOptions -} from 'electron' +import { IpcMainEvent, OpenDialogOptions, TitleBarOverlay } from 'electron' import { Runner, @@ -108,7 +104,7 @@ interface SyncIPCFunctions { maximizeWindow: () => void unmaximizeWindow: () => void closeWindow: () => void - setTitleBarOverlay: (options: TitleBarOverlayOptions) => void + setTitleBarOverlay: (options: TitleBarOverlay) => void winetricksInstall: ({ runner: Runner, appName: string, diff --git a/yarn.lock b/yarn.lock index 0ed6b8cfd7..a6d512957b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1145,12 +1145,12 @@ resolved "https://registry.yarnpkg.com/@pkgjs/parseargs/-/parseargs-0.11.0.tgz#a77ea742fab25775145434eb1d2328cf5013ac33" integrity sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg== -"@playwright/test@1.39.0": - version "1.39.0" - resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.39.0.tgz#d10ba8e38e44104499e25001945f07faa9fa91cd" - integrity sha512-3u1iFqgzl7zr004bGPYiN/5EZpRUSFddQBra8Rqll5N0/vfpqlP9I9EXqAoGacuAbX6c9Ulg/Cjqglp5VkK6UQ== +"@playwright/test@1.42.1": + version "1.42.1" + resolved "https://registry.yarnpkg.com/@playwright/test/-/test-1.42.1.tgz#9eff7417bcaa770e9e9a00439e078284b301f31c" + integrity sha512-Gq9rmS54mjBL/7/MvBaNOBwbfnh7beHvS6oS4srqXFcQHpQCV1+c8JXWE8VLPyRDhgS3H8x8A7hztqI9VnwrAQ== dependencies: - playwright "1.39.0" + playwright "1.42.1" "@popperjs/core@^2.11.6": version "2.11.8" @@ -1692,10 +1692,10 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-18.15.0.tgz#286a65e3fdffd691e170541e6ecb0410b16a38be" integrity sha512-z6nr0TTEOBGkzLGmbypWOGnpSpSIBorEhC4L+4HeQ2iezKCi4f77kyslRwvHeNitymGQ+oFyIWGP96l/DPSV9w== -"@types/node@^18.11.18": - version "18.18.8" - resolved "https://registry.yarnpkg.com/@types/node/-/node-18.18.8.tgz#2b285361f2357c8c8578ec86b5d097c7f464cfd6" - integrity sha512-OLGBaaK5V3VRBS1bAkMVP2/W9B+H8meUfl866OrMNQqt7wDgdpWPp5o6gmIc9pB+lIQHSq4ZL8ypeH1vPxcPaQ== +"@types/node@^20.9.0": + version "20.11.27" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.27.tgz#debe5cfc8a507dd60fe2a3b4875b1604f215c2ac" + integrity sha512-qyUZfMnCg1KEz57r7pzFtSGt49f6RPkPBis3Vo4PbS7roQEDn22hiHzl/Lo1q4i4hDEgBJmBF/NTNg2XR0HbFg== dependencies: undici-types "~5.26.4" @@ -3654,12 +3654,12 @@ electron-updater@5.0.1: lodash.isequal "^4.5.0" semver "^7.3.5" -electron@castlabs/electron-releases#27.0.0+wvcus: - version "27.0.0" - resolved "https://codeload.github.com/castlabs/electron-releases/tar.gz/6963e958f91aa07eca5409e0ab49446c5cd01247" +electron@castlabs/electron-releases#29.1.3+wvcus: + version "29.1.3" + resolved "https://codeload.github.com/castlabs/electron-releases/tar.gz/11c396ff7aa05e8fd8049193b58684f119cc0b8d" dependencies: "@electron/get" "^2.0.0" - "@types/node" "^18.11.18" + "@types/node" "^20.9.0" extract-zip "^2.0.1" emittery@^0.13.1: @@ -7127,17 +7127,17 @@ pkg-up@^3.1.0: dependencies: find-up "^3.0.0" -playwright-core@1.39.0: - version "1.39.0" - resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.39.0.tgz#efeaea754af4fb170d11845b8da30b2323287c63" - integrity sha512-+k4pdZgs1qiM+OUkSjx96YiKsXsmb59evFoqv8SKO067qBA+Z2s/dCzJij/ZhdQcs2zlTAgRKfeiiLm8PQ2qvw== +playwright-core@1.42.1: + version "1.42.1" + resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.42.1.tgz#13c150b93c940a3280ab1d3fbc945bc855c9459e" + integrity sha512-mxz6zclokgrke9p1vtdy/COWBH+eOZgYUVVU34C73M+4j4HLlQJHtfcqiqqxpP0o8HhMkflvfbquLX5dg6wlfA== -playwright@1.39.0: - version "1.39.0" - resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.39.0.tgz#184c81cd6478f8da28bcd9e60e94fcebf566e077" - integrity sha512-naE5QT11uC/Oiq0BwZ50gDmy8c8WLPRTEWuSSFVG2egBka/1qMoSqYQcROMT9zLwJ86oPofcTH2jBY/5wWOgIw== +playwright@1.42.1: + version "1.42.1" + resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.42.1.tgz#79c828b51fe3830211137550542426111dc8239f" + integrity sha512-PgwB03s2DZBcNRoW+1w9E+VkLBxweib6KTXM0M3tkiT4jVxKSi6PmVJ591J+0u10LUrgxB7dLRbiJqO5s2QPMg== dependencies: - playwright-core "1.39.0" + playwright-core "1.42.1" optionalDependencies: fsevents "2.3.2"