Skip to content

Commit

Permalink
fix(react-query): update tanstack query as optional peerDependency (#…
Browse files Browse the repository at this point in the history
…1243)

Thanks to @ha1fstack!

User can use TanStack Query only v4 or v5 not both. so we need to make
them as optional peerDependency! @ha1fstack catch this error and report
it. So much thanks!

---------

Co-authored-by: halfstack <61955474+ha1fstack@users.noreply.github.com>
  • Loading branch information
manudeli and ha1fstack authored Sep 1, 2024
1 parent eccb404 commit 251d17b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .changeset/wet-rivers-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@suspensive/react-query-4": patch
"@suspensive/react-query-5": patch
---

fix(react-query): update tanstack query as optional peerDependency
7 changes: 5 additions & 2 deletions knip.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@
"ignoreDependencies": ["sharp"],
"entry": ["src/**/*.{ts,tsx,mdx}"]
},
"packages/react-query-*": {
"ignoreDependencies": ["@suspensive/react"]
"packages/react-query-4": {
"ignoreDependencies": ["@suspensive/react", "@tanstack/react-query"]
},
"packages/react-query-5": {
"ignoreDependencies": ["@suspensive/react", "@tanstack/react-query"]
},
"packages/react-native": {
"ignoreDependencies": ["expo", "ts-node"],
Expand Down
3 changes: 3 additions & 0 deletions packages/react-query-4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
"peerDependenciesMeta": {
"@suspensive/react": {
"optional": true
},
"@tanstack/react-query": {
"optional": true
}
},
"publishConfig": {
Expand Down
3 changes: 3 additions & 0 deletions packages/react-query-5/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
"peerDependenciesMeta": {
"@suspensive/react": {
"optional": true
},
"@tanstack/react-query": {
"optional": true
}
},
"publishConfig": {
Expand Down

0 comments on commit 251d17b

Please sign in to comment.