Prefer native node fetch over node-fetch (#1970)

This commit is contained in:
Michael Telatynski
2024-10-31 11:16:36 +00:00
committed by GitHub
parent e66db793bf
commit 098609607b
7 changed files with 8 additions and 8 deletions
+2 -2
View File
@@ -31,8 +31,8 @@ async function safeCheckForUpdate(): Promise<void> {
// To avoid this we check manually whether an update is available and call the
// autoUpdater.checkForUpdates() when something new is there.
try {
const res = await global.fetch(feedUrl);
const { currentRelease } = await res.json();
const res = await fetch(feedUrl);
const { currentRelease } = (await res.json()) as { currentRelease: string };
const latestVersionDownloaded = latestUpdateDownloaded?.releaseName;
console.info(
`Latest version from release download: ${currentRelease} (current: ${app.getVersion()}, most recent downloaded ${latestVersionDownloaded}})`,
-1
View File
@@ -23,7 +23,6 @@ import {
} from "electron";
import url from "node:url";
import fs from "node:fs";
import fetch from "node-fetch";
import { pipeline } from "node:stream/promises";
import path from "node:path";