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

feat: add migrate-v2 command #6810

Closed
wants to merge 3 commits into from
Closed

Conversation

dmitry-stepanenko
Copy link
Contributor

No description provided.

Copy link

changeset-bot bot commented Aug 20, 2024

⚠️ No Changeset found

Latest commit: 8b80fe9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

pkg-pr-new bot commented Sep 8, 2024

Open in Stackblitz

npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/core@6810
npm i https://pkg.pr.new/QwikDev/qwik/@qwik.dev/router@6810
npm i https://pkg.pr.new/QwikDev/qwik/eslint-plugin-qwik@6810
npm i https://pkg.pr.new/QwikDev/qwik/create-qwik@6810

commit: 8b80fe9

Copy link
Contributor

github-actions bot commented Sep 8, 2024

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
qwik-docs ✅ Ready (View Log) Visit Preview 8b80fe9

@shairez
Copy link
Contributor

shairez commented Oct 28, 2024

@dmitry-stepanenko the new package for city is @qwik.dev/router 😊


try {
replacePackage('@builder.io/qwik-city', '@qwik.dev/city', versions['@qwik.dev/city']);
replacePackage('@builder.io/qwik', '@qwik.dev/qwik', versions['@qwik.dev/qwik']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we add @builder.io/qwik-auth -> @auth/core as well? considering it was removed in v2

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes please add

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shairez anything related to qwik-labs or other packages to add here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so... I think qwik-auth should be migrated to @auth/qwik but there are a bunch of extra migration steps for that, so I don't know if we want to get into that via this script.

Regarding qwik-labs, all of its features have been folded into either core or router.
But the only used one I know of is insights.

I've documented its changes here -
#7018

again, it's not widely used, so I don't know if it worth the effort to make it automatic like the other more used ones.

@ianlet
Copy link
Contributor

ianlet commented Oct 31, 2024

Edit: actually, I'll keep updating this list with what I had to change manually

Deprecated stuff that I renamed without any other changes:

  • QwikCityProvider ➡️ QwikRouterProvider
  • qwikCity ➡️ qwikRouter (in vite.config.ts plugins)

@shairez
Copy link
Contributor

shairez commented Oct 31, 2024

Thanks @ianlet !

FYI qwik-react was renamed to @qwik.dev/react

@dmitry-stepanenko dmitry-stepanenko force-pushed the ds/cli-migrate-v2-cmd branch 3 times, most recently from 965c242 to c84e7b1 Compare November 3, 2024 18:14
@dmitry-stepanenko
Copy link
Contributor Author

@shairez @PatrickJS @ianlet hey folks, WDYT if we change the target of this PR to main? I think that users should be able to install latest v1 and then run npm run qwik migrate-v2. It makes more sense than installing v2 manually

I also added logic to update the following names

QwikCityProvider => QwikRouterProvider
qwikCity => qwikRouter
QwikCityVitePluginOptions => QwikRouterVitePluginOptions
QwikCityPlugin => QwikRouterPlugin
createQwikCity => createQwikRouter
QwikCityNodeRequestOptions => QwikRouterNodeRequestOptions

Logic for the @builder.io/qwik-auth wasn't added, let's discuss it separately

@dmitry-stepanenko
Copy link
Contributor Author

closing in favour of #6810, which targets v1 app

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.

4 participants