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

chore: update readme, add migration steps #257

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hi-reeve
Copy link

@hi-reeve hi-reeve commented Oct 6, 2022

this pr add a clear migration steps from v2 to @tanstack/vue-query

this pr add a clear migration steps from v2 to @tanstack/vue-query
@vercel
Copy link

vercel bot commented Oct 6, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
vue-query ✅ Ready (Inspect) Visit Preview Oct 6, 2022 at 2:16AM (UTC)

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 6, 2022

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 3dc03b1:

Sandbox Source
DamianOsipiuk/vue-query: basic Configuration
DamianOsipiuk/vue-query: 2.x-basic Configuration
DamianOsipiuk/vue-query: nuxt-simple Configuration

@sonarcloud
Copy link

sonarcloud bot commented Oct 6, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Contributor

@Mosaab-Emam Mosaab-Emam left a comment

Choose a reason for hiding this comment

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

Suggested steps:

  1. In your package.json, replace "vue-query": "2.x" with "@tanStack/vue-query": "4.19.x"
  2. Install your dependencies (e.g. npm install).
  3. Change all vue-query imports to use @tanstack/vue-query This can be achieved easily using VS Code find and replace functionality.

@@ -15,6 +15,15 @@ If you are still on `v1` make sure to follow [migration guide](https://vue-query

If you are already on `v2`, just swap `vue-query` for `@tanstack/vue-query` in both of your `package.json` and `import` statements. Everything should still work as before.

steps to move to `@tanstack/vue-query` from `vue-query` v2

1. delete your `node_modules`
Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary step, node_modules will be modified correctly when running npm install after editing package.json

steps to move to `@tanstack/vue-query` from `vue-query` v2

1. delete your `node_modules`
2. delete your `lock` file
Copy link
Contributor

Choose a reason for hiding this comment

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

Unnecessary step, lock file will be modified correctly when running npm install after editing package.json

Choose a reason for hiding this comment

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

Not only is this unnecessary, but it could also have unintended consequences by potentially version bumping unrelated packages in the repo in question.

1. delete your `node_modules`
2. delete your `lock` file
3. remove `vue-query` from your package-json
4. install deps
Copy link
Contributor

Choose a reason for hiding this comment

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

The order of this step should be after adding @tanstack/vue-query to package.json

2. delete your `lock` file
3. remove `vue-query` from your package-json
4. install deps
5. install `@tanstack/vue-query`
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be merged with step 3 (or right after). Like this:

3. Replace "vue-query": "2.x" with "@tanStack/vue-query": "4.19.x" in package.json

4. Run npm install

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.

3 participants