chore(deps): upgrade all dependencies, toolchains and images (#2825)

This commit is contained in:
Hampus authored and GitHub committed 2026-09-17 21:08:56 +02:00
1 parent 56e04e7b53
commit 3b552e00ef
510 files changed
+23614 -37473

No files matched your search

+16 -6
View File
@@ -18,7 +18,7 @@ import {
import {setQuitting} from '@electron/main/Window';
import {app, autoUpdater, type BrowserWindow, ipcMain} from 'electron';
import log from 'electron-log';
import type {UpdateInfo} from 'velopack';
import type {UpdateInfo, VelopackAsset} from 'velopack';
type UpdaterContext = 'user' | 'background' | 'focus';
type UpdaterEvent =
@@ -68,7 +68,9 @@ type UpdaterEvent =
const requireModule = createRequire(import.meta.url);
let lastContext: UpdaterContext = 'background';
let pendingVelopackUpdate: UpdateInfo | null = null;
type VelopackUpdate = UpdateInfo | VelopackAsset;
let pendingVelopackUpdate: VelopackUpdate | null = null;
let velopackCheckPromise: Promise<void> | null = null;
let velopackDownloadPromise: Promise<void> | null = null;
let velopackInstallStarted = false;
@@ -105,12 +107,16 @@ function backoffDelay(attempt: number): number {
return Math.round(capped * (0.5 + Math.random() * 0.5));
}
function getVelopackUpdateVersion(update: UpdateInfo): string | null {
return update.TargetFullRelease?.Version ?? null;
function getVelopackAsset(update: VelopackUpdate): VelopackAsset {
return 'TargetFullRelease' in update ? update.TargetFullRelease : update;
}
function getVelopackUpdateSize(update: UpdateInfo): number | null {
const raw = update.TargetFullRelease?.Size;
function getVelopackUpdateVersion(update: VelopackUpdate): string | null {
return getVelopackAsset(update).Version ?? null;
}
function getVelopackUpdateSize(update: VelopackUpdate): number | null {
const raw = getVelopackAsset(update).Size;
if (raw == null) return null;
if (typeof raw === 'bigint') {
return Number(raw);
@@ -201,6 +207,10 @@ async function downloadVelopackUpdate(
});
return;
}
if (!('TargetFullRelease' in update)) {
send(getMainWindow(), {type: 'downloaded', context, version: getVelopackUpdateVersion(update)});
return;
}
velopackDownloadPromise = (async () => {
const total = getVelopackUpdateSize(update) ?? 0;
let lastError: unknown;