Skip to content

Add typecheck commands - #4272

Open
mbg wants to merge 5 commits into
mainfrom
mbg/ci/typecheck
Open

mbg wants to merge 5 commits into
mainfrom
mbg/ci/typecheck

Conversation

@mbg

@mbg mbg commented Oct 27, 2026

Copy link
Copy Markdown
Member

A small follow-up to #4267 (comment) which adds typecheck commands 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-checks project in pr-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.

@mbg
mbg requested a review from a team as a code owner October 27, 2026 12:02
Copilot AI max review requested due to automatic review settings October 27, 2026 12:02
@github-actions github-actions Bot added the size/XS Should be very easy to review label Oct 27, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 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 typecheck commands to both projects.
  • Run pr-checks typechecking and tests together in CI.
  • Exclude main-project tests from the pr-checks configuration 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

Comment thread .github/workflows/pr-checks.yml Outdated

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Should be very easy to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants