@tanstack/solid-query 5.27.2 → 5.27.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/solid-query",
|
|
3
|
-
"version": "5.27.
|
|
3
|
+
"version": "5.27.3",
|
|
4
4
|
"description": "Primitives for managing, caching and syncing asynchronous and remote data in Solid",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
],
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"solid-js": "^1.8.14",
|
|
51
|
-
"@tanstack/query-core": "5.27.
|
|
51
|
+
"@tanstack/query-core": "5.27.3"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"tsup-preset-solid": "^2.2.0",
|
|
@@ -1259,7 +1259,7 @@ describe('createQuery', () => {
|
|
|
1259
1259
|
data: undefined,
|
|
1260
1260
|
isFetching: false,
|
|
1261
1261
|
isSuccess: false,
|
|
1262
|
-
isStale:
|
|
1262
|
+
isStale: false,
|
|
1263
1263
|
})
|
|
1264
1264
|
})
|
|
1265
1265
|
|
|
@@ -1305,7 +1305,7 @@ describe('createQuery', () => {
|
|
|
1305
1305
|
data: undefined,
|
|
1306
1306
|
isFetching: false,
|
|
1307
1307
|
isSuccess: false,
|
|
1308
|
-
isStale:
|
|
1308
|
+
isStale: false,
|
|
1309
1309
|
})
|
|
1310
1310
|
})
|
|
1311
1311
|
|
|
@@ -3375,9 +3375,9 @@ describe('createQuery', () => {
|
|
|
3375
3375
|
<div>
|
|
3376
3376
|
<div>FetchStatus: {query.fetchStatus}</div>
|
|
3377
3377
|
<h2>Data: {query.data || 'no data'}</h2>
|
|
3378
|
-
{
|
|
3378
|
+
{shouldFetch() ? null : (
|
|
3379
3379
|
<button onClick={() => setShouldFetch(true)}>fetch</button>
|
|
3380
|
-
)
|
|
3380
|
+
)}
|
|
3381
3381
|
</div>
|
|
3382
3382
|
)
|
|
3383
3383
|
}
|
|
@@ -3501,10 +3501,11 @@ describe('createQuery', () => {
|
|
|
3501
3501
|
))
|
|
3502
3502
|
|
|
3503
3503
|
await sleep(50)
|
|
3504
|
-
expect(results.length).toBe(
|
|
3504
|
+
expect(results.length).toBe(3)
|
|
3505
3505
|
expect(results[0]).toMatchObject({ data: 'initial', isStale: true })
|
|
3506
3506
|
expect(results[1]).toMatchObject({ data: 'fetched data', isStale: true })
|
|
3507
|
-
//
|
|
3507
|
+
// disabled observers are not stale
|
|
3508
|
+
expect(results[2]).toMatchObject({ data: 'fetched data', isStale: false })
|
|
3508
3509
|
})
|
|
3509
3510
|
|
|
3510
3511
|
it('it should support enabled:false in query object syntax', async () => {
|
|
@@ -4549,13 +4550,13 @@ describe('createQuery', () => {
|
|
|
4549
4550
|
isPending: true,
|
|
4550
4551
|
isFetching: false,
|
|
4551
4552
|
isSuccess: false,
|
|
4552
|
-
isStale:
|
|
4553
|
+
isStale: false,
|
|
4553
4554
|
})
|
|
4554
4555
|
expect(states[1]).toMatchObject({
|
|
4555
4556
|
isPending: true,
|
|
4556
4557
|
isFetching: true,
|
|
4557
4558
|
isSuccess: false,
|
|
4558
|
-
isStale:
|
|
4559
|
+
isStale: false,
|
|
4559
4560
|
})
|
|
4560
4561
|
expect(states[2]).toMatchObject({
|
|
4561
4562
|
data: 1,
|
|
@@ -4568,7 +4569,7 @@ describe('createQuery', () => {
|
|
|
4568
4569
|
isPending: true,
|
|
4569
4570
|
isFetching: false,
|
|
4570
4571
|
isSuccess: false,
|
|
4571
|
-
isStale:
|
|
4572
|
+
isStale: false,
|
|
4572
4573
|
})
|
|
4573
4574
|
})
|
|
4574
4575
|
|