tanstack-query-callbacks 0.2.0 → 0.2.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/dist/core/index.d.cts +2 -1
- package/dist/core/index.d.mts +2 -1
- package/dist/core/index.d.ts +2 -1
- package/dist/react/index.cjs +1 -1
- package/dist/react/index.d.cts +3 -2
- package/dist/react/index.d.mts +3 -2
- package/dist/react/index.d.ts +3 -2
- package/dist/react/index.mjs +1 -1
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.d.cts +4 -3
- package/dist/vue/index.d.mts +4 -3
- package/dist/vue/index.d.ts +4 -3
- package/dist/vue/index.mjs +1 -1
- package/package.json +44 -29
- package/react.d.ts +1 -1
- package/vue.d.ts +1 -1
package/dist/core/index.d.cts
CHANGED
|
@@ -14,4 +14,5 @@ interface SubscribeQueryCallbacksProps<TQueryFnData, TError> extends QueryCallba
|
|
|
14
14
|
}
|
|
15
15
|
declare function subscribeQueryCallbacks<TQueryFnData = unknown, TError = unknown>({ queryClient, queryKey, onSuccess, onError, onSettled, }: SubscribeQueryCallbacksProps<TQueryFnData, TError>): () => void;
|
|
16
16
|
|
|
17
|
-
export {
|
|
17
|
+
export { subscribeQueryCallbacks };
|
|
18
|
+
export type { QueryCallbacks, QueryErrorHandler, QuerySettledHandler, QuerySuccessHandler, SubscribeQueryCallbacksProps };
|
package/dist/core/index.d.mts
CHANGED
|
@@ -14,4 +14,5 @@ interface SubscribeQueryCallbacksProps<TQueryFnData, TError> extends QueryCallba
|
|
|
14
14
|
}
|
|
15
15
|
declare function subscribeQueryCallbacks<TQueryFnData = unknown, TError = unknown>({ queryClient, queryKey, onSuccess, onError, onSettled, }: SubscribeQueryCallbacksProps<TQueryFnData, TError>): () => void;
|
|
16
16
|
|
|
17
|
-
export {
|
|
17
|
+
export { subscribeQueryCallbacks };
|
|
18
|
+
export type { QueryCallbacks, QueryErrorHandler, QuerySettledHandler, QuerySuccessHandler, SubscribeQueryCallbacksProps };
|
package/dist/core/index.d.ts
CHANGED
|
@@ -14,4 +14,5 @@ interface SubscribeQueryCallbacksProps<TQueryFnData, TError> extends QueryCallba
|
|
|
14
14
|
}
|
|
15
15
|
declare function subscribeQueryCallbacks<TQueryFnData = unknown, TError = unknown>({ queryClient, queryKey, onSuccess, onError, onSettled, }: SubscribeQueryCallbacksProps<TQueryFnData, TError>): () => void;
|
|
16
16
|
|
|
17
|
-
export {
|
|
17
|
+
export { subscribeQueryCallbacks };
|
|
18
|
+
export type { QueryCallbacks, QueryErrorHandler, QuerySettledHandler, QuerySuccessHandler, SubscribeQueryCallbacksProps };
|
package/dist/react/index.cjs
CHANGED
package/dist/react/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Context } from 'react';
|
|
2
1
|
import { QueryKey, QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { Context } from 'react';
|
|
3
3
|
import { QueryCallbacks } from '../core/index.cjs';
|
|
4
4
|
import '@tanstack/query-core';
|
|
5
5
|
|
|
@@ -16,4 +16,5 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
|
|
|
16
16
|
}
|
|
17
17
|
declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
|
|
18
18
|
|
|
19
|
-
export {
|
|
19
|
+
export { useQueryCallbacks };
|
|
20
|
+
export type { UseQueryCallbacksProps };
|
package/dist/react/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Context } from 'react';
|
|
2
1
|
import { QueryKey, QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { Context } from 'react';
|
|
3
3
|
import { QueryCallbacks } from '../core/index.mjs';
|
|
4
4
|
import '@tanstack/query-core';
|
|
5
5
|
|
|
@@ -16,4 +16,5 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
|
|
|
16
16
|
}
|
|
17
17
|
declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
|
|
18
18
|
|
|
19
|
-
export {
|
|
19
|
+
export { useQueryCallbacks };
|
|
20
|
+
export type { UseQueryCallbacksProps };
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Context } from 'react';
|
|
2
1
|
import { QueryKey, QueryClient } from '@tanstack/react-query';
|
|
2
|
+
import { Context } from 'react';
|
|
3
3
|
import { QueryCallbacks } from '../core/index.js';
|
|
4
4
|
import '@tanstack/query-core';
|
|
5
5
|
|
|
@@ -16,4 +16,5 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
|
|
|
16
16
|
}
|
|
17
17
|
declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
|
|
18
18
|
|
|
19
|
-
export {
|
|
19
|
+
export { useQueryCallbacks };
|
|
20
|
+
export type { UseQueryCallbacksProps };
|
package/dist/react/index.mjs
CHANGED
package/dist/vue/index.cjs
CHANGED
package/dist/vue/index.d.cts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MaybeRef } from 'vue-demi';
|
|
2
1
|
import { QueryKey, QueryClient } from '@tanstack/vue-query';
|
|
2
|
+
import { Ref } from 'vue-demi';
|
|
3
3
|
import { QueryCallbacks } from '../core/index.cjs';
|
|
4
4
|
import '@tanstack/query-core';
|
|
5
5
|
|
|
6
6
|
interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQueryFnData, TError> {
|
|
7
|
-
queryKey:
|
|
7
|
+
queryKey: QueryKey | Ref<QueryKey>;
|
|
8
8
|
/**
|
|
9
9
|
* QueryClient instance
|
|
10
10
|
*/
|
|
@@ -20,4 +20,5 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
|
|
|
20
20
|
}
|
|
21
21
|
declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { useQueryCallbacks };
|
|
24
|
+
export type { UseQueryCallbacksProps };
|
package/dist/vue/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MaybeRef } from 'vue-demi';
|
|
2
1
|
import { QueryKey, QueryClient } from '@tanstack/vue-query';
|
|
2
|
+
import { Ref } from 'vue-demi';
|
|
3
3
|
import { QueryCallbacks } from '../core/index.mjs';
|
|
4
4
|
import '@tanstack/query-core';
|
|
5
5
|
|
|
6
6
|
interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQueryFnData, TError> {
|
|
7
|
-
queryKey:
|
|
7
|
+
queryKey: QueryKey | Ref<QueryKey>;
|
|
8
8
|
/**
|
|
9
9
|
* QueryClient instance
|
|
10
10
|
*/
|
|
@@ -20,4 +20,5 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
|
|
|
20
20
|
}
|
|
21
21
|
declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { useQueryCallbacks };
|
|
24
|
+
export type { UseQueryCallbacksProps };
|
package/dist/vue/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { MaybeRef } from 'vue-demi';
|
|
2
1
|
import { QueryKey, QueryClient } from '@tanstack/vue-query';
|
|
2
|
+
import { Ref } from 'vue-demi';
|
|
3
3
|
import { QueryCallbacks } from '../core/index.js';
|
|
4
4
|
import '@tanstack/query-core';
|
|
5
5
|
|
|
6
6
|
interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQueryFnData, TError> {
|
|
7
|
-
queryKey:
|
|
7
|
+
queryKey: QueryKey | Ref<QueryKey>;
|
|
8
8
|
/**
|
|
9
9
|
* QueryClient instance
|
|
10
10
|
*/
|
|
@@ -20,4 +20,5 @@ interface UseQueryCallbacksProps<TQueryFnData, TError> extends QueryCallbacks<TQ
|
|
|
20
20
|
}
|
|
21
21
|
declare function useQueryCallbacks<TQueryFnData = unknown, TError = unknown>(props: UseQueryCallbacksProps<TQueryFnData, TError>): void;
|
|
22
22
|
|
|
23
|
-
export {
|
|
23
|
+
export { useQueryCallbacks };
|
|
24
|
+
export type { UseQueryCallbacksProps };
|
package/dist/vue/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tanstack-query-callbacks",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
5
|
-
"packageManager": "pnpm@8.15.1",
|
|
4
|
+
"version": "0.2.1",
|
|
6
5
|
"author": "zhong666 <hi@zhong666.me>",
|
|
7
6
|
"license": "MIT",
|
|
7
|
+
"homepage": "https://github.com/aa900031/tanstack-query-callbacks#readme",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/aa900031/tanstack-query-callbacks.git"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/aa900031/tanstack-query-callbacks/issues"
|
|
14
|
+
},
|
|
8
15
|
"keywords": [
|
|
9
16
|
"tanstack",
|
|
10
17
|
"tanstack-query",
|
|
@@ -69,36 +76,39 @@
|
|
|
69
76
|
}
|
|
70
77
|
},
|
|
71
78
|
"devDependencies": {
|
|
72
|
-
"@aa900031/eslint-config": "^1.
|
|
73
|
-
"@release-it/conventional-changelog": "^
|
|
74
|
-
"@tanstack/query-core": "^5.
|
|
79
|
+
"@aa900031/eslint-config": "^3.1.0",
|
|
80
|
+
"@release-it/conventional-changelog": "^9.0.4",
|
|
81
|
+
"@tanstack/query-core": "^5.72.1",
|
|
75
82
|
"@tanstack/query-core-v4": "npm:@tanstack/query-core@^4.36.1",
|
|
76
|
-
"@tanstack/react-query": "^5.
|
|
83
|
+
"@tanstack/react-query": "^5.72.1",
|
|
77
84
|
"@tanstack/react-query-v4": "npm:@tanstack/react-query@^4.36.1",
|
|
78
|
-
"@tanstack/vue-query": "^5.
|
|
85
|
+
"@tanstack/vue-query": "^5.72.1",
|
|
79
86
|
"@tanstack/vue-query-v4": "npm:@tanstack/vue-query@^4.37.1",
|
|
80
|
-
"@testing-library/react": "14.
|
|
81
|
-
"@testing-library/vue": "^8.0
|
|
82
|
-
"@tsconfig/node18": "^18.2.
|
|
83
|
-
"@types/node": "^18.19.
|
|
84
|
-
"@types/react": "^18.
|
|
85
|
-
"@types/react-dom": "^18.
|
|
86
|
-
"@vitest/coverage-istanbul": "^1.
|
|
87
|
-
"@vitest/ui": "^1.
|
|
87
|
+
"@testing-library/react": "14.3.1",
|
|
88
|
+
"@testing-library/vue": "^8.1.0",
|
|
89
|
+
"@tsconfig/node18": "^18.2.4",
|
|
90
|
+
"@types/node": "^18.19.86",
|
|
91
|
+
"@types/react": "^18.3.20",
|
|
92
|
+
"@types/react-dom": "^18.3.6",
|
|
93
|
+
"@vitest/coverage-istanbul": "^3.1.1",
|
|
94
|
+
"@vitest/ui": "^3.1.1",
|
|
88
95
|
"@vue/composition-api": "^1.7.2",
|
|
89
|
-
"conventional-changelog-unjs": "^0.
|
|
90
|
-
"eslint": "^
|
|
91
|
-
"happy-dom": "^
|
|
92
|
-
"npm-run-all2": "^
|
|
93
|
-
"react": "^18.
|
|
94
|
-
"react-dom": "^18.
|
|
95
|
-
"release-it": "^
|
|
96
|
-
"typescript": "^5.
|
|
97
|
-
"unbuild": "^
|
|
98
|
-
"vitest": "^1.
|
|
99
|
-
"vue": "^3.
|
|
100
|
-
"vue-2": "npm:vue
|
|
101
|
-
"vue-2.7": "npm:vue
|
|
96
|
+
"conventional-changelog-unjs": "^1.0.0",
|
|
97
|
+
"eslint": "^9.24.0",
|
|
98
|
+
"happy-dom": "^17.4.4",
|
|
99
|
+
"npm-run-all2": "^7.0.2",
|
|
100
|
+
"react": "^18.3.1",
|
|
101
|
+
"react-dom": "^18.3.1",
|
|
102
|
+
"release-it": "^17.11.0",
|
|
103
|
+
"typescript": "^5.8.3",
|
|
104
|
+
"unbuild": "^3.5.0",
|
|
105
|
+
"vitest": "^3.1.1",
|
|
106
|
+
"vue": "^3.5.13",
|
|
107
|
+
"vue-2": "npm:vue@~2.6.12",
|
|
108
|
+
"vue-2.7": "npm:vue@~2.7.16"
|
|
109
|
+
},
|
|
110
|
+
"resolutions": {
|
|
111
|
+
"vue-demi": "latest"
|
|
102
112
|
},
|
|
103
113
|
"scripts": {
|
|
104
114
|
"build": "unbuild",
|
|
@@ -107,9 +117,14 @@
|
|
|
107
117
|
"test:vue-2": "vue-demi-switch 2 vue-2 && vitest run --dir ./src/vue",
|
|
108
118
|
"test:vue-2.7": "vue-demi-switch 2.7 vue-2.7 && vitest run --dir ./src/vue",
|
|
109
119
|
"dev:test": "vitest",
|
|
120
|
+
"dev:test-vue": "vue-demi-switch 3 vue && vitest --dir ./src/vue",
|
|
121
|
+
"dev:test-vue-2": "vue-demi-switch 2 vue-2 && vitest --dir ./src/vue",
|
|
122
|
+
"dev:test-vue-2.7": "vue-demi-switch 2.7 vue-2.7 && vitest --dir ./src/vue",
|
|
110
123
|
"release": "release-it --ci",
|
|
111
124
|
"lint": "eslint . --cache --cache-location ./node_modules/.cache/eslint",
|
|
112
125
|
"posttest:vue-2": "vue-demi-switch 3",
|
|
113
|
-
"posttest:vue-2.7": "vue-demi-switch 3"
|
|
126
|
+
"posttest:vue-2.7": "vue-demi-switch 3",
|
|
127
|
+
"postdev:test-vue-2": "vue-demi-switch 3",
|
|
128
|
+
"postdev:test-vue-2.7": "vue-demi-switch 3"
|
|
114
129
|
}
|
|
115
130
|
}
|
package/react.d.ts
CHANGED
package/vue.d.ts
CHANGED