@tanstack/vue-query 5.56.2 → 5.59.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/vue-query",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.59.1",
|
|
4
4
|
"description": "Hooks for managing, caching and syncing asynchronous and remote data in Vue",
|
|
5
5
|
"author": "Damian Osipiuk",
|
|
6
6
|
"license": "MIT",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@tanstack/match-sorter-utils": "^8.15.1",
|
|
50
50
|
"@vue/devtools-api": "^6.6.3",
|
|
51
51
|
"vue-demi": "^0.14.10",
|
|
52
|
-
"@tanstack/query-core": "5.
|
|
52
|
+
"@tanstack/query-core": "5.59.0"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@vitejs/plugin-vue": "^5.1.1",
|
|
@@ -142,6 +142,12 @@ describe('utils', () => {
|
|
|
142
142
|
})
|
|
143
143
|
})
|
|
144
144
|
|
|
145
|
+
test('should clone getters returning values in queryKey', () => {
|
|
146
|
+
const val = ref({ queryKey: [1, 2, () => '3'] })
|
|
147
|
+
const cp = cloneDeepUnref(val)
|
|
148
|
+
expect(cp).toStrictEqual({ queryKey: [1, 2, '3'] })
|
|
149
|
+
})
|
|
150
|
+
|
|
145
151
|
test('should unref undefined', () => {
|
|
146
152
|
expect(cloneDeepUnref(ref(undefined))).toBe(undefined)
|
|
147
153
|
})
|
|
@@ -14,9 +14,11 @@ vi.mock('../devtools/devtools')
|
|
|
14
14
|
vi.mock('../useQueryClient')
|
|
15
15
|
vi.mock('../useBaseQuery')
|
|
16
16
|
|
|
17
|
+
type UnmountCallback = () => void
|
|
18
|
+
|
|
17
19
|
interface TestApp extends App {
|
|
18
|
-
onUnmount:
|
|
19
|
-
_unmount:
|
|
20
|
+
onUnmount: UnmountCallback
|
|
21
|
+
_unmount: UnmountCallback
|
|
20
22
|
_mixin: ComponentOptions
|
|
21
23
|
_provided: Record<string, any>
|
|
22
24
|
$root: TestApp
|
|
@@ -29,11 +31,11 @@ function getAppMock(withUnmountHook = false): TestApp {
|
|
|
29
31
|
provide: vi.fn(),
|
|
30
32
|
unmount: vi.fn(),
|
|
31
33
|
onUnmount: withUnmountHook
|
|
32
|
-
? vi.fn((u:
|
|
34
|
+
? vi.fn((u: UnmountCallback) => {
|
|
33
35
|
mock._unmount = u
|
|
34
36
|
})
|
|
35
37
|
: undefined,
|
|
36
|
-
mixin: (m: ComponentOptions)
|
|
38
|
+
mixin: (m: ComponentOptions) => {
|
|
37
39
|
mock._mixin = m
|
|
38
40
|
},
|
|
39
41
|
} as unknown as TestApp
|