Migrate tsconfig to Node16 module/moduleResolution
VS Code surfaced the TS deprecation: 'moduleResolution=node10' is deprecated and won't work in TS 7.0. Fix: switch the root tsconfig.json from module: CommonJS, moduleResolution: node to module: Node16, moduleResolution: Node16 TypeScript 7 only supports node16/nodenext/bundler. node16 matches the runtime semantics we already use (Node ≥ 16, CommonJS output via the absence of "type": "module" in package.json), so the emit is unchanged. Side effect of Node16 resolution: relative imports must carry the .js extension. Added .js to every relative import across src/* (17 sites, 8 files). Bare module specifiers (express, electron, node:fs, ...) are unaffected. Verified: - tsc -p tsconfig.server.json — 0 errors - tsc -p tsconfig.installer.json — 0 errors - node dist/server/app.js boots; /op login → 302, /op/list → 200
This commit is contained in:
@@ -16,9 +16,9 @@ import type {
|
||||
PortForwardResult,
|
||||
RamCheckResult,
|
||||
ServerInstallPayload
|
||||
} from './types'
|
||||
import type { Manifest, PackDefinition } from '../shared/types'
|
||||
import { normalizePackDefinition } from '../shared/store'
|
||||
} from './types.js'
|
||||
import type { Manifest, PackDefinition } from '../shared/types.js'
|
||||
import { normalizePackDefinition } from '../shared/store.js'
|
||||
|
||||
interface InstallerState {
|
||||
manifestUrl: string
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { contextBridge, ipcRenderer } from 'electron'
|
||||
import type { ClientInstallPayload, FetchedPack, RamCheckResult, ServerInstallPayload, PortForwardResult } from './types'
|
||||
import type { ClientInstallPayload, FetchedPack, RamCheckResult, ServerInstallPayload, PortForwardResult } from './types.js'
|
||||
|
||||
const api = {
|
||||
// 1단계
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { Manifest, PackDefinition } from '../shared/types'
|
||||
import type { Manifest, PackDefinition } from '../shared/types.js'
|
||||
|
||||
export interface InstallerConfig {
|
||||
manifestUrl: string
|
||||
|
||||
Reference in New Issue
Block a user