Repository navigation
feat(cli): ship migrate-v2 from main - #9178
Merged
Merged
Conversation
Keeps the CLI loadable without the migrate-only dependencies even when they are imported statically, and lets migrate-v2 find the ts-morph it installs when the CLI runs outside the project (npx). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WiKN3vtED6Tfy49qCcsKqN
🦋 Changeset detectedLatest commit: 5cecd98 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
3 tasks done
wmertens
force-pushed
the
claude/focused-heisenberg-mp5m0s
branch
from
October 7, 2026 09:23
3a92ad5 to
bd106a3
Compare
@qwik.dev/core
@qwik.dev/router
@qwik.dev/utils
eslint-plugin-qwik
create-qwik
@qwik.dev/optimizer
@qwik.dev/devtools
@qwik.dev/mcp
commit: |
Copies packages/qwik/src/cli/migrate-v2 from the v1 branch so the migration ships from @qwik.dev/core. The v1 starters test is left out because main's starters are already v2. Import names are narrowed to identifiers for ts-morph 27, whose import specifier names can also be string literals. visitNotIgnoredFiles returns `/`-separated paths so the path checks also work on Windows, which v1 CI never ran the unit tests on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WiKN3vtED6Tfy49qCcsKqN
wmertens
force-pushed
the
claude/focused-heisenberg-mp5m0s
branch
from
October 7, 2026 09:32
bd106a3 to
53b4a79
Compare
Contributor
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
wmertens
force-pushed
the
claude/focused-heisenberg-mp5m0s
branch
from
October 7, 2026 20:21
53b4a79 to
5cecd98
Compare
This was referenced Oct 7, 2026
maiieul
approved these changes
Oct 23, 2026
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What is it?
Description
qwik migrate-v2has only been developed and published on thev1branch, where it ships inside@builder.io/qwik. This PR moves it tomainso it ships with@qwik.dev/core. That way a fix to the migration doesn't need a v1 release, and the migration always targets the v2 version it ships with.Related PRs:
qwik migrate-v2run this one and deletes the v1 copy): feat(cli): run migrate-v2 from @qwik.dev/core #9179. Merge and release this one first.npx @qwik.dev/core@latest migrate-v2) is in the draft docs: run migrate-v2 from @qwik.dev/core@latest #9184. It should merge only after this PR is released, because docs deploy right after CI passes onmain, and until then@lateststill has the old migration, which fails on v1 apps pinned to Vite 7.Commits:
build(cli): bundle
semverandignore, loadts-morphfrom the project. The v1 code imports these at the top of the file. In main's ESMcli.mjs, a top-level import of an external package would come back as chore: update pnpm-lock.yaml and package.json to include ts-morph and… #8507: everyqwikcommand crashes when those packages are missing.semverandignoreare small, so they are now bundled.ts-morphgoes through a lazycreateRequire(process.cwd()), which only runs when the migration starts. This is also what letsnpx @qwik.dev/core@latest migrate-v2work: the CLI then lives in the npx cache, and it has to find thets-morphthat the migration installs into the user's project.feat(cli): port the v1 migrate-v2 command.
packages/qwik/src/cli/migrate-v2is copied fromorigin/v1, with two small changes:visitNotIgnoredFilesnow returns/-separated paths on every OS. On Windows it returned\paths, so/routes/and path-marker checks never matched: error-boundary renames and some warnings and next steps were silently skipped. v1 CI only ran the unit tests on Linux, so it never caught this. Main's Windows unit-test job did.Main's older edits to this folder are superseded: the lazy imports are now handled by the build change, and v1 deliberately reverted the
jsxs/jsx-runtime rewrite in db9934f.run-migration.starters.unit.tsis left out because it copies the repo's starters, and main's starters are already v2. Theqwik-local/loop-stylelint rule is skipped for this folder. It is a runtime perf rule, and skipping it keeps the code close to v1, which makes the port easy to check.Verification:
pnpm vitest run packages/qwik/src/cli: 152 tests passed. CI's Linux and Windows unit-test jobs pass.pnpm build.core, which includestsc -p packages/qwik/tsconfig.json, passes with no generated-file changes.pnpm eslint packages/qwik/src/cli, prettier andpnpm tsc.checkare clean.cli.mjsfrom a directory with nonode_modulesfailed with "Cannot find package 'ignore'" before commit 1 and works after it.npx https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@9178 migrate-v2on a v1 base + playground starter (Vite^7.3.7) installed ts-morph 23 into the project, migrated, removed ts-morph, bumped Vite to^8.0.0and installed@qwik.dev/core. No@builder.ioreferences were left in the code or config, andvite buildpasses on the migrated app.Checklist
pnpm change🤖 Generated with Claude Code
https://claude.ai/code/session_01WiKN3vtED6Tfy49qCcsKqN