- clients/web/tsconfig.{app,node,test}.json: repoint the pino, hono,
hono/streaming, @hono/node-server, atomically, chokidar and @napi-rs/keyring
path mappings from ./node_modules to ../../node_modules. The stale mappings
were not failing the build — an unresolvable paths entry falls back to
ordinary walk-up resolution, which finds the root copy — but chokidar is the
case where the fallback never runs: Vite's transitive copy still sits under
clients/web, so tsc was type-checking against the client's copy while Vitest
and the shipped bundle both resolved the root's. Same version today, silent
skew tomorrow. Both path prefixes now carry a comment saying which ownership
each one asserts.
- local-dev skill: the consolidation rationale no longer groups commander, open
and @hono/node-server (client-imported) with the core/ set, no longer claims
#2195 moved undici (it was already root-only), and no longer implies every
root-declared package has an alias.
npm run local:gate passes with clients/web/node_modules/.tmp cleared, so the
tsc results are from a cold build rather than an incremental cache.
Signed-off-by: cliffhall <cliff@futurescale.com>
82 lines
3.1 KiB
JSON
82 lines
3.1 KiB
JSON
{
|
|
"compilerOptions": {
|
|
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
|
|
"target": "ES2023",
|
|
"useDefineForClassFields": true,
|
|
"lib": ["ES2023", "DOM", "DOM.Iterable"],
|
|
"module": "ESNext",
|
|
"types": ["vite/client", "node"],
|
|
"skipLibCheck": true,
|
|
|
|
/* Bundler mode */
|
|
"moduleResolution": "bundler",
|
|
"allowImportingTsExtensions": true,
|
|
"verbatimModuleSyntax": true,
|
|
"moduleDetection": "force",
|
|
"noEmit": true,
|
|
"jsx": "react-jsx",
|
|
|
|
/* Linting */
|
|
"strict": true,
|
|
"noUnusedLocals": true,
|
|
"noUnusedParameters": true,
|
|
"erasableSyntaxOnly": true,
|
|
"noFallthroughCasesInSwitch": true,
|
|
"noUncheckedSideEffectImports": true,
|
|
|
|
/* Path aliases. `react` / `react-dom` redirects let core/ source files
|
|
* (which live above clients/web/node_modules) resolve those bare imports
|
|
* during `tsc -b`. We point at the @types declaration packages so the
|
|
* imports type-check; Vite's `dedupe` handles the runtime resolution —
|
|
* see vite.config.ts.
|
|
*
|
|
* Two prefixes, and the difference is ownership rather than style. A
|
|
* `./node_modules/...` mapping names a package this client declares — the
|
|
* `@types/*` packages, `vitest`, `yaml`. A `../../node_modules/...` one
|
|
* names a package declared only in the root manifest (#2195), which is
|
|
* every runtime dependency `core/` imports. Those must be spelled out:
|
|
* `chokidar` in particular is still present under `clients/web` as a
|
|
* transitive copy of Vite's, so a `./node_modules` mapping resolves the
|
|
* client's copy at compile time while Vitest and the shipped bundle both
|
|
* resolve the root's. Same version today, and a silent skew tomorrow.
|
|
*
|
|
* Paths are relative to this config file (no `baseUrl` — deprecated in
|
|
* TypeScript 6 / removed in 7).
|
|
*/
|
|
"paths": {
|
|
"@inspector/core/*": ["../../core/*"],
|
|
"react": ["./node_modules/@types/react"],
|
|
"react-dom": ["./node_modules/@types/react-dom"],
|
|
"react/jsx-runtime": ["./node_modules/@types/react/jsx-runtime"],
|
|
"pino": ["../../node_modules/pino"],
|
|
"hono": ["../../node_modules/hono"],
|
|
"hono/streaming": [
|
|
"../../node_modules/hono/dist/types/helper/streaming/index"
|
|
],
|
|
"@hono/node-server": ["../../node_modules/@hono/node-server"],
|
|
"atomically": ["../../node_modules/atomically"],
|
|
"chokidar": ["../../node_modules/chokidar"],
|
|
"@napi-rs/keyring": ["../../node_modules/@napi-rs/keyring"],
|
|
"react-syntax-highlighter/dist/esm/prism-light": [
|
|
"./src/types/react-syntax-highlighter-prism-light"
|
|
],
|
|
"react-syntax-highlighter/dist/esm/styles/prism/tomorrow": [
|
|
"./src/types/react-syntax-highlighter-style"
|
|
],
|
|
"react-syntax-highlighter/dist/esm/languages/prism/*": [
|
|
"./src/types/react-syntax-highlighter-grammar"
|
|
]
|
|
}
|
|
},
|
|
"include": ["src", "../../core/**/*.ts"],
|
|
"exclude": [
|
|
"src/**/*.stories.tsx",
|
|
"src/**/*.stories.ts",
|
|
"src/**/*.test.tsx",
|
|
"src/**/*.test.ts",
|
|
"src/test/**",
|
|
"../../core/**/*.test.ts",
|
|
"../../core/**/*.test.tsx",
|
|
"../../core/**/__tests__/**"
|
|
]
|
|
}
|