Skip to content

feat: add typecheck CI step and fix Turborepo caching#270

Merged
Zeryther merged 2 commits into
mainfrom
feature/typecheck-ci
Feb 25, 2026
Merged

feat: add typecheck CI step and fix Turborepo caching#270
Zeryther merged 2 commits into
mainfrom
feature/typecheck-ci

Conversation

@Zeryther

@Zeryther Zeryther commented Feb 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Add per-package tsc --noEmit typecheck scripts to all 7 packages, orchestrated through Turborepo with proper dependency ordering and caching
  • Add parallel typecheck CI job to the test workflow (now four gates: test, lint, format, typecheck)
  • Fix pre-existing type error in CLI build command (missing PackageJsonParseError import)
  • Remove dead lint turbo task (linting runs centrally from root, no packages have a lint script)
  • Narrow globalDependencies from ["package.json"] to ["pnpm-lock.yaml", ".nvmrc", "tsconfig.base.json"] to avoid unnecessary cache invalidation
  • Harmony uses a dedicated tsconfig.check.json to exclude Storybook stories from type-checking

Test plan

  • pnpm typecheck passes across all 7 packages
  • pnpm build passes
  • pnpm lint passes
  • pnpm format passes
  • Turbo cache hits correctly on second run (136ms vs 8s)
  • CI workflow runs all four jobs in parallel

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Integrated TypeScript type checking into the continuous integration pipeline, establishing it as a required validation step alongside testing, linting, and formatting.
    • Added type checking commands across development packages.
    • Configured automated type safety checks to run on every commit.

Add per-package `tsc --noEmit` typecheck scripts orchestrated through
Turborepo, with a parallel CI job in the test workflow. Also fix
pre-existing type error in CLI build command (missing PackageJsonParseError
import), remove dead `lint` turbo task (linting runs centrally, not
per-package), and narrow globalDependencies to avoid over-invalidation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Feb 25, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: eede7f9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Feb 25, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sdk-harmony Ready Ready Preview, Comment Feb 25, 2026 7:27am

Request Review

@coderabbitai

coderabbitai Bot commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@Zeryther has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 25 minutes and 29 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between de779ac and eede7f9.

📒 Files selected for processing (1)
  • turbo.json
📝 Walkthrough

Walkthrough

A TypeScript type-checking step is introduced across the monorepo. A new "typecheck" task runs tsc --noEmit in parallel with existing tests, linting, and formatting checks. The CI workflow is updated to include this job, turbo.json is configured with the task, and package.json scripts are added across packages.

Changes

Cohort / File(s) Summary
CI Workflow
.github/workflows/test.yaml
Added a new Type Check job that runs pnpm typecheck and integrated it into the CI summary decision logic, which now validates TYPECHECK alongside TEST, LINT, and FORMAT.
Turbo Configuration
turbo.json
Replaced "lint" task with new "typecheck" task, updated task dependencies from ^lint to ^typecheck, modified inputs to include tsconfig files, and expanded globalDependencies to include pnpm-lock.yaml, .nvmrc, and tsconfig.base.json.
Root and Package Scripts
package.json, local/tsup/package.json, packages/build-utils/package.json, packages/cli/package.json, packages/commons/package.json, packages/network-config/package.json, packages/sdk/package.json
Added new "typecheck" script using tsc --noEmit to enable TypeScript type checking across all packages.
Harmony Package Configuration
packages/harmony/package.json, packages/harmony/tsconfig.check.json
Added "typecheck" script with custom tsconfig path (tsc --noEmit -p tsconfig.check.json) and created new tsconfig.check.json that extends the base config and restricts type checking to the src directory.
CLI Imports
packages/cli/src/commands/build/index.ts
Updated import to include PackageJsonParseError from the errors module.
Documentation
AGENTS.md
Updated section heading from "Lint & Format" to "Lint, Format & Type Check" and added pnpm typecheck command to the documented build/test workflow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested labels

enhancement

Poem

🐰 A rabbit hops through monorepo rows,
Adding typecheck wherever it goes,
TypeScript now validates with care,
In turbo tasks and CI there,
Type safety blooms, the pipeline glows! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main changes: adding a typecheck CI step and fixing Turborepo caching, which are the two core objectives of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/typecheck-ci

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

The typecheck task depended on ^typecheck, but tsc --noEmit produces no
output. In CI (no prior build), dependent packages like the CLI couldn't
resolve workspace imports because dist/*.d.ts files didn't exist. Changing
to ^build ensures dependency packages are built first.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@coderabbitai coderabbitai Bot 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.

🧹 Nitpick comments (1)
turbo.json (1)

4-4: package.json removed from globalDependencies — verify coverage is adequate.

The root package.json is no longer a global dependency. Changes like pnpm.overrides or workspace protocol bumps in package.json will only invalidate caches if they also touch pnpm-lock.yaml. Since pnpm-lock.yaml is now included, this is generally fine — but it's worth confirming that no root package.json fields affect task outputs independently of the lockfile.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@turbo.json` at line 4, You removed "package.json" from the turbo.json
globalDependencies list; inspect the root package.json for any fields that can
influence task outputs (e.g., pnpm.overrides, workspace protocol versions,
scripts, engines, or any custom metadata used by build tools) and either re-add
"package.json" into globalDependencies or update CI/caching docs to ensure those
fields are covered by pnpm-lock.yaml; specifically review the turbo.json
"globalDependencies" array and the root package.json for
pnpm.overrides/workspace entries or other build-time metadata and make the
change (re-add or document/adjust) so cache invalidation remains correct.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@turbo.json`:
- Line 4: You removed "package.json" from the turbo.json globalDependencies
list; inspect the root package.json for any fields that can influence task
outputs (e.g., pnpm.overrides, workspace protocol versions, scripts, engines, or
any custom metadata used by build tools) and either re-add "package.json" into
globalDependencies or update CI/caching docs to ensure those fields are covered
by pnpm-lock.yaml; specifically review the turbo.json "globalDependencies" array
and the root package.json for pnpm.overrides/workspace entries or other
build-time metadata and make the change (re-add or document/adjust) so cache
invalidation remains correct.

ℹ️ Review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b5ee20c and de779ac.

📒 Files selected for processing (13)
  • .github/workflows/test.yaml
  • AGENTS.md
  • local/tsup/package.json
  • package.json
  • packages/build-utils/package.json
  • packages/cli/package.json
  • packages/cli/src/commands/build/index.ts
  • packages/commons/package.json
  • packages/harmony/package.json
  • packages/harmony/tsconfig.check.json
  • packages/network-config/package.json
  • packages/sdk/package.json
  • turbo.json

@Zeryther
Zeryther merged commit 377dddc into main Feb 25, 2026
13 checks passed
@Zeryther
Zeryther deleted the feature/typecheck-ci branch February 25, 2026 07:36
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.

1 participant