Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
18f0f17 to
82824ac
Compare
ac4966d to
8cadba2
Compare
82824ac to
74d2fe0
Compare
8cadba2 to
6022743
Compare
74d2fe0 to
e032c42
Compare
b757f07 to
3725f63
Compare
e032c42 to
2794070
Compare
3725f63 to
65b55b8
Compare
9fffc2c to
a0e7d4a
Compare
ef7c83f to
3e10518
Compare
801cce1 to
ff0a31b
Compare
60fc265 to
72ca8ef
Compare
ff0a31b to
1ba133d
Compare
1ba133d to
fea670a
Compare
72ca8ef to
e68937d
Compare
9852dbe to
f7679e6
Compare
93d655f to
fc227b6
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds JSON configuration migration functionality to automatically merge standalone .oxlintrc and .oxfmtrc config files into the unified vite.config.ts format. The implementation uses AST-based transformation via ast-grep with TypeScript language support to handle various config patterns including object literals, function callbacks, and plain exports.
Key Changes:
- Adds TypeScript parser support to ast-grep for parsing config files
- Implements
mergeJsonConfignative binding to merge JSON configs into vite.config.ts using AST manipulation - Updates migration process to automatically detect and merge standalone configs when present
Reviewed changes
Copilot reviewed 43 out of 45 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| rfcs/migration-command.md | Corrects config key from "format" to "fmt" in documentation examples |
| packages/global/src/migration/migrator.ts | Adds rewriteViteConfigFile function to detect configs, create vite.config.ts if needed, and merge JSON configs |
| packages/global/src/migration/detector.ts | (Context) Provides config file detection functionality |
| packages/cli/binding/src/migration.rs | Exports mergeJsonConfig function to the JavaScript binding layer |
| packages/cli/binding/src/lib.rs | Adds merge_json_config to exported bindings |
| packages/cli/binding/index.js | Exports mergeJsonConfig from native binding |
| packages/cli/binding/index.d.ts | Adds TypeScript definitions for mergeJsonConfig and MergeJsonConfigResult |
| crates/vite_migration/src/vite_config.rs | Core implementation of JSON-to-TypeScript conversion and AST-based merging with comprehensive test coverage |
| crates/vite_migration/src/lib.rs | Exports merge_json_config and MergeResult from vite_config module |
| crates/vite_migration/rules/*.yaml | Reference AST-grep rule templates for config merging (not used programmatically) |
| Cargo.toml | Enables TypeScript language support in ast-grep-language dependency |
| Cargo.lock | Adds tree-sitter-typescript dependency |
| packages/global/snap-tests/* | Comprehensive snapshot tests covering various migration scenarios (monorepo, standalone, auto-create, different config formats) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fc227b6 to
dc4626e
Compare
dc4626e to
8b9e67d
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 48 out of 50 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 54 out of 56 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
cursor review |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 63 out of 65 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 60 out of 62 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 70 out of 74 changed files in this pull request and generated 10 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 74 out of 78 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 79 out of 83 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 83 out of 87 changed files in this pull request and generated 7 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 83 out of 87 changed files in this pull request and generated 5 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 84 out of 88 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

This PR adds functionality to migrate standalone configuration files (
.oxlintrc,.oxfmtrc) into the unified vite.config.ts format. The implementation:mergeJsonConfigfunction in the binding APIThe implementation handles edge cases like trailing commas, function callbacks, and different export styles to ensure reliable migration.
Note
Adds AST-driven migration that merges .oxlintrc/.oxfmtrc into vite.config, rewrites vite/vitest imports to vite-plus, exposes merge/rewrite APIs in bindings, and updates CLI with version checks and new workflow with tests.
vite_migration):ast-grepfeatures.merge_json_configandrewrite_importwith AST rules to:.oxlintrc/.oxfmtrcintodefineConfig(supports object, function callbacks, plain exports, return vars, satisfies).import ... from 'vite'and'vitest/config'to'@voidzero-dev/vite-plus'.rules/oxlint-*.yaml,rules/rewrite-import.yaml.mergeJsonConfigandrewriteImportinpackages/cli/binding(TS defs and JS exports).packages/global/src/migration):vite.config.*/vitest.config.*and rewrite imports.vite.config.tswhen missing and merge oxlint/oxfmt configs; remove old files.vite>=7,vitest>=4) with clear errors; upgrade Yarn <4.10 when needed.tree-sitter-typescriptviaast-grep-languagefeature; addtempfilefor tests.Written by Cursor Bugbot for commit 3d3af8c. This will update automatically on new commits. Configure here.