@rozenite/tanstack-query-plugin 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
The Rozenite TanStack Query Plugin provides a seamless integration of TanStack Query DevTools into your React Native DevTools environment. It offers real-time query monitoring, cache management, and debugging capabilities, all within the familiar DevTools interface.
|
|
8
8
|
|
|
9
|
+
This plugin was inspired by the excellent work of Austin Johnson and his [react-query-external-sync](https://github.com/LovesWorking/react-query-external-sync) library, which provided crucial insights into making TanStack Query work effectively in React Native environments.
|
|
10
|
+
|
|
9
11
|

|
|
10
12
|
|
|
11
13
|
## Features
|
package/dist/rozenite.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@rozenite/tanstack-query-plugin","version":"1.
|
|
1
|
+
{"name":"@rozenite/tanstack-query-plugin","version":"1.1.0","description":"TanStack Query for Rozenite.","panels":[{"name":"Tanstack Query","source":"/tanstack-query.html"}]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rozenite/tanstack-query-plugin",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"description": "TanStack Query for Rozenite.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/react-native.cjs",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"types": "./dist/react-native.d.ts",
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"fast-deep-equal": "^3.1.3",
|
|
11
|
-
"@rozenite/plugin-bridge": "1.
|
|
11
|
+
"@rozenite/plugin-bridge": "1.2.0"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@tanstack/react-query": "^5.0.0",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"react-native-web": "0.21.0",
|
|
21
21
|
"typescript": "^5.7.3",
|
|
22
22
|
"vite": "^6.0.0",
|
|
23
|
-
"
|
|
24
|
-
"rozenite": "1.
|
|
23
|
+
"rozenite": "1.2.0",
|
|
24
|
+
"@rozenite/vite-plugin": "1.2.0"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@tanstack/react-query": "^5.0.0",
|
|
@@ -23,6 +23,9 @@ export const useHandleDevToolsMessages = (
|
|
|
23
23
|
|
|
24
24
|
switch (type) {
|
|
25
25
|
case 'TRIGGER_ERROR': {
|
|
26
|
+
// Code from React Query External Sync:
|
|
27
|
+
// https://github.com/LovesWorking/react-query-external-sync/blob/main/src/react-query-external-sync/useSyncQueriesExternal.ts#L717
|
|
28
|
+
|
|
26
29
|
const __previousQueryOptions = activeQuery.options;
|
|
27
30
|
const error = new Error('Unknown error from devtools');
|
|
28
31
|
|
|
@@ -42,6 +45,9 @@ export const useHandleDevToolsMessages = (
|
|
|
42
45
|
break;
|
|
43
46
|
}
|
|
44
47
|
case 'TRIGGER_LOADING': {
|
|
48
|
+
// Code from React Query External Sync:
|
|
49
|
+
// https://github.com/LovesWorking/react-query-external-sync/blob/main/src/react-query-external-sync/useSyncQueriesExternal.ts#L742
|
|
50
|
+
|
|
45
51
|
if (!activeQuery) return;
|
|
46
52
|
const __previousQueryOptions = activeQuery.options;
|
|
47
53
|
// Trigger a fetch in order to trigger suspense as well.
|
|
@@ -66,6 +72,9 @@ export const useHandleDevToolsMessages = (
|
|
|
66
72
|
break;
|
|
67
73
|
}
|
|
68
74
|
case 'RESTORE_LOADING': {
|
|
75
|
+
// Code from React Query External Sync:
|
|
76
|
+
// https://github.com/LovesWorking/tanstack-query-dev-tools-expo-plugin/blob/main/src/useSyncQueries.ts#L176
|
|
77
|
+
|
|
69
78
|
const previousState = activeQuery.state;
|
|
70
79
|
const previousOptions = activeQuery.state.fetchMeta
|
|
71
80
|
? (
|