Repository navigation
Conversation
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-migrate-oxc-reference-recovery-viteplus-dev.voidzero-docs.workers.dev (commit 45e5e20)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
95e937f to
1d38939
Compare
1d38939 to
45e5e20
Compare
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 45e5e20215
ℹ️ 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".
| const filenames = resolveConfigReferences(directory, reference); | ||
| if (!filenames?.length || changesDirectory) { | ||
| unresolvedConfigDirectories.add(directory); |
There was a problem hiding this comment.
Protect the target workspace when a script changes directories
For a root script such as cd packages/app && vp fmt -c .oxfmtrc.json src, this records uncertainty only for the root directory, not packages/app. Bash's help cd confirms that it will “Change the shell working directory,” so the referenced file belongs to the app package. The new existing-Vite+ finalization consequently treats the app's config as unreferenced, merges it, and deletes it, breaking the explicit-config script. Resolve the changed working directory or conservatively protect the potentially affected workspace configs before authorizing removal.
Useful? React with 👍 / 👎.
| const unresolvedContent = content.replace( | ||
| /(["'`])((?:\.{1,2}\/|\/|#)[^"'`\r\n]+)\1/g, |
There was a problem hiding this comment.
Follow bare workspace imports before deleting their JSON configs
When vite.config.ts imports a workspace config package by name, such as @repo/config, this regex skips the import entirely. If that package's exported module imports its own .oxfmtrc.json, the scanner never discovers the consumer. The new finalizeOxcConfigMigration path then merges and deletes that JSON file even in an existing Vite+ workspace without pending migration markers, leaving the root Vite config with a broken transitive import. Resolve bare workspace-package imports and inspect their exported modules before treating their standalone configs as removable.
Useful? React with 👍 / 👎.
vp migratecan remove Oxc JSON configs that scripts or imported modules still use. Existing Vite+ projects can also retain unmerged configs after an interrupted migration.The migrator now checks references before it merges configs or removes source files. It compares resolved paths and limits uncertain references to their workspace package. Retained JSON configs keep their inherited dependencies.
oxlint -c .oxlintrc.json, or a module imports an Oxc JSON config.vite.config.*.Recovery prepares inheritance graphs and references across the workspace before it removes any source files. It preserves existing inline config blocks and user edits to generated shared modules.
Supersedes #2695. Uses the inheritance conversion from #3097, which is now on
main.