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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

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.

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

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

6. change all `vue-query` import to `@tanstack/vue-query`

# Vue Query

Hooks for fetching, caching and updating asynchronous data in Vue.
Expand Down