Skip to content

chore: type-check tests following Effect v4 pattern#238

Open
solidsnakedev wants to merge 2 commits intomainfrom
chore/typecheck-tests
Open

chore: type-check tests following Effect v4 pattern#238
solidsnakedev wants to merge 2 commits intomainfrom
chore/typecheck-tests

Conversation

@solidsnakedev
Copy link
Copy Markdown
Collaborator

Summary

Adopt the Effect v4 tsconfig structure so that pnpm check type-checks both source and test files in one pass.

What changed

  • Root tsconfig.json — references tsconfig.build.json (src only) and directly includes all packages/*/test/**/*.ts globs with path aliases + noEmit: true
  • Root tsconfig.build.json — now references all 4 package build configs (previously only evolution)
  • Root package.json — added "check": "tsc -b tsconfig.json" for centralized type-checking
  • Per-package tsconfig.jsonevolution and evolution-devnet now reference their tsconfig.test.json (aiken-uplc and scalus-uplc already did)
  • Per-package scriptstype-check changed from tsc --noEmit (which checked zero files in a project-reference monorepo) to tsc -b tsconfig.json

Why

tsc --noEmit in a monorepo with project references and "include": [] checks zero files. Tests have never been type-checked. This PR surfaces ~108 pre-existing type errors in test files that were previously invisible.

Effect v4 pattern

Layer Config Purpose
Build tsconfig.build.json → per-package tsconfig.build.json tsc -b for emitting dist
Check tsconfig.json → refs build + includes test globs tsc -b for full type-checking

The pre-existing test type errors are not fixed in this PR — they will be addressed separately.

Adopt the Effect v4 tsconfig structure where:
- Root tsconfig.json references tsconfig.build.json (src only) and
  directly includes all test globs with path aliases + noEmit: true
- tsconfig.build.json references all per-package build configs
- Root 'check' script runs tsc -b tsconfig.json to type-check
  everything (src via references, tests via includes)

Per-package tsconfig.json files now also reference tsconfig.test.json
so per-package 'check' covers both src and tests locally.

This surfaces ~108 pre-existing type errors in test files that were
previously invisible because tsc --noEmit checked zero files in a
project-reference monorepo.
Copilot AI review requested due to automatic review settings April 9, 2026 22:54
CI runs 'turbo type-check' which should only check src/ to stay green.
The new 'check' script checks both src and tests for local dev use.

- type-check: tsc -b tsconfig.src.json (CI-safe, src only)
- check: tsc -b tsconfig.json (full, src + tests)
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Aligns the repo’s TypeScript project-reference setup with the Effect v4 pattern so a single root build (tsc -b) can type-check both sources and tests.

Changes:

  • Updated root tsconfig.json to reference tsconfig.build.json and include packages/*/test/** globs with path aliases and noEmit.
  • Expanded root tsconfig.build.json to reference all package build configs.
  • Added centralized check scripts (root + packages) and switched per-package type-check to tsc -b tsconfig.json.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tsconfig.json Root “check” config now includes tests and defines cross-package path aliases.
tsconfig.build.json Root build solution now references all package build configs.
package.json Adds check script to run a single root tsc -b.
packages/evolution/tsconfig.json Package tsconfig now references both src + test configs.
packages/evolution/package.json Switches type-checking to tsc -b and adds check.
packages/evolution-devnet/tsconfig.json Package tsconfig now references both src + test configs.
packages/evolution-devnet/package.json Switches type-checking to tsc -b and adds check.
packages/aiken-uplc/package.json Switches type-checking to tsc -b and adds check.
packages/scalus-uplc/package.json Switches type-checking to tsc -b and adds check.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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