Skip to content

fix(migrate): protect Oxc references and recover interrupted migrations - #3115

Open
fengmk2 wants to merge 2 commits into
mainfrom
fix/migrate-oxc-reference-recovery
Open

fengmk2 wants to merge 2 commits into
mainfrom
fix/migrate-oxc-reference-recovery

Conversation

@fengmk2

@fengmk2 fengmk2 commented Oct 19, 2026 •

Copy link
Copy Markdown
Member

vp migrate can 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.

Case Before After
A script uses oxlint -c .oxlintrc.json, or a module imports an Oxc JSON config. Migration can delete the file and break the consumer. Migration keeps the referenced file.
Root and package configs have the same filename; only the root config has an external reference. Migration can delete both files. Migration keeps the root config and merges the independent package config.
Vite+ is installed, but unreferenced Oxc configs remain without a pending migration marker. A regular migration leaves those configs outside vite.config.*. Migration merges the remaining configs, including supported inheritance through shared TypeScript configs.
A script or module starts using retained JSON after a partial migration. A retry can delete the file after it finds a completed migration marker. A retry checks current references before it merges or removes files.

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.

@fengmk2
fengmk2 added this pull request to stack #3116 October 19, 2026 06:36
@fengmk2 fengmk2 changed the title fix/migrate oxc reference recovery fix(migrate): protect Oxc references and recover interrupted migrations Oct 19, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-migrate-oxc-reference-recovery-viteplus-dev.voidzero-docs.workers.dev (commit 1d38939)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://a367208e-viteplus-dev.voidzero-docs.workers.dev 1d38939 2026-10-20T16:35:51.980Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c421331e-viteplus-dev.voidzero-docs.workers.dev 95e937f 2026-10-19T06:37:17.075Z Visit the dashboard ↗

Base automatically changed from fix/migrate-oxlint-extends to main October 20, 2026 16:07
@fengmk2
fengmk2 force-pushed the fix/migrate-oxc-reference-recovery branch from 95e937f to 1d38939 Compare October 20, 2026 16:32
@fengmk2
fengmk2 marked this pull request as ready for review October 20, 2026 16:33
@fengmk2 fengmk2 self-assigned this Oct 20, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant