@tanstack/query-devtools 5.17.21 → 5.18.1
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/build/Devtools/{EJGC42YZ.js → F44ZTS6H.js} +9 -9
- package/build/Devtools/{TBWOHJON.jsx → GGXFRC53.jsx} +9 -9
- package/build/Devtools/{2DAFLIRC.js → IEC7B7YJ.js} +9 -9
- package/build/Devtools/{XOPUKKPX.jsx → PFRKCKUQ.jsx} +9 -9
- package/build/dev.cjs +9 -9
- package/build/dev.js +1 -1
- package/build/dev.jsx +1 -1
- package/build/index.cjs +9 -9
- package/build/index.js +1 -1
- package/build/index.jsx +1 -1
- package/package.json +2 -2
- package/src/Devtools.tsx +9 -9
- package/src/__tests__/utils.test.ts +6 -0
- package/src/index.tsx +2 -2
|
@@ -9703,15 +9703,15 @@ var DevtoolsPanel = (props) => {
|
|
|
9703
9703
|
props.setLocalStore("height", String(Math.round(newSize)));
|
|
9704
9704
|
}
|
|
9705
9705
|
};
|
|
9706
|
-
const
|
|
9706
|
+
const unsubscribe = () => {
|
|
9707
9707
|
if (isResizing()) {
|
|
9708
9708
|
setIsResizing(false);
|
|
9709
9709
|
}
|
|
9710
9710
|
document.removeEventListener("mousemove", runDrag, false);
|
|
9711
|
-
document.removeEventListener("mouseUp",
|
|
9711
|
+
document.removeEventListener("mouseUp", unsubscribe, false);
|
|
9712
9712
|
};
|
|
9713
9713
|
document.addEventListener("mousemove", runDrag, false);
|
|
9714
|
-
document.addEventListener("mouseup",
|
|
9714
|
+
document.addEventListener("mouseup", unsubscribe, false);
|
|
9715
9715
|
};
|
|
9716
9716
|
let panelRef;
|
|
9717
9717
|
onMount(() => {
|
|
@@ -11089,7 +11089,7 @@ var setupQueryCacheSubscription = () => {
|
|
|
11089
11089
|
const client = useQueryDevtoolsContext().client;
|
|
11090
11090
|
return client.getQueryCache();
|
|
11091
11091
|
});
|
|
11092
|
-
const
|
|
11092
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
11093
11093
|
batch(() => {
|
|
11094
11094
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
11095
11095
|
if (!value.shouldUpdate(q))
|
|
@@ -11100,9 +11100,9 @@ var setupQueryCacheSubscription = () => {
|
|
|
11100
11100
|
});
|
|
11101
11101
|
onCleanup(() => {
|
|
11102
11102
|
queryCacheMap.clear();
|
|
11103
|
-
|
|
11103
|
+
unsubscribe();
|
|
11104
11104
|
});
|
|
11105
|
-
return
|
|
11105
|
+
return unsubscribe;
|
|
11106
11106
|
};
|
|
11107
11107
|
var createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true, shouldUpdate = () => true) => {
|
|
11108
11108
|
const queryCache = createMemo(() => {
|
|
@@ -11130,7 +11130,7 @@ var setupMutationCacheSubscription = () => {
|
|
|
11130
11130
|
const client = useQueryDevtoolsContext().client;
|
|
11131
11131
|
return client.getMutationCache();
|
|
11132
11132
|
});
|
|
11133
|
-
const
|
|
11133
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
11134
11134
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
11135
11135
|
queueMicrotask(() => {
|
|
11136
11136
|
setter(callback(mutationCache));
|
|
@@ -11139,9 +11139,9 @@ var setupMutationCacheSubscription = () => {
|
|
|
11139
11139
|
});
|
|
11140
11140
|
onCleanup(() => {
|
|
11141
11141
|
mutationCacheMap.clear();
|
|
11142
|
-
|
|
11142
|
+
unsubscribe();
|
|
11143
11143
|
});
|
|
11144
|
-
return
|
|
11144
|
+
return unsubscribe;
|
|
11145
11145
|
};
|
|
11146
11146
|
var createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) => {
|
|
11147
11147
|
const mutationCache = createMemo(() => {
|
|
@@ -10578,15 +10578,15 @@ var DevtoolsPanel = (props) => {
|
|
|
10578
10578
|
props.setLocalStore("height", String(Math.round(newSize)));
|
|
10579
10579
|
}
|
|
10580
10580
|
};
|
|
10581
|
-
const
|
|
10581
|
+
const unsubscribe = () => {
|
|
10582
10582
|
if (isResizing()) {
|
|
10583
10583
|
setIsResizing(false);
|
|
10584
10584
|
}
|
|
10585
10585
|
document.removeEventListener("mousemove", runDrag, false);
|
|
10586
|
-
document.removeEventListener("mouseUp",
|
|
10586
|
+
document.removeEventListener("mouseUp", unsubscribe, false);
|
|
10587
10587
|
};
|
|
10588
10588
|
document.addEventListener("mousemove", runDrag, false);
|
|
10589
|
-
document.addEventListener("mouseup",
|
|
10589
|
+
document.addEventListener("mouseup", unsubscribe, false);
|
|
10590
10590
|
};
|
|
10591
10591
|
let panelRef;
|
|
10592
10592
|
onMount(() => {
|
|
@@ -11902,7 +11902,7 @@ var setupQueryCacheSubscription = () => {
|
|
|
11902
11902
|
const client = useQueryDevtoolsContext().client;
|
|
11903
11903
|
return client.getQueryCache();
|
|
11904
11904
|
});
|
|
11905
|
-
const
|
|
11905
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
11906
11906
|
batch(() => {
|
|
11907
11907
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
11908
11908
|
if (!value.shouldUpdate(q))
|
|
@@ -11913,9 +11913,9 @@ var setupQueryCacheSubscription = () => {
|
|
|
11913
11913
|
});
|
|
11914
11914
|
onCleanup(() => {
|
|
11915
11915
|
queryCacheMap.clear();
|
|
11916
|
-
|
|
11916
|
+
unsubscribe();
|
|
11917
11917
|
});
|
|
11918
|
-
return
|
|
11918
|
+
return unsubscribe;
|
|
11919
11919
|
};
|
|
11920
11920
|
var createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true, shouldUpdate = () => true) => {
|
|
11921
11921
|
const queryCache = createMemo(() => {
|
|
@@ -11944,7 +11944,7 @@ var setupMutationCacheSubscription = () => {
|
|
|
11944
11944
|
const client = useQueryDevtoolsContext().client;
|
|
11945
11945
|
return client.getMutationCache();
|
|
11946
11946
|
});
|
|
11947
|
-
const
|
|
11947
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
11948
11948
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
11949
11949
|
queueMicrotask(() => {
|
|
11950
11950
|
setter(callback(mutationCache));
|
|
@@ -11953,9 +11953,9 @@ var setupMutationCacheSubscription = () => {
|
|
|
11953
11953
|
});
|
|
11954
11954
|
onCleanup(() => {
|
|
11955
11955
|
mutationCacheMap.clear();
|
|
11956
|
-
|
|
11956
|
+
unsubscribe();
|
|
11957
11957
|
});
|
|
11958
|
-
return
|
|
11958
|
+
return unsubscribe;
|
|
11959
11959
|
};
|
|
11960
11960
|
var createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) => {
|
|
11961
11961
|
const mutationCache = createMemo(() => {
|
|
@@ -9702,15 +9702,15 @@ var DevtoolsPanel = (props) => {
|
|
|
9702
9702
|
props.setLocalStore("height", String(Math.round(newSize)));
|
|
9703
9703
|
}
|
|
9704
9704
|
};
|
|
9705
|
-
const
|
|
9705
|
+
const unsubscribe = () => {
|
|
9706
9706
|
if (isResizing()) {
|
|
9707
9707
|
setIsResizing(false);
|
|
9708
9708
|
}
|
|
9709
9709
|
document.removeEventListener("mousemove", runDrag, false);
|
|
9710
|
-
document.removeEventListener("mouseUp",
|
|
9710
|
+
document.removeEventListener("mouseUp", unsubscribe, false);
|
|
9711
9711
|
};
|
|
9712
9712
|
document.addEventListener("mousemove", runDrag, false);
|
|
9713
|
-
document.addEventListener("mouseup",
|
|
9713
|
+
document.addEventListener("mouseup", unsubscribe, false);
|
|
9714
9714
|
};
|
|
9715
9715
|
let panelRef;
|
|
9716
9716
|
onMount(() => {
|
|
@@ -11088,7 +11088,7 @@ var setupQueryCacheSubscription = () => {
|
|
|
11088
11088
|
const client = useQueryDevtoolsContext().client;
|
|
11089
11089
|
return client.getQueryCache();
|
|
11090
11090
|
});
|
|
11091
|
-
const
|
|
11091
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
11092
11092
|
batch(() => {
|
|
11093
11093
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
11094
11094
|
if (!value.shouldUpdate(q))
|
|
@@ -11099,9 +11099,9 @@ var setupQueryCacheSubscription = () => {
|
|
|
11099
11099
|
});
|
|
11100
11100
|
onCleanup(() => {
|
|
11101
11101
|
queryCacheMap.clear();
|
|
11102
|
-
|
|
11102
|
+
unsubscribe();
|
|
11103
11103
|
});
|
|
11104
|
-
return
|
|
11104
|
+
return unsubscribe;
|
|
11105
11105
|
};
|
|
11106
11106
|
var createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true, shouldUpdate = () => true) => {
|
|
11107
11107
|
const queryCache = createMemo(() => {
|
|
@@ -11129,7 +11129,7 @@ var setupMutationCacheSubscription = () => {
|
|
|
11129
11129
|
const client = useQueryDevtoolsContext().client;
|
|
11130
11130
|
return client.getMutationCache();
|
|
11131
11131
|
});
|
|
11132
|
-
const
|
|
11132
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
11133
11133
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
11134
11134
|
queueMicrotask(() => {
|
|
11135
11135
|
setter(callback(mutationCache));
|
|
@@ -11138,9 +11138,9 @@ var setupMutationCacheSubscription = () => {
|
|
|
11138
11138
|
});
|
|
11139
11139
|
onCleanup(() => {
|
|
11140
11140
|
mutationCacheMap.clear();
|
|
11141
|
-
|
|
11141
|
+
unsubscribe();
|
|
11142
11142
|
});
|
|
11143
|
-
return
|
|
11143
|
+
return unsubscribe;
|
|
11144
11144
|
};
|
|
11145
11145
|
var createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) => {
|
|
11146
11146
|
const mutationCache = createMemo(() => {
|
|
@@ -10577,15 +10577,15 @@ var DevtoolsPanel = (props) => {
|
|
|
10577
10577
|
props.setLocalStore("height", String(Math.round(newSize)));
|
|
10578
10578
|
}
|
|
10579
10579
|
};
|
|
10580
|
-
const
|
|
10580
|
+
const unsubscribe = () => {
|
|
10581
10581
|
if (isResizing()) {
|
|
10582
10582
|
setIsResizing(false);
|
|
10583
10583
|
}
|
|
10584
10584
|
document.removeEventListener("mousemove", runDrag, false);
|
|
10585
|
-
document.removeEventListener("mouseUp",
|
|
10585
|
+
document.removeEventListener("mouseUp", unsubscribe, false);
|
|
10586
10586
|
};
|
|
10587
10587
|
document.addEventListener("mousemove", runDrag, false);
|
|
10588
|
-
document.addEventListener("mouseup",
|
|
10588
|
+
document.addEventListener("mouseup", unsubscribe, false);
|
|
10589
10589
|
};
|
|
10590
10590
|
let panelRef;
|
|
10591
10591
|
onMount(() => {
|
|
@@ -11901,7 +11901,7 @@ var setupQueryCacheSubscription = () => {
|
|
|
11901
11901
|
const client = useQueryDevtoolsContext().client;
|
|
11902
11902
|
return client.getQueryCache();
|
|
11903
11903
|
});
|
|
11904
|
-
const
|
|
11904
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
11905
11905
|
batch(() => {
|
|
11906
11906
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
11907
11907
|
if (!value.shouldUpdate(q))
|
|
@@ -11912,9 +11912,9 @@ var setupQueryCacheSubscription = () => {
|
|
|
11912
11912
|
});
|
|
11913
11913
|
onCleanup(() => {
|
|
11914
11914
|
queryCacheMap.clear();
|
|
11915
|
-
|
|
11915
|
+
unsubscribe();
|
|
11916
11916
|
});
|
|
11917
|
-
return
|
|
11917
|
+
return unsubscribe;
|
|
11918
11918
|
};
|
|
11919
11919
|
var createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true, shouldUpdate = () => true) => {
|
|
11920
11920
|
const queryCache = createMemo(() => {
|
|
@@ -11943,7 +11943,7 @@ var setupMutationCacheSubscription = () => {
|
|
|
11943
11943
|
const client = useQueryDevtoolsContext().client;
|
|
11944
11944
|
return client.getMutationCache();
|
|
11945
11945
|
});
|
|
11946
|
-
const
|
|
11946
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
11947
11947
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
11948
11948
|
queueMicrotask(() => {
|
|
11949
11949
|
setter(callback(mutationCache));
|
|
@@ -11952,9 +11952,9 @@ var setupMutationCacheSubscription = () => {
|
|
|
11952
11952
|
});
|
|
11953
11953
|
onCleanup(() => {
|
|
11954
11954
|
mutationCacheMap.clear();
|
|
11955
|
-
|
|
11955
|
+
unsubscribe();
|
|
11956
11956
|
});
|
|
11957
|
-
return
|
|
11957
|
+
return unsubscribe;
|
|
11958
11958
|
};
|
|
11959
11959
|
var createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) => {
|
|
11960
11960
|
const mutationCache = createMemo(() => {
|
package/build/dev.cjs
CHANGED
|
@@ -13240,15 +13240,15 @@ var init_Devtools = __esm({
|
|
|
13240
13240
|
props.setLocalStore("height", String(Math.round(newSize)));
|
|
13241
13241
|
}
|
|
13242
13242
|
};
|
|
13243
|
-
const
|
|
13243
|
+
const unsubscribe = () => {
|
|
13244
13244
|
if (isResizing()) {
|
|
13245
13245
|
setIsResizing(false);
|
|
13246
13246
|
}
|
|
13247
13247
|
document.removeEventListener("mousemove", runDrag, false);
|
|
13248
|
-
document.removeEventListener("mouseUp",
|
|
13248
|
+
document.removeEventListener("mouseUp", unsubscribe, false);
|
|
13249
13249
|
};
|
|
13250
13250
|
document.addEventListener("mousemove", runDrag, false);
|
|
13251
|
-
document.addEventListener("mouseup",
|
|
13251
|
+
document.addEventListener("mouseup", unsubscribe, false);
|
|
13252
13252
|
};
|
|
13253
13253
|
let panelRef;
|
|
13254
13254
|
onMount(() => {
|
|
@@ -14626,7 +14626,7 @@ var init_Devtools = __esm({
|
|
|
14626
14626
|
const client = useQueryDevtoolsContext().client;
|
|
14627
14627
|
return client.getQueryCache();
|
|
14628
14628
|
});
|
|
14629
|
-
const
|
|
14629
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
14630
14630
|
batch(() => {
|
|
14631
14631
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
14632
14632
|
if (!value.shouldUpdate(q))
|
|
@@ -14637,9 +14637,9 @@ var init_Devtools = __esm({
|
|
|
14637
14637
|
});
|
|
14638
14638
|
onCleanup(() => {
|
|
14639
14639
|
queryCacheMap.clear();
|
|
14640
|
-
|
|
14640
|
+
unsubscribe();
|
|
14641
14641
|
});
|
|
14642
|
-
return
|
|
14642
|
+
return unsubscribe;
|
|
14643
14643
|
};
|
|
14644
14644
|
createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true, shouldUpdate = () => true) => {
|
|
14645
14645
|
const queryCache = createMemo(() => {
|
|
@@ -14667,7 +14667,7 @@ var init_Devtools = __esm({
|
|
|
14667
14667
|
const client = useQueryDevtoolsContext().client;
|
|
14668
14668
|
return client.getMutationCache();
|
|
14669
14669
|
});
|
|
14670
|
-
const
|
|
14670
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
14671
14671
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
14672
14672
|
queueMicrotask(() => {
|
|
14673
14673
|
setter(callback(mutationCache));
|
|
@@ -14676,9 +14676,9 @@ var init_Devtools = __esm({
|
|
|
14676
14676
|
});
|
|
14677
14677
|
onCleanup(() => {
|
|
14678
14678
|
mutationCacheMap.clear();
|
|
14679
|
-
|
|
14679
|
+
unsubscribe();
|
|
14680
14680
|
});
|
|
14681
|
-
return
|
|
14681
|
+
return unsubscribe;
|
|
14682
14682
|
};
|
|
14683
14683
|
createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) => {
|
|
14684
14684
|
const mutationCache = createMemo(() => {
|
package/build/dev.js
CHANGED
|
@@ -65,7 +65,7 @@ var TanstackQueryDevtools = class {
|
|
|
65
65
|
if (this.#Component) {
|
|
66
66
|
Devtools = this.#Component;
|
|
67
67
|
} else {
|
|
68
|
-
Devtools = lazy(() => import('./Devtools/
|
|
68
|
+
Devtools = lazy(() => import('./Devtools/F44ZTS6H.js'));
|
|
69
69
|
this.#Component = Devtools;
|
|
70
70
|
}
|
|
71
71
|
setupStyleSheet(this.#styleNonce);
|
package/build/dev.jsx
CHANGED
|
@@ -70,7 +70,7 @@ var TanstackQueryDevtools = class {
|
|
|
70
70
|
if (this.#Component) {
|
|
71
71
|
Devtools = this.#Component;
|
|
72
72
|
} else {
|
|
73
|
-
Devtools = lazy(() => import("./Devtools/
|
|
73
|
+
Devtools = lazy(() => import("./Devtools/GGXFRC53.jsx"));
|
|
74
74
|
this.#Component = Devtools;
|
|
75
75
|
}
|
|
76
76
|
setupStyleSheet(this.#styleNonce);
|
package/build/index.cjs
CHANGED
|
@@ -13238,15 +13238,15 @@ var init_Devtools = __esm({
|
|
|
13238
13238
|
props.setLocalStore("height", String(Math.round(newSize)));
|
|
13239
13239
|
}
|
|
13240
13240
|
};
|
|
13241
|
-
const
|
|
13241
|
+
const unsubscribe = () => {
|
|
13242
13242
|
if (isResizing()) {
|
|
13243
13243
|
setIsResizing(false);
|
|
13244
13244
|
}
|
|
13245
13245
|
document.removeEventListener("mousemove", runDrag, false);
|
|
13246
|
-
document.removeEventListener("mouseUp",
|
|
13246
|
+
document.removeEventListener("mouseUp", unsubscribe, false);
|
|
13247
13247
|
};
|
|
13248
13248
|
document.addEventListener("mousemove", runDrag, false);
|
|
13249
|
-
document.addEventListener("mouseup",
|
|
13249
|
+
document.addEventListener("mouseup", unsubscribe, false);
|
|
13250
13250
|
};
|
|
13251
13251
|
let panelRef;
|
|
13252
13252
|
onMount(() => {
|
|
@@ -14624,7 +14624,7 @@ var init_Devtools = __esm({
|
|
|
14624
14624
|
const client = useQueryDevtoolsContext().client;
|
|
14625
14625
|
return client.getQueryCache();
|
|
14626
14626
|
});
|
|
14627
|
-
const
|
|
14627
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
14628
14628
|
batch(() => {
|
|
14629
14629
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
14630
14630
|
if (!value.shouldUpdate(q))
|
|
@@ -14635,9 +14635,9 @@ var init_Devtools = __esm({
|
|
|
14635
14635
|
});
|
|
14636
14636
|
onCleanup(() => {
|
|
14637
14637
|
queryCacheMap.clear();
|
|
14638
|
-
|
|
14638
|
+
unsubscribe();
|
|
14639
14639
|
});
|
|
14640
|
-
return
|
|
14640
|
+
return unsubscribe;
|
|
14641
14641
|
};
|
|
14642
14642
|
createSubscribeToQueryCacheBatcher = (callback, equalityCheck = true, shouldUpdate = () => true) => {
|
|
14643
14643
|
const queryCache = createMemo(() => {
|
|
@@ -14665,7 +14665,7 @@ var init_Devtools = __esm({
|
|
|
14665
14665
|
const client = useQueryDevtoolsContext().client;
|
|
14666
14666
|
return client.getMutationCache();
|
|
14667
14667
|
});
|
|
14668
|
-
const
|
|
14668
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
14669
14669
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
14670
14670
|
queueMicrotask(() => {
|
|
14671
14671
|
setter(callback(mutationCache));
|
|
@@ -14674,9 +14674,9 @@ var init_Devtools = __esm({
|
|
|
14674
14674
|
});
|
|
14675
14675
|
onCleanup(() => {
|
|
14676
14676
|
mutationCacheMap.clear();
|
|
14677
|
-
|
|
14677
|
+
unsubscribe();
|
|
14678
14678
|
});
|
|
14679
|
-
return
|
|
14679
|
+
return unsubscribe;
|
|
14680
14680
|
};
|
|
14681
14681
|
createSubscribeToMutationCacheBatcher = (callback, equalityCheck = true) => {
|
|
14682
14682
|
const mutationCache = createMemo(() => {
|
package/build/index.js
CHANGED
|
@@ -65,7 +65,7 @@ var TanstackQueryDevtools = class {
|
|
|
65
65
|
if (this.#Component) {
|
|
66
66
|
Devtools = this.#Component;
|
|
67
67
|
} else {
|
|
68
|
-
Devtools = lazy(() => import('./Devtools/
|
|
68
|
+
Devtools = lazy(() => import('./Devtools/IEC7B7YJ.js'));
|
|
69
69
|
this.#Component = Devtools;
|
|
70
70
|
}
|
|
71
71
|
setupStyleSheet(this.#styleNonce);
|
package/build/index.jsx
CHANGED
|
@@ -70,7 +70,7 @@ var TanstackQueryDevtools = class {
|
|
|
70
70
|
if (this.#Component) {
|
|
71
71
|
Devtools = this.#Component;
|
|
72
72
|
} else {
|
|
73
|
-
Devtools = lazy(() => import("./Devtools/
|
|
73
|
+
Devtools = lazy(() => import("./Devtools/PFRKCKUQ.jsx"));
|
|
74
74
|
this.#Component = Devtools;
|
|
75
75
|
}
|
|
76
76
|
setupStyleSheet(this.#styleNonce);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/query-devtools",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.18.1",
|
|
4
4
|
"description": "Developer tools to interact with and visualize the TanStack Query cache",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"superjson": "^1.13.3",
|
|
51
51
|
"tsup-preset-solid": "^2.2.0",
|
|
52
52
|
"vite-plugin-solid": "^2.8.0",
|
|
53
|
-
"@tanstack/query-core": "5.
|
|
53
|
+
"@tanstack/query-core": "5.18.1"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
56
56
|
"clean": "rimraf ./build && rimraf ./coverage",
|
package/src/Devtools.tsx
CHANGED
|
@@ -330,16 +330,16 @@ const DevtoolsPanel: Component<DevtoolsPanelProps> = (props) => {
|
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
|
|
333
|
-
const
|
|
333
|
+
const unsubscribe = () => {
|
|
334
334
|
if (isResizing()) {
|
|
335
335
|
setIsResizing(false)
|
|
336
336
|
}
|
|
337
337
|
document.removeEventListener('mousemove', runDrag, false)
|
|
338
|
-
document.removeEventListener('mouseUp',
|
|
338
|
+
document.removeEventListener('mouseUp', unsubscribe, false)
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
document.addEventListener('mousemove', runDrag, false)
|
|
342
|
-
document.addEventListener('mouseup',
|
|
342
|
+
document.addEventListener('mouseup', unsubscribe, false)
|
|
343
343
|
}
|
|
344
344
|
|
|
345
345
|
let panelRef!: HTMLDivElement
|
|
@@ -2062,7 +2062,7 @@ const setupQueryCacheSubscription = () => {
|
|
|
2062
2062
|
return client.getQueryCache()
|
|
2063
2063
|
})
|
|
2064
2064
|
|
|
2065
|
-
const
|
|
2065
|
+
const unsubscribe = queryCache().subscribe((q) => {
|
|
2066
2066
|
batch(() => {
|
|
2067
2067
|
for (const [callback, value] of queryCacheMap.entries()) {
|
|
2068
2068
|
if (!value.shouldUpdate(q)) continue
|
|
@@ -2073,10 +2073,10 @@ const setupQueryCacheSubscription = () => {
|
|
|
2073
2073
|
|
|
2074
2074
|
onCleanup(() => {
|
|
2075
2075
|
queryCacheMap.clear()
|
|
2076
|
-
|
|
2076
|
+
unsubscribe()
|
|
2077
2077
|
})
|
|
2078
2078
|
|
|
2079
|
-
return
|
|
2079
|
+
return unsubscribe
|
|
2080
2080
|
}
|
|
2081
2081
|
|
|
2082
2082
|
const createSubscribeToQueryCacheBatcher = <T,>(
|
|
@@ -2122,7 +2122,7 @@ const setupMutationCacheSubscription = () => {
|
|
|
2122
2122
|
return client.getMutationCache()
|
|
2123
2123
|
})
|
|
2124
2124
|
|
|
2125
|
-
const
|
|
2125
|
+
const unsubscribe = mutationCache().subscribe(() => {
|
|
2126
2126
|
for (const [callback, setter] of mutationCacheMap.entries()) {
|
|
2127
2127
|
queueMicrotask(() => {
|
|
2128
2128
|
setter(callback(mutationCache))
|
|
@@ -2132,10 +2132,10 @@ const setupMutationCacheSubscription = () => {
|
|
|
2132
2132
|
|
|
2133
2133
|
onCleanup(() => {
|
|
2134
2134
|
mutationCacheMap.clear()
|
|
2135
|
-
|
|
2135
|
+
unsubscribe()
|
|
2136
2136
|
})
|
|
2137
2137
|
|
|
2138
|
-
return
|
|
2138
|
+
return unsubscribe
|
|
2139
2139
|
}
|
|
2140
2140
|
|
|
2141
2141
|
const createSubscribeToMutationCacheBatcher = <T,>(
|
|
@@ -91,6 +91,7 @@ describe('Utils tests', () => {
|
|
|
91
91
|
['fr', 'bonjour'],
|
|
92
92
|
])
|
|
93
93
|
|
|
94
|
+
/* eslint-disable @cspell/spellchecker */
|
|
94
95
|
const newData = updateNestedDataByPath(oldData, ['fr'], 'salut')
|
|
95
96
|
|
|
96
97
|
expect(newData).not.toBe(oldData) // should not be the same reference
|
|
@@ -108,10 +109,12 @@ describe('Utils tests', () => {
|
|
|
108
109
|
}
|
|
109
110
|
`)
|
|
110
111
|
})
|
|
112
|
+
/* eslint-enable */
|
|
111
113
|
})
|
|
112
114
|
|
|
113
115
|
describe('nested data', () => {
|
|
114
116
|
it('should update data correctly', async () => {
|
|
117
|
+
/* eslint-disable @cspell/spellchecker */
|
|
115
118
|
const oldData = new Map([
|
|
116
119
|
[
|
|
117
120
|
'pumpkin-pie',
|
|
@@ -368,6 +371,7 @@ describe('Utils tests', () => {
|
|
|
368
371
|
},
|
|
369
372
|
}
|
|
370
373
|
`)
|
|
374
|
+
/* eslint-enable */
|
|
371
375
|
})
|
|
372
376
|
})
|
|
373
377
|
})
|
|
@@ -469,6 +473,7 @@ describe('Utils tests', () => {
|
|
|
469
473
|
|
|
470
474
|
describe('nested data', () => {
|
|
471
475
|
it('should delete nested items correctly', async () => {
|
|
476
|
+
/* eslint-disable @cspell/spellchecker */
|
|
472
477
|
const oldData = new Map([
|
|
473
478
|
[
|
|
474
479
|
'pumpkin-pie',
|
|
@@ -720,6 +725,7 @@ describe('Utils tests', () => {
|
|
|
720
725
|
},
|
|
721
726
|
}
|
|
722
727
|
`)
|
|
728
|
+
/* eslint-enable */
|
|
723
729
|
})
|
|
724
730
|
})
|
|
725
731
|
})
|
package/src/index.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import { createSignal, lazy } from 'solid-js'
|
|
|
3
3
|
import { setupStyleSheet } from './utils'
|
|
4
4
|
import type {
|
|
5
5
|
QueryClient,
|
|
6
|
-
onlineManager as
|
|
6
|
+
onlineManager as TOnlineManager,
|
|
7
7
|
} from '@tanstack/query-core'
|
|
8
8
|
import type { DevtoolsComponentType } from './Devtools'
|
|
9
9
|
import type {
|
|
@@ -21,7 +21,7 @@ export interface TanstackQueryDevtoolsConfig extends QueryDevtoolsProps {
|
|
|
21
21
|
|
|
22
22
|
class TanstackQueryDevtools {
|
|
23
23
|
#client: Signal<QueryClient>
|
|
24
|
-
#onlineManager: typeof
|
|
24
|
+
#onlineManager: typeof TOnlineManager
|
|
25
25
|
#queryFlavor: string
|
|
26
26
|
#version: string
|
|
27
27
|
#isMounted = false
|