Repository navigation
Conversation
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
The CI workflow skips tests when typechecking fails, preventing test failures from being reported alongside type errors.
1 open issue
What changed in this PR
Adds standalone TypeScript checks for the CodeQL Action and its development scripts, allowing type validation without a full build.
Changes:
- Add
typecheckcommands to both projects. - Run
pr-checkstypechecking and tests together in CI. - Exclude main-project tests from the
pr-checksconfiguration to avoid unnecessary checks and ESM/CommonJS incompatibilities.
| File | Description |
|---|---|
pr-checks/tsconfig.json |
Excludes main-project test files from typechecking. |
pr-checks/package.json |
Adds typecheck, test, and combined check scripts. |
package.json |
Adds the main project's no-emit typecheck command. |
.github/workflows/pr-checks.yml |
Runs the combined pr-checks checks in CI. |
Review effort: Max
| if: ${{ !cancelled() && steps.install-deps.outcome == 'success' }} | ||
| working-directory: pr-checks | ||
| run: npx tsx --test | ||
| run: npm run checks |
This branch has not been deployed
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.

A small follow-up to #4267 (comment) which adds
typecheckcommands to both projects. We already invoke the TypeScript compiler under other circumstances (e.g. when compiling tests), which will perform type-checking, but having the stand-alone commands is still nice because it is faster than a build.As a related improvement, I have excluded the main project's test files from the
pr-checksproject inpr-checks/tsconfig.json. The test files are not used there, add unnecessary overhead to the sub-project, and currently don't typecheck in the context of the sub-project because it uses ESM while the main project is on CJS.