Skip to content

fix(migrate): use latest @oxlint/migrate instead of pinning to oxlint version#751

Merged
fengmk2 merged 2 commits intomainfrom
fix-oxlint-migrate-version
Mar 10, 2026
Merged

fix(migrate): use latest @oxlint/migrate instead of pinning to oxlint version#751
fengmk2 merged 2 commits intomainfrom
fix-oxlint-migrate-version

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Mar 10, 2026

Summary

  • Use @oxlint/migrate (latest) instead of pinning to the installed oxlint version
  • @oxlint/migrate publishes less frequently than oxlint, so when the catalog's ^1.51.0 resolves to 1.52.0 in a fresh install (no lockfile), @oxlint/migrate@1.52.0 doesn't exist and the migration fails

Test plan

  • CI e2e tests pass (vue-mini eslint migration no longer fails)

@netlify
Copy link
Copy Markdown

netlify Bot commented Mar 10, 2026

Deploy Preview for viteplus-staging canceled.

Name Link
🔨 Latest commit 256babc
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-staging/deploys/69afa71049a76a0008531b39

Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 10, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2 fengmk2 self-assigned this Mar 10, 2026
@fengmk2 fengmk2 added the test: e2e Auto run e2e tests label Mar 10, 2026 — with Graphite App
@fengmk2 fengmk2 marked this pull request as ready for review March 10, 2026 03:20
Comment thread packages/cli/src/migration/migrator.ts Outdated
@fengmk2 fengmk2 changed the title fix(migrate): resolve @oxlint/migrate version from vite-plus's own oxlint fix(migrate): use latest @oxlint/migrate instead of pinning to oxlint version Mar 10, 2026
@fengmk2 fengmk2 force-pushed the fix-oxlint-migrate-version branch from 52e230d to b022994 Compare March 10, 2026 04:41
Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 10, 2026

Merge activity

  • Mar 10, 4:41 AM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 10, 5:07 AM UTC: Graphite rebased this pull request as part of a merge.
  • Mar 10, 5:19 AM UTC: @fengmk2 merged this pull request with Graphite.

fengmk2 added 2 commits March 10, 2026 05:07
…lint

The `resolve()` helper searches `process.cwd()` first, which finds the
user's project oxlint instead of vite-plus's bundled version. Use
`createRequire(import.meta.url)` to always resolve from the CLI package's
own dependencies, ensuring the @oxlint/migrate version matches the oxlint
that vite-plus will actually use.
… version

@oxlint/migrate publishes less frequently than oxlint, so pinning to the
installed oxlint version (e.g. 1.52.0) can fail when that version of
@oxlint/migrate doesn't exist yet. Use the latest version instead.
@fengmk2 fengmk2 force-pushed the fix-oxlint-migrate-version branch from b022994 to 256babc Compare March 10, 2026 05:07
@fengmk2 fengmk2 merged commit 96413fb into main Mar 10, 2026
37 checks passed
@fengmk2 fengmk2 deleted the fix-oxlint-migrate-version branch March 10, 2026 05:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants