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(medusa-react): Upgrade react-query and clean up dependencies #2969

Merged
merged 10 commits into from
Jan 11, 2023

Conversation

kasperkristensen
Copy link
Contributor

@kasperkristensen kasperkristensen commented Jan 9, 2023

What

  • Updates the required peer dependency version of react-query -> @tanstack/react-query (v4)
  • Fixes a wrong direct dependency on react-query as it should only be a peer- and devDependency.

Why

  • Due to react-query being both a direct and peer dependency it could resolve in multiple versions of react-query being bundled in the production build of users' projects. This results in the error No QueryClient set, use QueryClientProvider to set one being thrown.
  • Upgrading to the latest version of react-query plays better with Vite, and due to that the upgrade has been included. This will require users to update their version of react-query -> @tanstack/react-query@^4 to continue using medusa-react.

Resolves CORE-972

@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2023

🦋 Changeset detected

Latest commit: 7ff4453

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
medusa-react Patch

Not sure what this means? Click here to learn what changesets are.

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

@kasperkristensen
Copy link
Contributor Author

/snapshot-this

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2023

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/medusa@1.7.3-snapshot-20230109142834
yarn add @medusajs/medusa-js@1.3.6-snapshot-20230109142834
yarn add @medusajs/stock-location@2.0.0-snapshot-20230109142834

Latest commit: 0f039a0

@kasperkristensen
Copy link
Contributor Author

/snapshot-this

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2023

🚀 A snapshot release has been made for this PR

Test the snapshots by updating your package.json with the newly published versions:

yarn add @medusajs/medusa@1.7.3-snapshot-20230109144732
yarn add @medusajs/medusa-js@1.3.6-snapshot-20230109144732
yarn add medusa-react@4.0.2-snapshot-20230109144732
yarn add @medusajs/stock-location@2.0.0-snapshot-20230109144732

Latest commit: 0f039a0

@kasperkristensen kasperkristensen marked this pull request as ready for review January 9, 2023 15:02
@kasperkristensen kasperkristensen requested a review from a team as a code owner January 9, 2023 15:02
@olivermrbl
Copy link
Contributor

This will require users to update their version of react-query -> @tanstack/react-query@^4 to continue using medusa-react.

This would fit well in the upgrade guide for 1.7.3 @shahednasser 😊

@shahednasser
Copy link
Member

@olivermrbl I'll add it to the open PR

@olivermrbl
Copy link
Contributor

LGTM but will keep it out of upcoming release to not introduce unnecessary required actions for v1.7.3

Copy link
Contributor

@olivermrbl olivermrbl left a comment

Choose a reason for hiding this comment

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

LGTM!

@olivermrbl olivermrbl merged commit 8d1275c into develop Jan 11, 2023
@olivermrbl olivermrbl deleted the feat/upgrade-react-query branch January 11, 2023 18:19
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