From e586cc46fddf16e90489aa419f6eca3b69f05d19 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 18 Dec 2024 19:11:19 +0000 Subject: [PATCH] Update dependency electron-devtools-installer to v4 (#2044) * Update dependency electron-devtools-installer to v4 * Update to v4 sigs Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- package.json | 2 +- src/@types/electron-devtools-installer.d.ts | 18 ------------------ src/electron-main.ts | 6 +++--- yarn.lock | 18 +++++------------- 4 files changed, 9 insertions(+), 35 deletions(-) delete mode 100644 src/@types/electron-devtools-installer.d.ts diff --git a/package.json b/package.json index dbb67fb..9ce5520 100644 --- a/package.json +++ b/package.json @@ -91,7 +91,7 @@ "electron": "^33.0.0", "electron-builder": "25.1.8", "electron-builder-squirrel-windows": "25.1.8", - "electron-devtools-installer": "^3.2.0", + "electron-devtools-installer": "^4.0.0", "eslint": "^8.26.0", "eslint-config-google": "^0.14.0", "eslint-config-prettier": "^9.0.0", diff --git a/src/@types/electron-devtools-installer.d.ts b/src/@types/electron-devtools-installer.d.ts deleted file mode 100644 index 0c72ca3..0000000 --- a/src/@types/electron-devtools-installer.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -/* -Copyright 2024 New Vector Ltd. - -SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only -Please see LICENSE files in the repository root for full details. -*/ - -// import "electron-devtools-installer"; - -declare module "electron-devtools-installer" { - interface ExtensionReference { - id: string; - electron: string; - } - - export const REACT_DEVELOPER_TOOLS: ExtensionReference; - export default function install(extension: ExtensionReference): Promise; -} diff --git a/src/electron-main.ts b/src/electron-main.ts index 4bc4b1d..28d24c6 100644 --- a/src/electron-main.ts +++ b/src/electron-main.ts @@ -376,9 +376,9 @@ app.on("ready", async () => { if (argv["devtools"]) { try { - const { default: installExt, REACT_DEVELOPER_TOOLS } = await import("electron-devtools-installer"); - installExt(REACT_DEVELOPER_TOOLS) - .then((name: string) => console.log(`Added Extension: ${name}`)) + const { installExtension, REACT_DEVELOPER_TOOLS } = await import("electron-devtools-installer"); + installExtension(REACT_DEVELOPER_TOOLS) + .then((ext) => console.log(`Added Extension: ${ext.name}`)) .catch((err: unknown) => console.log("An error occurred: ", err)); } catch (e) { console.log(e); diff --git a/yarn.lock b/yarn.lock index 617adad..f4c1969 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3603,14 +3603,11 @@ electron-clear-data@^1.0.5: resolved "https://registry.yarnpkg.com/electron-clear-data/-/electron-clear-data-1.0.5.tgz#bc636f6850f57b1e8ed3fe2e57ca877e30d31bc9" integrity sha512-vynYILZ2F+S5qnc81bnTOfh8uCVlxP6j42T7h/ELaDL+vxmlT1QNgte8KNuXb+s9ed+Qx4IIRbMRUcbAJa/8rA== -electron-devtools-installer@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/electron-devtools-installer/-/electron-devtools-installer-3.2.0.tgz#acc48d24eb7033fe5af284a19667e73b78d406d0" - integrity sha512-t3UczsYugm4OAbqvdImMCImIMVdFzJAHgbwHpkl5jmfu1izVgUcP/mnrPqJIpEeCK1uZGpt+yHgWEN+9EwoYhQ== +electron-devtools-installer@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/electron-devtools-installer/-/electron-devtools-installer-4.0.0.tgz#6556a6a326cddea18194cb6d97d85c8ae329dedf" + integrity sha512-9Tntu/jtfSn0n6N/ZI6IdvRqXpDyLQiDuuIbsBI+dL+1Ef7C8J2JwByw58P3TJiNeuqyV3ZkphpNWuZK5iSY2w== dependencies: - rimraf "^3.0.2" - semver "^7.2.1" - tslib "^2.1.0" unzip-crx-3 "^0.2.0" electron-publish@25.1.7: @@ -6792,7 +6789,7 @@ semver@^6.0.0, semver@^6.2.0, semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.1.1, semver@^7.2.1, semver@^7.3.2, semver@^7.3.5, semver@^7.3.8, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2, semver@^7.6.3: +semver@^7.1.1, semver@^7.3.2, semver@^7.3.5, semver@^7.3.8, semver@^7.5.2, semver@^7.5.3, semver@^7.5.4, semver@^7.6.0, semver@^7.6.2, semver@^7.6.3: version "7.6.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.6.3.tgz#980f7b5550bc175fb4dc09403085627f9eb33143" integrity sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A== @@ -7294,11 +7291,6 @@ tsconfig-paths@^3.15.0: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.1.0: - version "2.6.3" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.3.tgz#0438f810ad7a9edcde7a241c3d80db693c8cbfe0" - integrity sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ== - tsx@^4.19.2: version "4.19.2" resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.19.2.tgz#2d7814783440e0ae42354d0417d9c2989a2ae92c"