From 860a577ddb8d88276ddccc434324d12bc4320a6c Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Mon, 6 Dec 2021 19:13:26 +0100 Subject: [PATCH] fixed ESM default imports --- app/lib/app.ts | 2 +- app/lib/lru.ts | 2 +- app/lib/window.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/lib/app.ts b/app/lib/app.ts index 124e2ebe..bb1bd822 100644 --- a/app/lib/app.ts +++ b/app/lib/app.ts @@ -1,5 +1,5 @@ import { app, ipcMain, Menu, Tray, shell, screen, globalShortcut, MenuItemConstructorOptions } from 'electron' -import * as promiseIpc from 'electron-promise-ipc' +import promiseIpc from 'electron-promise-ipc' import * as remote from '@electron/remote/main' import { exec } from 'mz/child_process' import * as path from 'path' diff --git a/app/lib/lru.ts b/app/lib/lru.ts index b79ad003..31e8f77d 100644 --- a/app/lib/lru.ts +++ b/app/lib/lru.ts @@ -1,4 +1,4 @@ -import * as LRU from 'lru-cache' +import LRU from 'lru-cache' import * as fs from 'fs' const lru = new LRU({ max: 256, maxAge: 250 }) const origLstat = fs.realpathSync.bind(fs) diff --git a/app/lib/window.ts b/app/lib/window.ts index 10a4a53a..4841226e 100644 --- a/app/lib/window.ts +++ b/app/lib/window.ts @@ -6,7 +6,7 @@ import ElectronConfig = require('electron-config') import * as os from 'os' import * as path from 'path' import macOSRelease from 'macos-release' -import compareVersions from 'compare-versions' +import { compare as compareVersions } from 'compare-versions' import type { Application } from './app' import { parseArgs } from './cli' @@ -26,7 +26,7 @@ abstract class GlasstronWindow extends BrowserWindow { abstract setBlur (_: boolean) } -const macOSVibrancyType = process.platform === 'darwin' ? compareVersions.compare(macOSRelease().version, '10.14', '>=') ? 'fullscreen-ui' : 'dark' : null +const macOSVibrancyType = process.platform === 'darwin' ? compareVersions(macOSRelease().version, '10.14', '>=') ? 'fullscreen-ui' : 'dark' : null const activityIcon = nativeImage.createFromPath(`${app.getAppPath()}/assets/activity.png`)