fix(migrate): finish leftover Oxc config migration - #2654
Conversation
Existing Vite+ projects skip standalone Oxc config merging when migration is retried. Reuse the config merger during core finalization for the root and workspace packages, and report completed merges as migration work. Add regression coverage for retry behavior, inline config precedence, merge warnings, and formatting with migrated options.
Merge upstream main while preserving both leftover-config finalization paths and their migration result flags. Update result assertions and cover simultaneous Oxfmt and tsdown config migration with an idempotent retry. Validation: 436 migration tests passed across 11 files. Targeted formatting and diff checks passed. Targeted type checking reports the same seven prompt cancellation diagnostics as upstream main in the same environment.
|
@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. |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
| @@ -0,0 +1 @@ | |||
| export default {}; | |||
There was a problem hiding this comment.
What will happen if there is already an fmt config field in vite.config.ts?
When an interrupted migration has already added
vite-plus, runningvp migrateagain can leave.oxfmtrc.jsonbehind and report that the project already uses Vite+. Formatting then uses defaults instead of the unmerged options.The existing-project finalization path skips standalone Oxc configs. Run the existing config merger for the root and workspace packages, and count completed merges as migration work. This covers Oxlint and Oxfmt JSON/JSONC configs, preserves existing inline config precedence, and retains configs that cannot be merged with a warning. A subsequent migration remains a no-op.
The branch incorporates upstream main at
b1c41b2a, including the leftover tsdown config fix from #2646. Both finalization paths and result flags are preserved. A regression test covers simultaneous Oxfmt and tsdown config migration and an unchanged retry.Verification
After resolving the upstream merge:
git diff --check: passed.b1c41b2ain the same environment produced identical diagnostics.Before the merge, the PR's recorded validation included a passing
migration_existing_oxc_configsPTY snapshot. It covers config removal, formatting with migrated options, an unchanged second migration, and no opt-out setup artifacts.