diff --git a/desktop/src/main.ts b/desktop/src/main.ts index cb0d3f6e5..3644e3b24 100644 --- a/desktop/src/main.ts +++ b/desktop/src/main.ts @@ -8,12 +8,12 @@ * * https://www.electronjs.org/docs/latest/tutorial/process-model#the-main-process */ -import * as log from "electron-log"; +import log from "electron-log"; import { app, BrowserWindow } from "electron/main"; import serveNextAt from "next-electron-server"; import { existsSync } from "node:fs"; -import * as fs from "node:fs/promises"; -import * as path from "node:path"; +import fs from "node:fs/promises"; +import path from "node:path"; import { isDev } from "./main/general"; import { attachFSWatchIPCHandlers, attachIPCHandlers } from "./main/ipc"; import { logErrorSentry, setupLogging } from "./main/log"; diff --git a/desktop/src/main/dialogs.ts b/desktop/src/main/dialogs.ts index a4efed473..80813a78f 100644 --- a/desktop/src/main/dialogs.ts +++ b/desktop/src/main/dialogs.ts @@ -1,5 +1,5 @@ import { dialog } from "electron/main"; -import * as path from "node:path"; +import path from "node:path"; import { getDirFilePaths, getElectronFile } from "../services/fs"; import { getElectronFilesFromGoogleZip } from "../services/upload"; import type { ElectronFile } from "../types"; diff --git a/desktop/src/main/fs.ts b/desktop/src/main/fs.ts index f56e765c0..cf34acb78 100644 --- a/desktop/src/main/fs.ts +++ b/desktop/src/main/fs.ts @@ -2,8 +2,8 @@ * @file file system related functions exposed over the context bridge. */ import { createWriteStream, existsSync } from "node:fs"; -import * as fs from "node:fs/promises"; -import * as path from "node:path"; +import fs from "node:fs/promises"; +import path from "node:path"; import { Readable } from "node:stream"; import { logError } from "./log"; diff --git a/desktop/src/main/general.ts b/desktop/src/main/general.ts index a92656e31..e0b7654fe 100644 --- a/desktop/src/main/general.ts +++ b/desktop/src/main/general.ts @@ -1,6 +1,6 @@ import { shell } from "electron"; /* TODO(MR): Why is this not in /main? */ import { app } from "electron/main"; -import * as path from "node:path"; +import path from "node:path"; /** `true` if the app is running in development mode. */ export const isDev = !app.isPackaged; diff --git a/desktop/src/services/chokidar.ts b/desktop/src/services/chokidar.ts index 81107536e..57a0e504e 100644 --- a/desktop/src/services/chokidar.ts +++ b/desktop/src/services/chokidar.ts @@ -1,6 +1,6 @@ import chokidar from "chokidar"; import { BrowserWindow } from "electron"; -import * as path from "path"; +import path from "path"; import { logError } from "../main/log"; import { getWatchMappings } from "../services/watch"; import { getElectronFile } from "./fs"; diff --git a/desktop/src/services/clipService.ts b/desktop/src/services/clipService.ts index a01501d1f..7874d5620 100644 --- a/desktop/src/services/clipService.ts +++ b/desktop/src/services/clipService.ts @@ -1,8 +1,8 @@ -import * as log from "electron-log"; +import log from "electron-log"; import { app, net } from "electron/main"; import { existsSync } from "fs"; -import * as fs from "node:fs/promises"; -import * as path from "node:path"; +import fs from "node:fs/promises"; +import path from "node:path"; import util from "util"; import { CustomErrors } from "../constants/errors"; import { writeStream } from "../main/fs"; diff --git a/desktop/src/services/ffmpeg.ts b/desktop/src/services/ffmpeg.ts index 50fcfd54f..b04c84c79 100644 --- a/desktop/src/services/ffmpeg.ts +++ b/desktop/src/services/ffmpeg.ts @@ -1,7 +1,7 @@ import log from "electron-log"; import pathToFfmpeg from "ffmpeg-static"; import { existsSync } from "node:fs"; -import * as fs from "node:fs/promises"; +import fs from "node:fs/promises"; import util from "util"; import { CustomErrors } from "../constants/errors"; import { writeStream } from "../main/fs"; diff --git a/desktop/src/services/fs.ts b/desktop/src/services/fs.ts index 6e4fff214..3b9a63802 100644 --- a/desktop/src/services/fs.ts +++ b/desktop/src/services/fs.ts @@ -1,7 +1,7 @@ import StreamZip from "node-stream-zip"; import { existsSync } from "node:fs"; -import * as fs from "node:fs/promises"; -import * as path from "node:path"; +import fs from "node:fs/promises"; +import path from "node:path"; import { logError } from "../main/log"; import { ElectronFile } from "../types"; diff --git a/desktop/src/services/imageProcessor.ts b/desktop/src/services/imageProcessor.ts index a799ba83f..1abc78451 100644 --- a/desktop/src/services/imageProcessor.ts +++ b/desktop/src/services/imageProcessor.ts @@ -1,7 +1,7 @@ import { exec } from "child_process"; import log from "electron-log"; import { existsSync } from "fs"; -import * as fs from "node:fs/promises"; +import fs from "node:fs/promises"; import path from "path"; import util from "util"; import { CustomErrors } from "../constants/errors"; diff --git a/desktop/src/utils/createWindow.ts b/desktop/src/utils/createWindow.ts index 23dd5128c..baebfed98 100644 --- a/desktop/src/utils/createWindow.ts +++ b/desktop/src/utils/createWindow.ts @@ -1,11 +1,11 @@ import { app, BrowserWindow, nativeImage } from "electron"; import ElectronLog from "electron-log"; -import * as path from "path"; +import path from "path"; import { isAppQuitting, rendererURL } from "../main"; -import autoLauncher from "../services/autoLauncher"; -import { logErrorSentry } from "../main/log"; -import { getHideDockIconPreference } from "../services/userPreference"; import { isDev } from "../main/general"; +import { logErrorSentry } from "../main/log"; +import autoLauncher from "../services/autoLauncher"; +import { getHideDockIconPreference } from "../services/userPreference"; import { isPlatform } from "./common/platform"; /** diff --git a/desktop/src/utils/temp.ts b/desktop/src/utils/temp.ts index 099e6b667..489e5cbd4 100644 --- a/desktop/src/utils/temp.ts +++ b/desktop/src/utils/temp.ts @@ -1,6 +1,6 @@ import { app } from "electron/main"; import { existsSync } from "node:fs"; -import * as fs from "node:fs/promises"; +import fs from "node:fs/promises"; import path from "path"; const CHARACTERS =