Skip to content

chore: type-check spec files in demo and ai-studio - #153

Merged
librowski merged 1 commit into
mainfrom
chore/typecheck-app-specs
Sep 16, 2026
Merged

librowski merged 1 commit into
mainfrom
chore/typecheck-app-specs

Conversation

@librowski

@librowski librowski commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

apps/demo and apps/ai-studio excluded src/**/*.spec.* and src/**/*.test.* from their tsconfig, so the pre-commit tsc --noEmit from lint-staged and pnpm check never type-checked tests and stayed green with type errors in them. CI does not type-check these apps by design (pr-check.yml header). Both exclusions come from the initial 2.0.0 import, before either app had a test. packages/sdk and packages/ui already type-check their specs.

Neither tsconfig emits anything (vite builds the apps), so the exclusion only removed a check.

Changes

  • apps/demo/tsconfig.json and apps/ai-studio/tsconfig.json: exclude keeps only dist; "vitest/globals" joins types, as in the packages, so a spec written against test.globals (no vitest import) type-checks instead of failing with TS2593.

Checks

  • pnpm -F @workflow-builder/demo typecheck and pnpm -F ai-studio typecheck pass with no code changes.
  • A deliberate const probe: number = 'x' appended to detect-format.test.ts fails the AI Studio typecheck; a spec using bare describe/it/expect type-checks with vitest/globals and fails without it.
  • AI Studio tests: 16 passing.

Comment thread apps/ai-studio/tsconfig.json Outdated
Comment thread apps/ai-studio/tsconfig.json
Both app tsconfigs excluded spec and test files, so the pre-commit
`tsc --noEmit` from lint-staged and `pnpm check` never saw them. CI does
not type-check these apps by design (see pr-check.yml). The exclusion
predates the first tests in these apps; removing it needs no code
changes. `vitest/globals` joins `types` in both apps, as in the packages,
so a spec that relies on `test.globals` type-checks too.
@librowski
librowski force-pushed the chore/typecheck-app-specs branch from 906deb0 to b765428 Compare September 16, 2026 11:37
@librowski
librowski merged commit b926e94 into main Sep 16, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants