-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
[STAGE-2] incomplete implementationRemove this label when implementation is completeRemove this label when implementation is complete[STAGE-2] not fully covered by tests yetRemove this label when tests are verified to cover the implementationRemove this label when tests are verified to cover the implementation[STAGE-2] unresolved discussions leftRemove this label when all critical discussions are resolved on the issueRemove this label when all critical discussions are resolved on the issue[STAGE-3] docs changes not added yetRemove this label when the necessary documentation for the feature / change is addedRemove this label when the necessary documentation for the feature / change is added[STAGE-3] missing 2 reviews for RFC PRsRemove this label when at least 2 core team members reviewed and approved the RFC implementationRemove this label when at least 2 core team members reviewed and approved the RFC implementation
Description
Discussed in #215
Champion: @dmitry-stepanenko
Originally posted by shairez January 26, 2025
What is it about?
Adding a qwik migrate cli command to migrate between versions
What's the motivation for this proposal?
Problems you are trying to solve:
- Migrating between versions of Qwik can sometimes require manual updates, especially for larger codebases.
- Developers may struggle to keep up with breaking changes or best practices introduced in newer versions.
- Lack of an automated tool for upgrades can slow down adoption of new features and improvements in the framework.
Goals you are trying to achieve:
- Provide an automated and guided way to migrate Qwik projects to newer versions.
- Reduce the time and effort needed to upgrade projects, especially for large-scale applications.
- Ensure that migrations are smooth and consistent, with minimal manual intervention.
- Offer a reliable way to identify breaking changes and recommended updates for both code and configuration.
Any other context or information you want to share:
This feature would be inspired by similar tools like Nx Migrate and Angular Upgrade, which are widely used and valued in their respective ecosystems. They help ensure that upgrading a project is a seamless process. A similar capability for Qwik would provide significant value to the developer community, especially as Qwik continues to grow and evolve.
Proposed Solution / Feature
What do you propose?
(suggested by @dmitry-stepanenko )
- we should be able to migrate versions and provide code migrations
- user should be able to see the list of migrations and opt-out before running the whole thing
- migrations should be tied to a specific version of qwik
- we should support both standalone repos and monorepos
- it should be compatible with qwik-nx plugin (probably as a wrapper from qwik-nx side, no Nx code should be involved)
- use ts-morph for code migrations (alternatives?)
- 3rd party migrations support?
Code examples
# Basic usage
qwik migrate
# Specify a target version
qwik migrate --to 2.0.0
# Dry-run to preview changes
qwik migrate --dry-run
# Use a migration script for a specific package (e.g., Qwik UI)
qwik migrate --package qwik-ui
Links / References
Prior art:
jakovljevic-mladen and LazyClicks
Metadata
Metadata
Assignees
Labels
[STAGE-2] incomplete implementationRemove this label when implementation is completeRemove this label when implementation is complete[STAGE-2] not fully covered by tests yetRemove this label when tests are verified to cover the implementationRemove this label when tests are verified to cover the implementation[STAGE-2] unresolved discussions leftRemove this label when all critical discussions are resolved on the issueRemove this label when all critical discussions are resolved on the issue[STAGE-3] docs changes not added yetRemove this label when the necessary documentation for the feature / change is addedRemove this label when the necessary documentation for the feature / change is added[STAGE-3] missing 2 reviews for RFC PRsRemove this label when at least 2 core team members reviewed and approved the RFC implementationRemove this label when at least 2 core team members reviewed and approved the RFC implementation
Type
Projects
Status
Developer Preview (STAGE 4)