tanstack-query-callbacks 0.2.1 → 0.2.2
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/LICENSE +1 -1
- package/README.md +9 -1
- package/dist/vue/index.cjs +1 -1
- package/dist/vue/index.mjs +1 -1
- package/package.json +26 -27
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) zhong666 <hi@zhong666.me>
|
|
3
|
+
Copyright (c) 2023-PRESENT zhong666 <hi@zhong666.me>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
package/README.md
CHANGED
|
@@ -5,6 +5,9 @@
|
|
|
5
5
|
[![bundle][bundle-src]][bundle-href]
|
|
6
6
|
[![coverage][coverage-src]][coverage-href]
|
|
7
7
|
|
|
8
|
+
[![npm peer dependency version - @tanstack/vue-query][peer-deps-tanstack-vue-query-src]][peer-deps-tanstack-vue-query-href]
|
|
9
|
+
[![npm peer dependency version - @tanstack/react-query][peer-deps-tanstack-react-query-src]][peer-deps-tanstack-react-query-href]
|
|
10
|
+
|
|
8
11
|
Use callbacks of query in the usual way, as before.
|
|
9
12
|
|
|
10
13
|
The tanstack/query has removed `onSuccess`, `onError` and `onSettled` from useQuery in v5. You can find more information in the [RFC](https://github.com/TanStack/query/discussions/5279).
|
|
@@ -30,6 +33,7 @@ pnpm add tanstack-query-callbacks
|
|
|
30
33
|
<script setup lang="ts">
|
|
31
34
|
import { useQuery } from '@tanstack/vue-query'
|
|
32
35
|
import { useQueryCallbacks } from 'tanstack-query-callbacks/vue'
|
|
36
|
+
|
|
33
37
|
const queryKey = ['foo']
|
|
34
38
|
const query = useQuery(queryKey, () => Promise.resolve('bar'))
|
|
35
39
|
useQueryCallbacks({
|
|
@@ -78,5 +82,9 @@ useQueryCallbacks({
|
|
|
78
82
|
[npm-downloads-href]: https://npmjs.com/package/tanstack-query-callbacks
|
|
79
83
|
[bundle-src]: https://img.shields.io/bundlephobia/minzip/tanstack-query-callbacks?style=flat&colorA=18181B&colorB=F0DB4F
|
|
80
84
|
[bundle-href]: https://bundlephobia.com/result?p=tanstack-query-callbacks
|
|
81
|
-
[coverage-src]: https://img.shields.io/codecov/c/gh/aa900031/tanstack-query-callbacks?
|
|
85
|
+
[coverage-src]: https://img.shields.io/codecov/c/gh/aa900031/tanstack-query-callbacks?logo=codecov&style=flat&colorA=18181B&colorB=F0DB4F
|
|
82
86
|
[coverage-href]: https://codecov.io/gh/aa900031/tanstack-query-callbacks
|
|
87
|
+
[peer-deps-tanstack-vue-query-src]: https://img.shields.io/npm/dependency-version/tanstack-query-callbacks/peer/@tanstack/vue-query?style=flat&colorA=18181B&colorB=F0DB4F
|
|
88
|
+
[peer-deps-tanstack-vue-query-href]: https://www.npmjs.com/package/@tanstack/vue-query
|
|
89
|
+
[peer-deps-tanstack-react-query-src]: https://img.shields.io/npm/dependency-version/tanstack-query-callbacks/peer/@tanstack/react-query?style=flat&colorA=18181B&colorB=F0DB4F
|
|
90
|
+
[peer-deps-tanstack-react-query-href]: https://www.npmjs.com/package/@tanstack/react-query
|
package/dist/vue/index.cjs
CHANGED
package/dist/vue/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tanstack-query-callbacks",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.2",
|
|
5
5
|
"author": "zhong666 <hi@zhong666.me>",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"homepage": "https://github.com/aa900031/tanstack-query-callbacks#readme",
|
|
@@ -76,35 +76,34 @@
|
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"devDependencies": {
|
|
79
|
-
"@aa900031/eslint-config": "^3.
|
|
80
|
-
"@release-it
|
|
81
|
-
"@tanstack/query-core": "^5.
|
|
82
|
-
"@tanstack/query-core-v4": "npm:@tanstack/query-core@^4.
|
|
83
|
-
"@tanstack/react-query": "^5.
|
|
84
|
-
"@tanstack/react-query-v4": "npm:@tanstack/react-query@^4.
|
|
85
|
-
"@tanstack/vue-query": "^5.
|
|
86
|
-
"@tanstack/vue-query-v4": "npm:@tanstack/vue-query@^4.
|
|
79
|
+
"@aa900031/eslint-config": "^3.2.0",
|
|
80
|
+
"@aa900031/release-it-config": "^0.1.0",
|
|
81
|
+
"@tanstack/query-core": "^5.90.10",
|
|
82
|
+
"@tanstack/query-core-v4": "npm:@tanstack/query-core@^4.41.0",
|
|
83
|
+
"@tanstack/react-query": "^5.90.10",
|
|
84
|
+
"@tanstack/react-query-v4": "npm:@tanstack/react-query@^4.42.0",
|
|
85
|
+
"@tanstack/vue-query": "^5.91.2",
|
|
86
|
+
"@tanstack/vue-query-v4": "npm:@tanstack/vue-query@^4.41.0",
|
|
87
87
|
"@testing-library/react": "14.3.1",
|
|
88
88
|
"@testing-library/vue": "^8.1.0",
|
|
89
|
-
"@tsconfig/node18": "^18.2.
|
|
90
|
-
"@types/node": "^18.19.
|
|
91
|
-
"@types/react": "^18.3.
|
|
92
|
-
"@types/react-dom": "^18.3.
|
|
93
|
-
"@vitest/coverage-istanbul": "^3.
|
|
94
|
-
"@vitest/ui": "^3.
|
|
89
|
+
"@tsconfig/node18": "^18.2.5",
|
|
90
|
+
"@types/node": "^18.19.130",
|
|
91
|
+
"@types/react": "^18.3.26",
|
|
92
|
+
"@types/react-dom": "^18.3.7",
|
|
93
|
+
"@vitest/coverage-istanbul": "^3.2.4",
|
|
94
|
+
"@vitest/ui": "^3.2.4",
|
|
95
95
|
"@vue/composition-api": "^1.7.2",
|
|
96
|
-
"
|
|
97
|
-
"
|
|
98
|
-
"
|
|
99
|
-
"npm-run-all2": "^7.0.2",
|
|
96
|
+
"eslint": "^9.39.1",
|
|
97
|
+
"happy-dom": "^20.0.10",
|
|
98
|
+
"npm-run-all2": "^8.0.4",
|
|
100
99
|
"react": "^18.3.1",
|
|
101
100
|
"react-dom": "^18.3.1",
|
|
102
|
-
"release-it": "^
|
|
103
|
-
"typescript": "^5.
|
|
104
|
-
"unbuild": "^3.
|
|
105
|
-
"vitest": "^3.
|
|
106
|
-
"vue": "^3.5.
|
|
107
|
-
"vue-2": "npm:vue@~2.6.
|
|
101
|
+
"release-it": "^19.0.6",
|
|
102
|
+
"typescript": "^5.9.3",
|
|
103
|
+
"unbuild": "^3.6.1",
|
|
104
|
+
"vitest": "^3.2.4",
|
|
105
|
+
"vue": "^3.5.24",
|
|
106
|
+
"vue-2": "npm:vue@~2.6.14",
|
|
108
107
|
"vue-2.7": "npm:vue@~2.7.16"
|
|
109
108
|
},
|
|
110
109
|
"resolutions": {
|
|
@@ -112,7 +111,7 @@
|
|
|
112
111
|
},
|
|
113
112
|
"scripts": {
|
|
114
113
|
"build": "unbuild",
|
|
115
|
-
"test": "vitest run
|
|
114
|
+
"test": "vitest run",
|
|
116
115
|
"test:vue": "vue-demi-switch 3 && vitest run --dir ./src/vue",
|
|
117
116
|
"test:vue-2": "vue-demi-switch 2 vue-2 && vitest run --dir ./src/vue",
|
|
118
117
|
"test:vue-2.7": "vue-demi-switch 2.7 vue-2.7 && vitest run --dir ./src/vue",
|
|
@@ -120,7 +119,7 @@
|
|
|
120
119
|
"dev:test-vue": "vue-demi-switch 3 vue && vitest --dir ./src/vue",
|
|
121
120
|
"dev:test-vue-2": "vue-demi-switch 2 vue-2 && vitest --dir ./src/vue",
|
|
122
121
|
"dev:test-vue-2.7": "vue-demi-switch 2.7 vue-2.7 && vitest --dir ./src/vue",
|
|
123
|
-
"release": "release-it
|
|
122
|
+
"release": "release-it",
|
|
124
123
|
"lint": "eslint . --cache --cache-location ./node_modules/.cache/eslint",
|
|
125
124
|
"posttest:vue-2": "vue-demi-switch 3",
|
|
126
125
|
"posttest:vue-2.7": "vue-demi-switch 3",
|