diff --git a/src/main/events/download-sources/add-download-source.ts b/src/main/events/download-sources/add-download-source.ts index c3e30488..e51cae3e 100644 --- a/src/main/events/download-sources/add-download-source.ts +++ b/src/main/events/download-sources/add-download-source.ts @@ -15,11 +15,9 @@ const addDownloadSource = async ( // Verify that repacks were actually written to the database (read-after-write) // This ensures all async operations are complete before proceeding let repackCount = 0; - const repackIds: number[] = []; for await (const [, repack] of repacksSublevel.iterator()) { if (repack.downloadSourceId === result.id) { repackCount++; - repackIds.push(repack.id); } } diff --git a/src/main/events/download-sources/helpers.ts b/src/main/events/download-sources/helpers.ts index ca765c3f..2e7489fd 100644 --- a/src/main/events/download-sources/helpers.ts +++ b/src/main/events/download-sources/helpers.ts @@ -2,7 +2,7 @@ import axios from "axios"; import { z } from "zod"; import { downloadSourcesSublevel, repacksSublevel } from "@main/level"; import { DownloadSourceStatus } from "@shared"; -import crypto from "crypto"; +import crypto from "node:crypto"; import { logger, ResourceCache } from "@main/services"; export const downloadSourceSchema = z.object({ @@ -62,9 +62,9 @@ export type FormattedSteamGamesByLetter = Record; export const formatName = (name: string) => { return name .normalize("NFD") - .replace(/[\u0300-\u036f]/g, "") + .replaceAll(/[\u0300-\u036f]/g, "") .toLowerCase() - .replace(/[^a-z0-9]/g, ""); + .replaceAll(/[^a-z0-9]/g, ""); }; export const formatRepackName = (name: string) => { diff --git a/src/main/events/library/add-custom-game-to-library.ts b/src/main/events/library/add-custom-game-to-library.ts index f85c008b..f2f2dd40 100644 --- a/src/main/events/library/add-custom-game-to-library.ts +++ b/src/main/events/library/add-custom-game-to-library.ts @@ -1,6 +1,6 @@ import { registerEvent } from "../register-event"; import { gamesSublevel, gamesShopAssetsSublevel, levelKeys } from "@main/level"; -import { randomUUID } from "crypto"; +import { randomUUID } from "node:crypto"; import type { GameShop } from "@types"; const addCustomGameToLibrary = async ( diff --git a/src/main/events/library/copy-custom-game-asset.ts b/src/main/events/library/copy-custom-game-asset.ts index aef74da9..1f5aea0f 100644 --- a/src/main/events/library/copy-custom-game-asset.ts +++ b/src/main/events/library/copy-custom-game-asset.ts @@ -1,7 +1,7 @@ import { registerEvent } from "../register-event"; import fs from "node:fs"; import path from "node:path"; -import { randomUUID } from "crypto"; +import { randomUUID } from "node:crypto"; import { ASSETS_PATH } from "@main/constants"; const copyCustomGameAsset = async (