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>
This commit is contained in:
renovate[bot]
2024-12-18 19:11:19 +00:00
committed by GitHub
parent afd0acbb9f
commit e586cc46fd
4 changed files with 9 additions and 35 deletions

View File

@@ -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<string>;
}

View File

@@ -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);