Skip to content

chore(deps): switch to tsgo for type checking#724

Merged
yamadashy merged 3 commits intomainfrom
chore/tsgo
Jul 8, 2025
Merged

chore(deps): switch to tsgo for type checking#724
yamadashy merged 3 commits intomainfrom
chore/tsgo

Conversation

@yamadashy
Copy link
Owner

Switch from tsc to tsgo for faster TypeScript type checking and improve CLAUDE.md rules enforcement.

Changes

  • Replace tsc --noEmit with tsgo in package.json for faster type checking
  • Update package-lock.json with tsgo dependency
  • Improve CLAUDE.md rules section formatting and clarity

Checklist

  • Run npm run test
  • Run npm run lint

🤖 Generated with Claude Code

yamadashy and others added 2 commits July 9, 2025 00:15
Replace tsc with tsgo for faster TypeScript type checking.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Restructure and strengthen the rules section to ensure AI assistants
read the project rules before starting work. Added clearer formatting
and more emphatic language to prevent rule violations.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 8, 2025 15:23
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jul 8, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Walkthrough

The CLAUDE.md file was updated to expand and reformat the guidance on reading project rules, introducing a prominent "Rules" section. In package.json, the TypeScript linting script switched from tsc to tsgo, a new dependency was added, and the order of existing dependencies was adjusted.

Changes

File(s) Change Summary
CLAUDE.md Expanded and reformatted guidance, adding a bold "Rules" section emphasizing reading base rules.
package.json Changed TypeScript lint script to use tsgo, added @typescript/native-preview dependency, and reordered tinypool in dependencies.

Possibly related PRs

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/tsgo

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

@claude
Copy link
Contributor

claude bot commented Jul 8, 2025

Claude finished @yamadashy's task —— View job


PR Review: Switch to tsgo for type checking

Todo List:

  • Read repository's CLAUDE.md file
  • Analyze changes in package.json (tsc → tsgo)
  • Review CLAUDE.md formatting improvements
  • Provide comprehensive feedback on code quality and design decisions

Review Summary

This PR successfully switches from tsc to tsgo for type checking while improving the CLAUDE.md rules section. The changes are well-implemented and follow the project's coding standards.

Strengths

1. Performance Improvement

  • The switch to tsgo (from @typescript/native-preview) provides faster type checking
  • Clean implementation as a drop-in replacement for tsc --noEmit
  • Smart approach: keeps tsc for actual compilation, only uses tsgo for type checking

2. Minimal Impact

  • No configuration changes required - same tsconfig.json files work
  • No breaking changes to existing workflows
  • Proper separation of concerns: linting vs. building

3. Documentation Enhancement

  • CLAUDE.md improvements add proper structure and emphasis
  • Clear formatting makes the rules section more prominent and readable
  • Better guidance for AI assistants working with the codebase

🔍 Technical Analysis

package.json Changes:

  • lint-ts script: tsc --noEmittsgo --noEmit (package.json:26)
  • Added @typescript/native-preview dependency (package.json:80)
  • Maintains backward compatibility with existing tools

CLAUDE.md Changes:

  • Enhanced rules section with proper Markdown headers and emphasis
  • Better structured guidance for Claude Code users
  • Improved readability and compliance enforcement

⚠️ Minor Considerations

1. Experimental Dependency

  • @typescript/native-preview@7.0.0-dev.20250708.1 is a development version
  • Risk: Potential instability or breaking changes in future updates
  • Mitigation: Pin to specific version (already done) and monitor for issues

2. Documentation Gap

  • Consider adding a brief comment in package.json about tsgo's purpose
  • Could benefit from a note in CONTRIBUTING.md about the TypeScript tooling setup

📋 Code Quality Assessment

  • Follows project standards: ✅ Proper commit messages, follows conventional commits
  • Testing: ✅ Checklist shows tests and linting were run
  • Architecture: ✅ Clean separation between type checking and compilation
  • Best practices: ✅ Minimal changes, focused scope

🎯 Recommendations

  1. Monitor for issues: Keep an eye on the experimental tsgo dependency in production
  2. Future enhancement: Consider documenting the TypeScript tooling strategy in CONTRIBUTING.md
  3. Performance tracking: Could measure and document the performance improvement for future reference

🔄 Verification

The PR includes proper verification:

  • ✅ Tests passed (npm run test)
  • ✅ Linting passed (npm run lint)
  • ✅ Changes are atomic and focused

Final Assessment

Overall: ✅ APPROVED

This is a well-executed performance optimization that maintains code quality and follows project conventions. The experimental nature of tsgo is appropriately handled through version pinning, and the benefits (faster type checking) outweigh the minimal risks.

The CLAUDE.md improvements add valuable clarity for AI assistants working with the codebase.

Recommendation: Ready to merge after addressing any team concerns about the experimental dependency.


Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @yamadashy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request primarily focuses on optimizing the TypeScript type checking process by migrating from tsc to tsgo for improved speed. Concurrently, it enhances the project's documentation for AI agents by making the rules section in CLAUDE.md more prominent and explicit.

Highlights

  • Type Checker Migration: The project's TypeScript type checking mechanism has been switched from tsc to tsgo to achieve faster performance, as indicated by the package.json script change.
  • New Dependency Added: The @typescript/native-preview package, which provides the tsgo executable, has been added as a development dependency, updating both package.json and package-lock.json.
  • Documentation Enhancement: The CLAUDE.md file has been updated to improve the clarity and emphasis of the rules section, particularly highlighting the importance of reading base.md for AI agents.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jul 8, 2025

Deploying repomix with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9aebaba
Status: ✅  Deploy successful!
Preview URL: https://8a07c865.repomix.pages.dev
Branch Preview URL: https://chore-tsgo.repomix.pages.dev

View logs

This comment was marked as outdated.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request switches from tsc to tsgo for TypeScript type checking, updates the package-lock.json file, and improves the formatting of the CLAUDE.md file. I've provided feedback on improving the formatting of the CLAUDE.md file and dependency ordering in package.json.

@codecov
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.40%. Comparing base (c030794) to head (9aebaba).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #724   +/-   ##
=======================================
  Coverage   90.40%   90.40%           
=======================================
  Files          99       99           
  Lines        5710     5710           
  Branches     1193     1193           
=======================================
  Hits         5162     5162           
  Misses        548      548           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
CLAUDE.md (1)

5-9: Minor grammar / formatting clean-up

Small spacing tweaks improve readability.

 # Rules
-**IMPORTANT**
-Before starting any work, you MUST first read and understand the rules in `.agents/rules/base.md`.
-These rules contain critical project-specific guidelines and instructions that must be followed for all work in this repository.
-Do NOT proceed with any work without reading these rules first.
+**IMPORTANT**  
+Before starting any work, **you MUST** read and understand the rules in `.agents/rules/base.md`.  
+These rules contain critical, project-specific guidelines that apply to all work in this repository.  
+**Do NOT** proceed without reading those rules first.
📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c030794 and e2e15fc.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (2)
  • CLAUDE.md (1 hunks)
  • package.json (3 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
PR: yamadashy/repomix#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T16:07:20.939Z
Learning: Check the rules written in `.agents/rules/base.md` as they contain important project-specific guidelines and instructions.
Learnt from: CR
PR: yamadashy/repomix#0
File: .cursorrules:0-0
Timestamp: 2025-06-30T16:07:18.316Z
Learning: Applies to .agents/rules/base.md : Check the rules written in `.agents/rules/base.md` as they contain important project-specific guidelines and instructions.
CLAUDE.md (2)
Learnt from: CR
PR: yamadashy/repomix#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T16:07:20.939Z
Learning: Check the rules written in `.agents/rules/base.md` as they contain important project-specific guidelines and instructions.
Learnt from: CR
PR: yamadashy/repomix#0
File: .cursorrules:0-0
Timestamp: 2025-06-30T16:07:18.316Z
Learning: Applies to .agents/rules/base.md : Check the rules written in `.agents/rules/base.md` as they contain important project-specific guidelines and instructions.
🪛 LanguageTool
CLAUDE.md

[grammar] ~7-~7: Use proper spacing conventions.
Context: ...nd the rules in .agents/rules/base.md. These rules contain critical project-spe...

(QB_NEW_EN_OTHER_ERROR_IDS_000007)


[grammar] ~8-~8: Use proper spacing conventions.
Context: ...ollowed for all work in this repository. Do NOT proceed with any work without rea...

(QB_NEW_EN_OTHER_ERROR_IDS_000007)


[grammar] ~9-~9: Use proper spacing conventions.
Context: ... work without reading these rules first.

(QB_NEW_EN_OTHER_ERROR_IDS_000007)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
  • GitHub Check: Build and run (macos-latest, 23.x)
  • GitHub Check: Build and run (macos-latest, 22.x)
  • GitHub Check: Build and run (macos-latest, 21.x)
  • GitHub Check: Build and run (windows-latest, 20.x)
  • GitHub Check: Build and run (ubuntu-latest, 23.x)
  • GitHub Check: Build and run (windows-latest, 21.x)
  • GitHub Check: Build and run (windows-latest, 22.x)
  • GitHub Check: Build and run (windows-latest, 24.x)
  • GitHub Check: Test (macos-latest, 23.x)
  • GitHub Check: Test (ubuntu-latest, 23.x)
  • GitHub Check: Test (windows-latest, 23.x)
  • GitHub Check: Test (macos-latest, 24.x)
  • GitHub Check: Test (windows-latest, 21.x)
  • GitHub Check: Test (windows-latest, 22.x)
  • GitHub Check: Test (windows-latest, 20.x)
  • GitHub Check: Test with Bun (ubuntu-latest, latest)
  • GitHub Check: Test with Bun (windows-latest, latest)
  • GitHub Check: Build and run with Bun (windows-latest, latest)
  • GitHub Check: Analyze (javascript-typescript)
  • GitHub Check: auto-review
  • GitHub Check: Cloudflare Pages

Move @typescript/native-preview from dependencies to devDependencies
as it's only needed for type checking during development.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@yamadashy yamadashy requested a review from Copilot July 8, 2025 15:32
Copy link
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

Switches the TypeScript checker from tsc to tsgo for performance and clarifies the CLAUDE.md rules section formatting.

  • Updates the lint-ts script to use tsgo and adjusts dependencies (adds @typescript/native-preview, reorders tinypool).
  • Improves CLAUDE.md by adding a dedicated “Rules” heading and emphasizing the base rules file requirement.

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.

File Description
package.json Change lint script, add preview TypeScript package, reorder entries
CLAUDE.md Introduce a “Rules” section with stronger formatting
Comments suppressed due to low confidence (4)

CLAUDE.md:5

  • [nitpick] The new # Rules heading may not match the rest of the document’s structure—if other sections use ##, consider aligning heading levels and list formatting for consistency.
# Rules

package.json:26

  • The lint-ts script now invokes tsgo, but tsgo isn’t declared in package.json dependencies or devDependencies. Add it under devDependencies to avoid CI/script failures.
    "lint-ts": "tsgo --noEmit",

package.json:96

  • [nitpick] Moving tinypool here breaks the alphabetical ordering of dependencies. Consider restoring its original position or re-sorting the block for consistency.
    "tinypool": "^1.1.1",

package.json:106

  • [nitpick] @typescript/native-preview is a development tool; it’s better placed under devDependencies so production installs aren’t affected.
    "@typescript/native-preview": "^7.0.0-dev.20250708.1",

@yamadashy yamadashy merged commit a1a43c9 into main Jul 8, 2025
54 checks passed
@yamadashy yamadashy deleted the chore/tsgo branch July 8, 2025 15:34
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