Prefer native node fetch over node-fetch (#1970)
This commit is contained in:
+2
-2
@@ -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}})`,
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user