Files
orca/config/tsconfig.e2e.json
T
Brennan Benson 4fcff22ef3 Treat .mts and .cts as their own resolution groups
The shadowing guard ranked every TypeScript extension in one list, which says
a routine foo.ts + foo.mts pairing hides the .mts. It does not: tsc puts .ts,
.mts and .cts in the program together and drops only the .tsx. The guard would
have blocked an ordinary ESM/CJS pair and told the author something untrue
about why. Compare within groups instead, and keep the rule in a pure function
so the grouping is testable without a fixture on disk.

Assert the regeneration hint from a subdirectory too. The existing test ran
from the repo root, where the caller-relative and repo-relative forms are
identical, so it could not tell them apart.

Say in the e2e tsconfig that renames read as growth and cannot be regenerated
away, since that is the one failure the ratchet offers no exit from.
2026-08-28 03:56:23 -07:00

31 lines
1.4 KiB
JSON

{
// Enforced by `pnpm typecheck`; pre-existing diagnostic identities and counts are ratcheted
// in typecheck-e2e-diagnostics.json so the backlog only shrinks. Identity is
// {file, code, message} without line/column, so a new error is caught unless it exactly
// matches one that was fixed in the same file. Regenerate with `pnpm typecheck:e2e:write`.
// Renaming a file, or a type whose name these messages quote, reads as growth against the
// PR base and regenerating cannot clear it; fix those diagnostics instead.
"extends": "@electron-toolkit/tsconfig/tsconfig.node.json",
// Why: specs import renderer and main modules directly, so the ambient declarations those
// modules rely on (vite client types, build-time defines) have to be in the program too.
"include": [
"../tests/**/*.ts",
"../tests/**/*.tsx",
"../src/renderer/src/env.d.ts",
"../src/types/**/*"
],
"exclude": ["../tests/e2e/.cross-version-checkouts/**"],
"compilerOptions": {
"incremental": true,
"tsBuildInfoFile": "./tsconfig.e2e.tsbuildinfo",
// Why: specs run browser code inside page.evaluate, so the DOM lib has to be visible here
// even though the harness itself is Node.
"lib": ["ESNext", "DOM", "DOM.Iterable"],
"types": ["node"],
"paths": {
"@renderer/*": ["../src/renderer/src/*"],
"@/*": ["../src/renderer/src/*"]
}
}
}