@tanstack/solid-query 5.71.1 → 5.71.3
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/dev.cjs +5 -10
- package/build/dev.js +5 -10
- package/build/index.cjs +5 -10
- package/build/index.js +5 -10
- package/package.json +4 -4
package/build/dev.cjs
CHANGED
|
@@ -52,8 +52,7 @@ exports.IsRestoringProvider = IsRestoringContext.Provider;
|
|
|
52
52
|
|
|
53
53
|
// src/createBaseQuery.ts
|
|
54
54
|
function reconcileFn(store$1, result, reconcileOption, queryHash) {
|
|
55
|
-
if (reconcileOption === false)
|
|
56
|
-
return result;
|
|
55
|
+
if (reconcileOption === false) return result;
|
|
57
56
|
if (typeof reconcileOption === "function") {
|
|
58
57
|
const newData2 = reconcileOption(store$1.data, result.data);
|
|
59
58
|
return { ...result, data: newData2 };
|
|
@@ -78,8 +77,7 @@ function reconcileFn(store$1, result, reconcileOption, queryHash) {
|
|
|
78
77
|
return { ...result, data: newData };
|
|
79
78
|
}
|
|
80
79
|
var hydratableObserverResult = (query, result) => {
|
|
81
|
-
if (!web.isServer)
|
|
82
|
-
return result;
|
|
80
|
+
if (!web.isServer) return result;
|
|
83
81
|
const obj = {
|
|
84
82
|
...store.unwrap(result),
|
|
85
83
|
// During SSR, functions cannot be serialized, so we need to remove them
|
|
@@ -227,8 +225,7 @@ function createBaseQuery(options, Observer, queryClient) {
|
|
|
227
225
|
queries: [{ ...info.value.hydrationData }]
|
|
228
226
|
});
|
|
229
227
|
}
|
|
230
|
-
if (unsubscribe)
|
|
231
|
-
return;
|
|
228
|
+
if (unsubscribe) return;
|
|
232
229
|
const newOptions = { ...initialOptions };
|
|
233
230
|
if ((initialOptions.staleTime || !initialOptions.initialData) && info.value) {
|
|
234
231
|
newOptions.refetchOnMount = false;
|
|
@@ -458,8 +455,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
458
455
|
() => state.length,
|
|
459
456
|
() => state.map((queryRes) => {
|
|
460
457
|
const dataPromise = () => new Promise((resolve) => {
|
|
461
|
-
if (queryRes.isFetching && queryRes.isLoading)
|
|
462
|
-
return;
|
|
458
|
+
if (queryRes.isFetching && queryRes.isLoading) return;
|
|
463
459
|
resolve(store.unwrap(queryRes.data));
|
|
464
460
|
});
|
|
465
461
|
return solidJs.createResource(dataPromise);
|
|
@@ -490,8 +486,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
490
486
|
});
|
|
491
487
|
queueMicrotask(() => {
|
|
492
488
|
const taskToRun = taskQueue.pop();
|
|
493
|
-
if (taskToRun)
|
|
494
|
-
taskToRun();
|
|
489
|
+
if (taskToRun) taskToRun();
|
|
495
490
|
taskQueue = [];
|
|
496
491
|
});
|
|
497
492
|
});
|
package/build/dev.js
CHANGED
|
@@ -51,8 +51,7 @@ var IsRestoringProvider = IsRestoringContext.Provider;
|
|
|
51
51
|
|
|
52
52
|
// src/createBaseQuery.ts
|
|
53
53
|
function reconcileFn(store, result, reconcileOption, queryHash) {
|
|
54
|
-
if (reconcileOption === false)
|
|
55
|
-
return result;
|
|
54
|
+
if (reconcileOption === false) return result;
|
|
56
55
|
if (typeof reconcileOption === "function") {
|
|
57
56
|
const newData2 = reconcileOption(store.data, result.data);
|
|
58
57
|
return { ...result, data: newData2 };
|
|
@@ -77,8 +76,7 @@ function reconcileFn(store, result, reconcileOption, queryHash) {
|
|
|
77
76
|
return { ...result, data: newData };
|
|
78
77
|
}
|
|
79
78
|
var hydratableObserverResult = (query, result) => {
|
|
80
|
-
if (!isServer)
|
|
81
|
-
return result;
|
|
79
|
+
if (!isServer) return result;
|
|
82
80
|
const obj = {
|
|
83
81
|
...unwrap(result),
|
|
84
82
|
// During SSR, functions cannot be serialized, so we need to remove them
|
|
@@ -226,8 +224,7 @@ function createBaseQuery(options, Observer, queryClient) {
|
|
|
226
224
|
queries: [{ ...info.value.hydrationData }]
|
|
227
225
|
});
|
|
228
226
|
}
|
|
229
|
-
if (unsubscribe)
|
|
230
|
-
return;
|
|
227
|
+
if (unsubscribe) return;
|
|
231
228
|
const newOptions = { ...initialOptions };
|
|
232
229
|
if ((initialOptions.staleTime || !initialOptions.initialData) && info.value) {
|
|
233
230
|
newOptions.refetchOnMount = false;
|
|
@@ -457,8 +454,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
457
454
|
() => state.length,
|
|
458
455
|
() => state.map((queryRes) => {
|
|
459
456
|
const dataPromise = () => new Promise((resolve) => {
|
|
460
|
-
if (queryRes.isFetching && queryRes.isLoading)
|
|
461
|
-
return;
|
|
457
|
+
if (queryRes.isFetching && queryRes.isLoading) return;
|
|
462
458
|
resolve(unwrap(queryRes.data));
|
|
463
459
|
});
|
|
464
460
|
return createResource(dataPromise);
|
|
@@ -489,8 +485,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
489
485
|
});
|
|
490
486
|
queueMicrotask(() => {
|
|
491
487
|
const taskToRun = taskQueue.pop();
|
|
492
|
-
if (taskToRun)
|
|
493
|
-
taskToRun();
|
|
488
|
+
if (taskToRun) taskToRun();
|
|
494
489
|
taskQueue = [];
|
|
495
490
|
});
|
|
496
491
|
});
|
package/build/index.cjs
CHANGED
|
@@ -52,8 +52,7 @@ exports.IsRestoringProvider = IsRestoringContext.Provider;
|
|
|
52
52
|
|
|
53
53
|
// src/createBaseQuery.ts
|
|
54
54
|
function reconcileFn(store$1, result, reconcileOption, queryHash) {
|
|
55
|
-
if (reconcileOption === false)
|
|
56
|
-
return result;
|
|
55
|
+
if (reconcileOption === false) return result;
|
|
57
56
|
if (typeof reconcileOption === "function") {
|
|
58
57
|
const newData2 = reconcileOption(store$1.data, result.data);
|
|
59
58
|
return { ...result, data: newData2 };
|
|
@@ -69,8 +68,7 @@ function reconcileFn(store$1, result, reconcileOption, queryHash) {
|
|
|
69
68
|
return { ...result, data: newData };
|
|
70
69
|
}
|
|
71
70
|
var hydratableObserverResult = (query, result) => {
|
|
72
|
-
if (!web.isServer)
|
|
73
|
-
return result;
|
|
71
|
+
if (!web.isServer) return result;
|
|
74
72
|
const obj = {
|
|
75
73
|
...store.unwrap(result),
|
|
76
74
|
// During SSR, functions cannot be serialized, so we need to remove them
|
|
@@ -218,8 +216,7 @@ function createBaseQuery(options, Observer, queryClient) {
|
|
|
218
216
|
queries: [{ ...info.value.hydrationData }]
|
|
219
217
|
});
|
|
220
218
|
}
|
|
221
|
-
if (unsubscribe)
|
|
222
|
-
return;
|
|
219
|
+
if (unsubscribe) return;
|
|
223
220
|
const newOptions = { ...initialOptions };
|
|
224
221
|
if ((initialOptions.staleTime || !initialOptions.initialData) && info.value) {
|
|
225
222
|
newOptions.refetchOnMount = false;
|
|
@@ -449,8 +446,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
449
446
|
() => state.length,
|
|
450
447
|
() => state.map((queryRes) => {
|
|
451
448
|
const dataPromise = () => new Promise((resolve) => {
|
|
452
|
-
if (queryRes.isFetching && queryRes.isLoading)
|
|
453
|
-
return;
|
|
449
|
+
if (queryRes.isFetching && queryRes.isLoading) return;
|
|
454
450
|
resolve(store.unwrap(queryRes.data));
|
|
455
451
|
});
|
|
456
452
|
return solidJs.createResource(dataPromise);
|
|
@@ -481,8 +477,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
481
477
|
});
|
|
482
478
|
queueMicrotask(() => {
|
|
483
479
|
const taskToRun = taskQueue.pop();
|
|
484
|
-
if (taskToRun)
|
|
485
|
-
taskToRun();
|
|
480
|
+
if (taskToRun) taskToRun();
|
|
486
481
|
taskQueue = [];
|
|
487
482
|
});
|
|
488
483
|
});
|
package/build/index.js
CHANGED
|
@@ -51,8 +51,7 @@ var IsRestoringProvider = IsRestoringContext.Provider;
|
|
|
51
51
|
|
|
52
52
|
// src/createBaseQuery.ts
|
|
53
53
|
function reconcileFn(store, result, reconcileOption, queryHash) {
|
|
54
|
-
if (reconcileOption === false)
|
|
55
|
-
return result;
|
|
54
|
+
if (reconcileOption === false) return result;
|
|
56
55
|
if (typeof reconcileOption === "function") {
|
|
57
56
|
const newData2 = reconcileOption(store.data, result.data);
|
|
58
57
|
return { ...result, data: newData2 };
|
|
@@ -68,8 +67,7 @@ function reconcileFn(store, result, reconcileOption, queryHash) {
|
|
|
68
67
|
return { ...result, data: newData };
|
|
69
68
|
}
|
|
70
69
|
var hydratableObserverResult = (query, result) => {
|
|
71
|
-
if (!isServer)
|
|
72
|
-
return result;
|
|
70
|
+
if (!isServer) return result;
|
|
73
71
|
const obj = {
|
|
74
72
|
...unwrap(result),
|
|
75
73
|
// During SSR, functions cannot be serialized, so we need to remove them
|
|
@@ -217,8 +215,7 @@ function createBaseQuery(options, Observer, queryClient) {
|
|
|
217
215
|
queries: [{ ...info.value.hydrationData }]
|
|
218
216
|
});
|
|
219
217
|
}
|
|
220
|
-
if (unsubscribe)
|
|
221
|
-
return;
|
|
218
|
+
if (unsubscribe) return;
|
|
222
219
|
const newOptions = { ...initialOptions };
|
|
223
220
|
if ((initialOptions.staleTime || !initialOptions.initialData) && info.value) {
|
|
224
221
|
newOptions.refetchOnMount = false;
|
|
@@ -448,8 +445,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
448
445
|
() => state.length,
|
|
449
446
|
() => state.map((queryRes) => {
|
|
450
447
|
const dataPromise = () => new Promise((resolve) => {
|
|
451
|
-
if (queryRes.isFetching && queryRes.isLoading)
|
|
452
|
-
return;
|
|
448
|
+
if (queryRes.isFetching && queryRes.isLoading) return;
|
|
453
449
|
resolve(unwrap(queryRes.data));
|
|
454
450
|
});
|
|
455
451
|
return createResource(dataPromise);
|
|
@@ -480,8 +476,7 @@ function createQueries(queriesOptions, queryClient) {
|
|
|
480
476
|
});
|
|
481
477
|
queueMicrotask(() => {
|
|
482
478
|
const taskToRun = taskQueue.pop();
|
|
483
|
-
if (taskToRun)
|
|
484
|
-
taskToRun();
|
|
479
|
+
if (taskToRun) taskToRun();
|
|
485
480
|
taskQueue = [];
|
|
486
481
|
});
|
|
487
482
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-query",
|
|
3
|
-
"version": "5.71.
|
|
3
|
+
"version": "5.71.3",
|
|
4
4
|
"description": "Primitives for managing, caching and syncing asynchronous and remote data in Solid",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -45,14 +45,14 @@
|
|
|
45
45
|
"!src/__tests__"
|
|
46
46
|
],
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@tanstack/query-core": "5.71.
|
|
48
|
+
"@tanstack/query-core": "5.71.3"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@solidjs/testing-library": "^0.8.10",
|
|
52
52
|
"npm-run-all": "^4.1.5",
|
|
53
|
-
"solid-js": "^1.9.
|
|
53
|
+
"solid-js": "^1.9.5",
|
|
54
54
|
"tsup-preset-solid": "^2.2.0",
|
|
55
|
-
"vite-plugin-solid": "^2.
|
|
55
|
+
"vite-plugin-solid": "^2.11.6"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
58
|
"solid-js": "^1.6.0"
|