feat(migration): add declare module rewriting support#357
Merged
Conversation
This was referenced Dec 22, 2025
Member
Author
0a2377e to
986f687
Compare
fda9731 to
b24cfe6
Compare
986f687 to
1a4348e
Compare
b24cfe6 to
e9087f3
Compare
1a4348e to
cc93454
Compare
e9087f3 to
b68fc5e
Compare
cc93454 to
4da046c
Compare
b68fc5e to
51df143
Compare
f96eab7 to
f02d318
Compare
51df143 to
be27764
Compare
f02d318 to
c2be0e2
Compare
be27764 to
6b51526
Compare
c2be0e2 to
9d34b0d
Compare
6b51526 to
08ece1b
Compare
08ece1b to
eb5aeab
Compare
9d34b0d to
ea8c676
Compare
eb5aeab to
4653d5e
Compare
ea8c676 to
a4b708d
Compare
4653d5e to
a5ed6db
Compare
a4b708d to
aac6031
Compare
e7cebaf to
7ea4cc7
Compare
aac6031 to
e3a2603
Compare
Member
|
cursor review |
Brooooooklyn
approved these changes
Dec 24, 2025
Add support for rewriting TypeScript `declare module` statements from vite/vitest to @voidzero-dev/vite-plus. This mirrors the existing import rewriting functionality but targets module declarations. Changes: - Add 6 new ast-grep rules for declare module statements - Update documentation to include declare module examples - Add 19 comprehensive tests covering all patterns - Support all variants: base modules, subpaths, and scoped packages The implementation uses ast-grep with `kind: module` to match declare module statements and rewrites module names using the same transformation logic as import statements. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
7ea4cc7 to
b8bd487
Compare
e3a2603 to
93ec15b
Compare
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 TypeScript
declare modulestatements fromvite/vitest to @voidzero-dev/vite-plus. This mirrors the existing
import rewriting functionality but targets module declarations.
Changes:
The implementation uses ast-grep with
kind: moduleto matchdeclare module statements and rewrites module names using the same
transformation logic as import statements.
🤖 Generated with Claude Code
Co-Authored-By: Claude Opus 4.5 noreply@anthropic.com
Note
Adds declare-module rewriting alongside existing import rewrites.
declare moduleforvite,vite/*,vitest,vitest/config,vitest/*, and@vitest/*variants; matches withkind: moduleand rewrites to the corresponding@voidzero-dev/vite-plustargetsimport_rewriter.rsrule set and docs to include declare-module cases; core rewrite pipeline unchangedmigration-from-vitest-config,migration-from-vitest-files, andmigration-rewrite-declare-modulewith updated expected outputs (rewritten module declarations and imports)Written by Cursor Bugbot for commit e3a2603. This will update automatically on new commits. Configure here.