Skip to content

chore: modernize toolchain to Vite, Vitest, and Biome - #69

Merged
hideokamoto merged 2 commits into
masterfrom
claude/modernize-vite-vitest-01HKgAkqaGUAAUF1aD5BhVKN
Nov 16, 2025
Merged

chore: modernize toolchain to Vite, Vitest, and Biome#69
hideokamoto merged 2 commits into
masterfrom
claude/modernize-vite-vitest-01HKgAkqaGUAAUF1aD5BhVKN

Conversation

@hideokamoto

Copy link
Copy Markdown
Collaborator

Replace deprecated TSDX with modern build tools:

  • Vite for faster builds and better DX
  • Vitest for lightning-fast testing with React Testing Library
  • Biome for unified linting and formatting
  • TypeScript 5 for latest type features
  • React 18 with new JSX transform
  • Husky 9 for git hooks

All tests passing with improved coverage and better test assertions.

Replace deprecated TSDX with modern build tools:
- Vite for faster builds and better DX
- Vitest for lightning-fast testing with React Testing Library
- Biome for unified linting and formatting
- TypeScript 5 for latest type features
- React 18 with new JSX transform
- Husky 9 for git hooks

All tests passing with improved coverage and better test assertions.
@coderabbitai

coderabbitai Bot commented Nov 16, 2025

Copy link
Copy Markdown

Warning

Rate limit exceeded

@hideokamoto has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 8 minutes and 14 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 cf9ce72 and da260f3.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (13)
  • .github/workflows/main.yml (1 hunks)
  • .gitignore (1 hunks)
  • .husky/pre-commit (1 hunks)
  • README.md (1 hunks)
  • biome.json (1 hunks)
  • example/index.tsx (1 hunks)
  • package.json (1 hunks)
  • renovate.json (1 hunks)
  • src/index.tsx (2 hunks)
  • test/blah.test.tsx (1 hunks)
  • tsconfig.json (1 hunks)
  • vite.config.ts (1 hunks)
  • vitest.config.ts (1 hunks)

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch claude/modernize-vite-vitest-01HKgAkqaGUAAUF1aD5BhVKN

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

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello @hideokamoto, 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 undertakes a significant modernization of the project's development toolchain. By replacing the deprecated TSDX with a contemporary stack including Vite, Vitest, and Biome, the project benefits from faster builds, enhanced testing capabilities, and automated code quality enforcement. These updates collectively aim to improve developer experience, maintainability, and ensure the project leverages the latest advancements in the JavaScript ecosystem.

Highlights

  • Toolchain Modernization: Replaced TSDX with Vite for building, Vitest for testing, and Biome for linting and formatting, significantly upgrading the development environment.
  • Dependency Updates: Upgraded core dependencies including TypeScript to version 5, React to version 18, and Husky to version 9, leveraging the latest features and improvements.
  • Enhanced Testing: Migrated the testing framework to Vitest and React Testing Library, introducing more comprehensive and robust test assertions for better code reliability.
  • Code Quality Enforcement: Integrated Biome to provide unified and automated linting and formatting, ensuring consistent code style and reducing manual review effort.
  • Optimized Build Process: Switched to Vite for the build system, resulting in faster build times and an improved developer experience, with support for both ESM and CommonJS outputs.
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 by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

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 pull request 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 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

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.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This is an excellent modernization of the project's toolchain. Migrating from the deprecated TSDX to Vite, Vitest, and Biome brings significant improvements in build speed, testing, and developer experience. The configuration for the new tools is well-structured, and the updates to package.json and tsconfig.json are thorough. The test suite has been significantly improved with more comprehensive and modern tests using React Testing Library. I've left a couple of minor suggestions to fix a typo and further align the new tests with best practices, but overall this is a fantastic update.

Comment thread src/index.tsx
throw new Error('unsuported type' + t);
default: {
const t: never = color;
throw new Error(`unsuported type${t}`);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

There's a typo in the error message (unsuported). Also, consider adding a space after type for better readability.

Suggested change
throw new Error(`unsuported type${t}`);
throw new Error(`unsupported type: ${t}`);

Comment thread test/blah.test.tsx
Comment on lines +13 to +17
const { container } = render(
<GitHubRibbon href="https://github.com/test/repo" />
);
const link = container.querySelector('a');
expect(link?.href).toBe('https://github.com/test/repo');

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Great job on improving the tests! To align further with React Testing Library's best practices, it's recommended to use queries from screen instead of container.querySelector. This encourages testing from a user's perspective. This same feedback applies to the other tests in this file that use container.

For example, this test can be rewritten as follows:

Suggested change
const { container } = render(
<GitHubRibbon href="https://github.com/test/repo" />
);
const link = container.querySelector('a');
expect(link?.href).toBe('https://github.com/test/repo');
render(<GitHubRibbon href="https://github.com/test/repo" />);
const link = screen.getByRole('link');
expect(link).toHaveAttribute('href', 'https://github.com/test/repo');

Update CI workflow with modern tooling and best practices:
- actions/checkout@v2 → v4
- actions/setup-node@v1 → v4 with built-in caching
- Node.js 12 → matrix build on 18.x, 20.x, 22.x
- yarn → npm for consistency
- Add coverage reporting with Vitest v8 provider
- Add test:coverage script
- Exclude example and config files from coverage
- Trigger on push/PR to main/master branches

Coverage: 87.71% on src/index.tsx
@hideokamoto

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 16, 2025

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@hideokamoto
hideokamoto merged commit 9fd3247 into master Nov 16, 2025
4 checks passed
@hideokamoto
hideokamoto deleted the claude/modernize-vite-vitest-01HKgAkqaGUAAUF1aD5BhVKN branch November 16, 2025 23:48
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