You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The root `tsc -b` was a no-op — `tsconfig.json` had `files: []` and no
project references, so `pnpm typecheck` passed without checking any
package and CI never caught type regressions (~20 had accumulated).
Wire `pnpm typecheck` to `turbo run typecheck`, giving each package its
own `tsc --noEmit` script and an explicit `include`. Cross-package
imports resolve to source via the existing `paths` aliases, so checks
need no prior build. `plugins/*` is added to the workspace so future
plugins are typechecked automatically once they ship the script.
Fix the latent type errors this surfaces:
- declare the internal protocol RPC methods used by `broadcast`/`$call`
(client-state sync, auth-revoke, anonymous-auth) and the hub's
terminal/message notifications
- align `RpcSharedStateHost.get` with its string-keyed implementation,
removing the casts it forced at every call site
- annotate deliberately-throwing dump test handlers so they don't infer
a `never` return that broke `RpcDump` assignability
- supply the required `icon` on dock test entries and other minor fixes
pnpm test# pnpm build && vitest (api snapshot guards against stale dist)
25
-
pnpm typecheck # tsc --noEmit
25
+
pnpm typecheck #turbo run typecheck (per-package tsc --noEmit)
26
26
pnpm lint --fix # ESLint via @antfu/eslint-config
27
27
pnpm start # tsx src/index.ts
28
28
```
29
29
30
30
The `pnpm test` script intentionally runs `build` first so `tsnapi` snapshots compare against fresh `dist/`. `tsdown-stale-guard` enforces this in `test/api-snapshot.test.ts`.
31
31
32
+
`pnpm typecheck` fans out through Turbo: every workspace package owns a `"typecheck": "tsc --noEmit"` script and its own `tsconfig.json` (extending `tsconfig.base.json` with an explicit `include`). Cross-package imports resolve to source through the `paths` aliases in `tsconfig.base.json`, so no prior build is needed. Any package added under `packages/*` or `plugins/*` is typechecked automatically once it ships that `typecheck` script — add one to every new package so it can't silently skip type errors.
33
+
32
34
## Conventions
33
35
34
36
- RPC functions must use `defineRpcFunction`; always namespace IDs (`my-plugin:fn-name`).
0 commit comments