chore: type-check tests following Effect v4 pattern#238
Open
solidsnakedev wants to merge 2 commits intomainfrom
Open
chore: type-check tests following Effect v4 pattern#238solidsnakedev wants to merge 2 commits intomainfrom
solidsnakedev wants to merge 2 commits intomainfrom
Conversation
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.
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)
Contributor
There was a problem hiding this comment.
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.jsonto referencetsconfig.build.jsonand includepackages/*/test/**globs with path aliases andnoEmit. - Expanded root
tsconfig.build.jsonto reference all package build configs. - Added centralized
checkscripts (root + packages) and switched per-packagetype-checktotsc -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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adopt the Effect v4 tsconfig structure so that
pnpm checktype-checks both source and test files in one pass.What changed
tsconfig.json— referencestsconfig.build.json(src only) and directly includes allpackages/*/test/**/*.tsglobs with path aliases +noEmit: truetsconfig.build.json— now references all 4 package build configs (previously onlyevolution)package.json— added"check": "tsc -b tsconfig.json"for centralized type-checkingtsconfig.json—evolutionandevolution-devnetnow reference theirtsconfig.test.json(aiken-uplc and scalus-uplc already did)type-checkchanged fromtsc --noEmit(which checked zero files in a project-reference monorepo) totsc -b tsconfig.jsonWhy
tsc --noEmitin 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
tsconfig.build.json→ per-packagetsconfig.build.jsontsc -bfor emitting disttsconfig.json→ refs build + includes test globstsc -bfor full type-checkingThe pre-existing test type errors are not fixed in this PR — they will be addressed separately.