Bump TypeScript to 5.3 with verbatimModuleSyntax
This commit upgrades TypeScript to the latest version 5.3 and introduces `verbatimModuleSyntax` in line with the official Vue guide recommendatinos (vuejs/docs#2592). By enforcing `import type` for type-only imports, this commit improves code clarity and supports tooling optimization, ensuring imports are only bundled when necessary for runtime. Changes: - Bump TypeScript to 5.3.3 across the project. - Adjust import statements to utilize `import type` where applicable, promoting cleaner and more efficient code.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { ScriptFileCodeRunner } from '@/infrastructure/CodeRunner/ScriptFileCodeRunner';
|
||||
import { CodeRunner } from '@/application/CodeRunner/CodeRunner';
|
||||
import { Dialog } from '@/presentation/common/Dialog';
|
||||
import type { CodeRunner } from '@/application/CodeRunner/CodeRunner';
|
||||
import type { Dialog } from '@/presentation/common/Dialog';
|
||||
import { ElectronDialog } from '@/infrastructure/Dialog/Electron/ElectronDialog';
|
||||
import { IpcChannel } from '@/presentation/electron/shared/IpcBridging/IpcChannel';
|
||||
import type { IpcChannel } from '@/presentation/electron/shared/IpcBridging/IpcChannel';
|
||||
import { ScriptEnvironmentDiagnosticsCollector } from '@/infrastructure/ScriptDiagnostics/ScriptEnvironmentDiagnosticsCollector';
|
||||
import { ScriptDiagnosticsCollector } from '@/application/ScriptDiagnostics/ScriptDiagnosticsCollector';
|
||||
import type { ScriptDiagnosticsCollector } from '@/application/ScriptDiagnostics/ScriptDiagnosticsCollector';
|
||||
import { registerIpcChannel } from '../shared/IpcBridging/IpcProxy';
|
||||
import { ChannelDefinitionKey, IpcChannelDefinitions } from '../shared/IpcBridging/IpcChannelDefinitions';
|
||||
import { type ChannelDefinitionKey, IpcChannelDefinitions } from '../shared/IpcBridging/IpcChannelDefinitions';
|
||||
|
||||
export function registerAllIpcChannels(
|
||||
registrar: IpcChannelRegistrar = registerIpcChannel,
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { app, dialog } from 'electron/main';
|
||||
import { autoUpdater, UpdateInfo } from 'electron-updater';
|
||||
import { ProgressInfo } from 'electron-builder';
|
||||
import { autoUpdater, type UpdateInfo } from 'electron-updater';
|
||||
import { ElectronLogger } from '@/infrastructure/Log/ElectronLogger';
|
||||
import { UpdateProgressBar } from './UpdateProgressBar';
|
||||
import type { ProgressInfo } from 'electron-builder';
|
||||
|
||||
export async function handleAutoUpdate() {
|
||||
if (await askDownloadAndInstall() === DownloadDialogResult.NotNow) {
|
||||
|
||||
@@ -2,10 +2,10 @@ import { existsSync, createWriteStream, type WriteStream } from 'node:fs';
|
||||
import { unlink, mkdir } from 'node:fs/promises';
|
||||
import path from 'node:path';
|
||||
import { app } from 'electron/main';
|
||||
import { UpdateInfo } from 'electron-updater';
|
||||
import { ElectronLogger } from '@/infrastructure/Log/ElectronLogger';
|
||||
import { UpdateProgressBar } from '../UpdateProgressBar';
|
||||
import { retryFileSystemAccess } from './RetryFileSystemAccess';
|
||||
import type { UpdateInfo } from 'electron-updater';
|
||||
import type { ReadableStream } from 'node:stream/web';
|
||||
|
||||
const MAX_PROGRESS_LOG_ENTRIES = 10;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { shell } from 'electron';
|
||||
import { UpdateInfo } from 'electron-updater';
|
||||
import { ElectronLogger } from '@/infrastructure/Log/ElectronLogger';
|
||||
import { GitHubProjectDetails } from '@/domain/Project/GitHubProjectDetails';
|
||||
import { Version } from '@/domain/Version';
|
||||
@@ -12,9 +11,10 @@ import {
|
||||
DownloadErrorChoice, InstallerErrorChoice, IntegrityCheckChoice,
|
||||
ManualUpdateChoice, showUnexpectedError, UnexpectedErrorChoice,
|
||||
} from './Dialogs';
|
||||
import { DownloadUpdateResult, downloadUpdate } from './Downloader';
|
||||
import { type DownloadUpdateResult, downloadUpdate } from './Downloader';
|
||||
import { checkIntegrity } from './Integrity';
|
||||
import { startInstallation } from './Installer';
|
||||
import type { UpdateInfo } from 'electron-updater';
|
||||
|
||||
export function requiresManualUpdate(): boolean {
|
||||
return process.platform === 'darwin';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { autoUpdater, UpdateInfo } from 'electron-updater';
|
||||
import { autoUpdater, type UpdateInfo } from 'electron-updater';
|
||||
import { ElectronLogger } from '@/infrastructure/Log/ElectronLogger';
|
||||
import { requiresManualUpdate, startManualUpdateProcess } from './ManualUpdater/ManualUpdateCoordinator';
|
||||
import { handleAutoUpdate } from './AutomaticUpdateCoordinator';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import ProgressBar from 'electron-progressbar';
|
||||
import { ProgressInfo } from 'electron-builder';
|
||||
import { app, BrowserWindow } from 'electron/main';
|
||||
import { ElectronLogger } from '@/infrastructure/Log/ElectronLogger';
|
||||
import type { ProgressInfo } from 'electron-builder';
|
||||
|
||||
export class UpdateProgressBar {
|
||||
private progressBar: ProgressBar | undefined;
|
||||
|
||||
Reference in New Issue
Block a user