Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"test": "vitest run",
"test:e2e": "playwright test",
"typecheck": "tsc -p tsconfig.json --noEmit",
"check": "npm run typecheck && npm test",
"check": "npm run typecheck && npm run typecheck:gui && npm test",
"prepublishOnly": "npm run build && npm run check",
"build:release": "bash scripts/build-release.sh",
"build:release:darwin": "bash scripts/build-release.sh darwin",
Expand All @@ -41,7 +41,8 @@
"gui:dev": "bun src/gui/index.ts",
"build:gui": "bash scripts/build-gui.sh",
"build:gui:darwin": "bash scripts/build-gui.sh darwin",
"notices:update": "node scripts/generate-third-party-notices.mjs"
"notices:update": "node scripts/generate-third-party-notices.mjs",
"typecheck:gui": "tsc -p tsconfig.gui.json"
},
"keywords": [
"cli",
Expand All @@ -65,6 +66,7 @@
"zod": "^4.1.13"
},
"devDependencies": {
"@types/bun": "^1.3.14",
"@types/cors": "^2.8.17",
"@types/express": "^5.0.3",
"@types/node": "^26.1.0",
Expand Down
4 changes: 3 additions & 1 deletion src/gui/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ if (process.env.DVALINCODE_GUI_ROLE === 'server') {

// The server prints "…http://localhost:<port>" once it's listening. Keep
// draining stdout afterwards so the child never blocks on a full pipe.
let resolveUrl: (url: string) => void;
// Definite assignment: a Promise executor runs synchronously, so this is set
// before the reader below can reach it — TypeScript cannot see that.
let resolveUrl!: (url: string) => void;
const urlPromise = new Promise<string>((resolve) => (resolveUrl = resolve));
(async () => {
const decoder = new TextDecoder();
Expand Down
21 changes: 21 additions & 0 deletions tsconfig.gui.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
// src/gui runs under Bun, not Node, so it cannot join the main tsconfig: it
// uses `Bun`, `import.meta.path`, and webview-bun's FFI types. It was simply
// excluded, which left it unchecked while it imports from src/core — a
// signature change there would only surface during a GUI release.
//
// `exclude` must be restated. It is inherited from the base config, and an
// inherited exclude wins over the include below, which silently turns this
// whole check into a no-op.
"extends": "./tsconfig.json",
"compilerOptions": {
// Bun resolves like a bundler, not like Node. nodenext makes TypeScript
// reject webview-bun's own extensionless relative imports.
"module": "esnext",
"moduleResolution": "bundler",
"types": ["bun"],
"noEmit": true
},
"include": ["src/gui/**/*.ts", "src/core/**/*.ts", "src/version.ts"],
"exclude": ["dist", "node_modules"]
}