Files
yellowjacket/frontend/tsconfig.json
yonluandClaude Opus 5 a4ada725a2 feat(wails): rebuild the Vitest fake on v3's transport seam
v2 installed two globals and the fake replaced both. v3 has neither —
the runtime is an npm module and the generated bindings call into it.
What it has instead is better: setTransport() is a public seam for
replacing the IPC transport, and *every* runtime call goes through it,
so the fake is smaller than v2's and covers strictly more.

The event dispatcher is no longer mirrored at all. v2's fake
reimplemented desktop/events.js — the listener list, maxCallbacks
expiry, the reverse iteration — because there was no way to reach the
real one; emit() now goes through window._wails.dispatchWailsEvent,
which is the entry point the backend's own push uses. What is mirrored
instead is one line of Go: how EventManager.Emit packs variadic data
into an event's single data field. Registration and unregistration are
the public Events API. The one non-public thing left is the listener
registry, aliased in vitest.config.mts and used only by
listenerNames() — a test asks whether importing a store subscribed it,
which nothing public can answer.

A binding carries a method ID, not a name, so the fake derives the
ID -> path map from the generated tree: FNV-1a over the FQN, with the
Go type's casing recovered from each package's index.ts, which is the
only place it survives (library/library.ts cannot tell you it is
FrontendUtil). The map has to be complete rather than lazy because 21
assertions read calls() with no argument and compare the whole list.

Two things had to move that are not the fake.

fixture() drains microtasks between two renders: a v3 binding settles
several hops later than v2's, and tests were already written as though
fixture() meant "mounted and loaded". Microtasks and not a timer,
which would hang under the suites that install fake ones.

tracklist-store keeps its defaults on an empty answer instead of
emptying the column list. GetTrackListColumns substitutes
DefaultColumns only when the whole config section is missing; a section
that exists with no columns returns nothing. Until now this was
accidental — the binding was typed Column[], an absent answer arrived
as undefined, and .map threw into the catch.

757 tests pass across all 63 files. They are run in batches: a single
browser session dies partway through the 58 it queues, which reproduces
unchanged at the pre-migration commit and is a resource limit on this
machine rather than anything here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UDCbcCZQepnpSQYJ6SxxZm
2026-08-14 19:46:14 -04:00

50 lines
2.5 KiB
JSON

{
"compilerOptions": {
// base options
"esModuleInterop": true, // Helps mend a few of the fences between CommonJS and ES Modules.
"skipLibCheck": true, // Skips checking the types of .d.ts files. This is important for performance, because otherwise all node_modules will be checked.
"target": "esnext", // The version of JavaScript you're targeting.
"allowJs": true, // Allows you to import .js files.
"moduleDetection": "force", // This option forces TypeScript to consider all files as modules. This helps to avoid 'cannot redeclare block-scoped variable' errors.
"isolatedModules": true, // This option prevents a few TS features which are unsafe when treating modules as isolated files.
"verbatimModuleSyntax": true, // This option forces you to use import type and export type, leading to more predictable behavior and fewer unnecessary imports.
// strictness
"strict": true, // Enables all strict type checking options.
"noUncheckedIndexedAccess": true, // Prevents you from accessing an array or object without first checking if it's defined.
"noImplicitOverride": true, // Makes the override keyword actually useful in classes.
// optional "noisy" options
"noImplicitReturns": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true,
// transpiling to js options
"module": "esnext", // Tells TypeScript what module syntax to use.
"outDir": "dist", // Tells TypeScript where to put the compiled JavaScript files.
// running in the DOM
"lib": ["esnext", "dom", "dom.iterable"], // Tells TypeScript what built-in types to include.
// module resolution
"moduleResolution": "bundler",
"paths": { // path aliases to find modules
"@go/*": ["./bindings/yellowjacket/backend/*"],
"@components/*": ["./src/components/*"],
"@assets/*": ["./src/assets/*"],
"@pages/*": ["./src/pages/*"],
"@runtime/*": ["./src/wails/*"],
"@wailsio/listener": ["./node_modules/@wailsio/runtime/types/listener.d.ts"],
"@utils/*": ["./src/utils/*"],
"@store/*": ["./src/store/*"],
"@test/*": ["./test/*"]
},
"types": ["vite/client", "@vitest/browser-playwright"],
// needed for Lit Elements
"experimentalDecorators": true,
"useDefineForClassFields": false, // allows us to define properties as class fields
// plugins
"plugins": [
{"name": "ts-lit-plugin"},
{"name": "typescript-lit-html-plugin"}
]
},
"include": ["src", "bindings", "test"]
}