Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC Qwik Migrations #216

Open
shairez opened this issue Jan 26, 2025 · 0 comments
Open

RFC Qwik Migrations #216

shairez opened this issue Jan 26, 2025 · 0 comments
Assignees
Labels
[STAGE-2] incomplete implementation Remove this label when implementation is complete [STAGE-2] not fully covered by tests yet Remove this label when tests are verified to cover the implementation [STAGE-2] unresolved discussions left Remove this label when all critical discussions are resolved on the issue [STAGE-3] docs changes not added yet Remove this label when the necessary documentation for the feature / change is added [STAGE-3] missing 2 reviews for RFC PRs Remove this label when at least 2 core team members reviewed and approved the RFC implementation

Comments

@shairez
Copy link
Contributor

shairez commented Jan 26, 2025

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:

https://nx.dev/nx-api/nx/documents/migrate

https://angular.dev/cli/update

@github-project-automation github-project-automation bot moved this to In Progress (STAGE 2) in Qwik Evolution Jan 26, 2025
@github-actions github-actions bot added [STAGE-2] incomplete implementation Remove this label when implementation is complete [STAGE-2] not fully covered by tests yet Remove this label when tests are verified to cover the implementation [STAGE-2] unresolved discussions left Remove this label when all critical discussions are resolved on the issue [STAGE-3] docs changes not added yet Remove this label when the necessary documentation for the feature / change is added [STAGE-3] missing 2 reviews for RFC PRs Remove this label when at least 2 core team members reviewed and approved the RFC implementation labels Jan 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[STAGE-2] incomplete implementation Remove this label when implementation is complete [STAGE-2] not fully covered by tests yet Remove this label when tests are verified to cover the implementation [STAGE-2] unresolved discussions left Remove this label when all critical discussions are resolved on the issue [STAGE-3] docs changes not added yet Remove this label when the necessary documentation for the feature / change is added [STAGE-3] missing 2 reviews for RFC PRs Remove this label when at least 2 core team members reviewed and approved the RFC implementation
Projects
Status: In Progress (STAGE 2)
Development

No branches or pull requests

2 participants