feat(migration): rewrite vitest imports#350
Merged
Merged
Conversation
Member
Author
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 17, 2025 06:44
91ed166 to
3b16db9
Compare
fengmk2
changed the base branch from
graphite-base/350
to
12-16-feat_global_print_versions_includes_global_and_local_cli
December 17, 2025 06:44
This was referenced Dec 17, 2025
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 17, 2025 07:41
3b16db9 to
8842612
Compare
fengmk2
force-pushed
the
12-16-feat_global_print_versions_includes_global_and_local_cli
branch
from
December 17, 2025 07:52
c6a589b to
8f92600
Compare
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
2 times, most recently
from
December 17, 2025 13:55
88c168d to
f6f9576
Compare
fengmk2
force-pushed
the
12-16-feat_global_print_versions_includes_global_and_local_cli
branch
from
December 19, 2025 00:48
8f92600 to
d2e3797
Compare
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
2 times, most recently
from
December 19, 2025 02:27
9d5a800 to
fe4caa0
Compare
fengmk2
force-pushed
the
12-16-feat_global_print_versions_includes_global_and_local_cli
branch
from
December 19, 2025 02:27
d2e3797 to
18fa81a
Compare
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 22, 2025 01:29
90f3ff8 to
fda9731
Compare
fengmk2
marked this pull request as ready for review
December 22, 2025 07:42
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 22, 2025 15:02
fda9731 to
b24cfe6
Compare
fengmk2
force-pushed
the
12-16-feat_global_print_versions_includes_global_and_local_cli
branch
from
December 22, 2025 15:02
18fa81a to
95db1ed
Compare
fengmk2
force-pushed
the
12-16-feat_global_print_versions_includes_global_and_local_cli
branch
from
December 23, 2025 02:28
95db1ed to
d781438
Compare
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 23, 2025 02:28
b24cfe6 to
e9087f3
Compare
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 23, 2025 08:24
e9087f3 to
b68fc5e
Compare
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 23, 2025 11:53
51df143 to
be27764
Compare
fengmk2
force-pushed
the
12-16-feat_global_print_versions_includes_global_and_local_cli
branch
2 times, most recently
from
December 24, 2025 03:30
96ffe79 to
7e188bb
Compare
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 24, 2025 03:30
be27764 to
6b51526
Compare
fengmk2
force-pushed
the
12-16-feat_global_print_versions_includes_global_and_local_cli
branch
from
December 24, 2025 04:38
7e188bb to
9c6c683
Compare
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 24, 2025 04:38
6b51526 to
08ece1b
Compare
fengmk2
commented
Dec 24, 2025
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 24, 2025 05:25
08ece1b to
eb5aeab
Compare
fengmk2
force-pushed
the
12-16-feat_global_print_versions_includes_global_and_local_cli
branch
from
December 24, 2025 05:41
9c6c683 to
6a53baa
Compare
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 24, 2025 05:41
eb5aeab to
4653d5e
Compare
Member
|
cursor review |
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 24, 2025 06:10
4653d5e to
a5ed6db
Compare
fengmk2
force-pushed
the
12-16-feat_global_print_versions_includes_global_and_local_cli
branch
from
December 24, 2025 06:10
6a53baa to
6fb9939
Compare
graphite-app
Bot
changed the base branch from
12-16-feat_global_print_versions_includes_global_and_local_cli
to
graphite-base/350
December 24, 2025 06:34
Add file walker module and batch rewrite functionality to process all TypeScript/JavaScript files in a directory while respecting .gitignore rules. - Add `ignore` crate dependency for gitignore-aware directory walking - Create `file_walker.rs` module with `find_ts_files()` function - Add `BatchRewriteResult` struct for tracking modified/unchanged/error files - Add `rewrite_imports_in_directory()` function for batch processing - Export new public API: `find_ts_files`, `WalkResult`, `BatchRewriteResult`, `rewrite_imports_in_directory` 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Move import rewriting logic from vite_config.rs to import_rewriter.rs for better separation of concerns: - vite_config.rs: Now focused only on JSON config merging - import_rewriter.rs: Handles all import rewriting (vite/vitest → vite-plus) This makes the codebase more maintainable and the module names more accurately reflect their responsibilities. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Add NAPI bindings for rewrite_imports_in_directory to expose the Rust batch import rewriting functionality to TypeScript. The migration command now rewrites vite/vitest imports in all TypeScript/JavaScript files, not just config files. Changes: - Add BatchRewriteResult and BatchRewriteError NAPI structs - Add rewriteImportsInDirectory NAPI function - Call rewriteAllImports in both standalone and monorepo migrations - Display progress showing modified files and any errors 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 24, 2025 07:01
a5ed6db to
e7cebaf
Compare
fengmk2
force-pushed
the
graphite-base/350
branch
from
December 24, 2025 07:01
6fb9939 to
317d019
Compare
…webdriverio Add rewrite rules for additional vitest browser packages: - @vitest/browser-preview → @voidzero-dev/vite-plus/test/browser-preview - @vitest/browser-webdriverio → @voidzero-dev/vite-plus/test/browser-webdriverio 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
fengmk2
force-pushed
the
12-16-feat_migration_rewrite_vitest_imports
branch
from
December 24, 2025 07:02
e7cebaf to
7ea4cc7
Compare
Brooooooklyn
approved these changes
Dec 24, 2025
Member
Author
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.

Add support for rewriting imports from vite/vitest to @voidzero-dev/vite-plus across an entire project:
ignorecrate dependency for gitignore-aware directory walkingfile_walker.rsmodule withfind_ts_files()function to locate TypeScript/JavaScript filesimport_rewriter.rsmodule with comprehensive import rewriting rules:vite→@voidzero-dev/vite-plusvite/{name}→@voidzero-dev/vite-plus/{name}vitest→@voidzero-dev/vite-plus/testvitest/config→@voidzero-dev/vite-plusvitest/{name}→@voidzero-dev/vite-plus/test/{name}@vitest/browser→@voidzero-dev/vite-plus/test/browser@vitest/browser/{name}→@voidzero-dev/vite-plus/test/browser/{name}@vitest/browser-playwright→@voidzero-dev/vite-plus/test/browser-playwright@vitest/browser-playwright/{name}→@voidzero-dev/vite-plus/test/browser-playwright/{name}rewrite_imports_in_directory()function for batch processing all filesThis enables the migration command to automatically rewrite all imports in a project, making it much easier for users to migrate from vite/vitest to vite-plus.
Note
Introduces automated, project-wide import rewriting from
vite/vitest(incl. subpaths and@vitest/*) to@voidzero-dev/vite-plus.find_ts_files()invite_migration/file_walker.rsusingignoreto respect.gitignore/global/excludeimport_rewriter.rswith ast-grep rules coveringvite,vite/{name},vitest,vitest/config,vitest/{name}, and@vitest/...→ mapped@voidzero-dev/vite-plusequivalentsrewrite_imports_in_directory()from Rust and NAPI (rewriteImportsInDirectory), plusBatchRewriteResult/BatchRewriteErrortypes; addignore::Errortovite_error::Error@vitest/browser*Written by Cursor Bugbot for commit 4653d5e. This will update automatically on new commits. Configure here.