Closed dgarciamuria closed 3 months ago
Latest commit: 2125766ac89def1c81cf8a905b9f1dacb67eaf9a
The changes in this PR will be included in the next version bump.
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
Thanks but this will not work for vue-query, solid-query and such. Can you adapt the regex so that react
is not hardcoded?
@all-contributors add @dgarciamuria for code
@stijnvanhulle
I've put up a pull request to add @dgarciamuria! :tada:
Thanks but this will not work for vue-query, solid-query and such. Can you adapt the regex so that
react
is not hardcoded?
Good catch! I decided to be explicit instead of trying some form of fuzzy matching, the downside is that if react-query adds support for a new framework then the regex will need to be updated...but is better than risking capturing other packages that are not related. Also moved the regex as an export to make it easier to refactor in the future
Issue
If you have multiple @tanstack packages in your package.json file, the logic that checks if your are using v5 will fail because internally is calling
isValidSync(/@tanstack/, '>=5')
Solution
Call
isValidSync
explicitly passing@tanstack/react-query