@orpc/tanstack-query 1.8.0 → 1.8.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/README.md +2 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +4 -4
- package/package.json +12 -12
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
- **📘 First-Class OpenAPI**: Built-in support that fully adheres to the OpenAPI standard.
|
|
32
32
|
- **📝 Contract-First Development**: Optionally define your API contract before implementation.
|
|
33
33
|
- **🔍 First-Class OpenTelemetry**: Seamlessly integrate with OpenTelemetry for observability.
|
|
34
|
-
- **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte, Angular), Pinia Colada, and more.
|
|
34
|
+
- **⚙️ Framework Integrations**: Seamlessly integrate with TanStack Query (React, Vue, Solid, Svelte, Angular), SWR, Pinia Colada, and more.
|
|
35
35
|
- **🚀 Server Actions**: Fully compatible with React Server Actions on Next.js, TanStack Start, and other platforms.
|
|
36
36
|
- **🔠 Standard Schema Support**: Works out of the box with Zod, Valibot, ArkType, and other schema validators.
|
|
37
37
|
- **🗃️ Native Types**: Supports native types like Date, File, Blob, BigInt, URL, and more.
|
|
@@ -54,6 +54,7 @@ You can find the full documentation [here](https://orpc.unnoq.com).
|
|
|
54
54
|
- [@orpc/nest](https://www.npmjs.com/package/@orpc/nest): Deeply integrate oRPC with [NestJS](https://nestjs.com/).
|
|
55
55
|
- [@orpc/react](https://www.npmjs.com/package/@orpc/react): Utilities for integrating oRPC with React and React Server Actions.
|
|
56
56
|
- [@orpc/tanstack-query](https://www.npmjs.com/package/@orpc/tanstack-query): [TanStack Query](https://tanstack.com/query/latest) integration.
|
|
57
|
+
- [@orpc/experimental-react-swr](https://www.npmjs.com/package/@orpc/experimental-react-swr): [SWR](https://swr.vercel.app/) integration.
|
|
57
58
|
- [@orpc/vue-colada](https://www.npmjs.com/package/@orpc/vue-colada): Integration with [Pinia Colada](https://pinia-colada.esm.dev/).
|
|
58
59
|
- [@orpc/hey-api](https://www.npmjs.com/package/@orpc/hey-api): [Hey API](https://heyapi.dev/) integration.
|
|
59
60
|
- [@orpc/zod](https://www.npmjs.com/package/@orpc/zod): More schemas that [Zod](https://zod.dev/) doesn't support yet.
|
package/dist/index.d.mts
CHANGED
|
@@ -36,7 +36,7 @@ interface QueryOptionsBase<TOutput, TError> {
|
|
|
36
36
|
queryFn: QueryFunction<TOutput>;
|
|
37
37
|
throwOnError?: (error: TError) => boolean;
|
|
38
38
|
retryDelay?: (count: number, error: TError) => number;
|
|
39
|
-
enabled
|
|
39
|
+
enabled?: boolean;
|
|
40
40
|
}
|
|
41
41
|
type experimental_StreamedKeyOptions<TInput> = QueryKeyOptions<TInput> & {
|
|
42
42
|
queryFnOptions?: experimental_StreamedQueryOptions;
|
|
@@ -59,7 +59,7 @@ interface InfiniteOptionsBase<TOutput, TError, TPageParam> {
|
|
|
59
59
|
select?(): InfiniteData<TOutput, TPageParam>;
|
|
60
60
|
throwOnError?: (error: TError) => boolean;
|
|
61
61
|
retryDelay?: (count: number, error: TError) => number;
|
|
62
|
-
enabled
|
|
62
|
+
enabled?: boolean;
|
|
63
63
|
}
|
|
64
64
|
type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TMutationContext> = (Record<never, never> extends TClientContext ? {
|
|
65
65
|
context?: TClientContext;
|
package/dist/index.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ interface QueryOptionsBase<TOutput, TError> {
|
|
|
36
36
|
queryFn: QueryFunction<TOutput>;
|
|
37
37
|
throwOnError?: (error: TError) => boolean;
|
|
38
38
|
retryDelay?: (count: number, error: TError) => number;
|
|
39
|
-
enabled
|
|
39
|
+
enabled?: boolean;
|
|
40
40
|
}
|
|
41
41
|
type experimental_StreamedKeyOptions<TInput> = QueryKeyOptions<TInput> & {
|
|
42
42
|
queryFnOptions?: experimental_StreamedQueryOptions;
|
|
@@ -59,7 +59,7 @@ interface InfiniteOptionsBase<TOutput, TError, TPageParam> {
|
|
|
59
59
|
select?(): InfiniteData<TOutput, TPageParam>;
|
|
60
60
|
throwOnError?: (error: TError) => boolean;
|
|
61
61
|
retryDelay?: (count: number, error: TError) => number;
|
|
62
|
-
enabled
|
|
62
|
+
enabled?: boolean;
|
|
63
63
|
}
|
|
64
64
|
type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TMutationContext> = (Record<never, never> extends TClientContext ? {
|
|
65
65
|
context?: TClientContext;
|
package/dist/index.mjs
CHANGED
|
@@ -64,7 +64,7 @@ function createProcedureUtils(client, options) {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
},
|
|
67
|
-
|
|
67
|
+
...optionsIn.input === skipToken ? { enabled: false } : {},
|
|
68
68
|
...optionsIn,
|
|
69
69
|
queryKey
|
|
70
70
|
};
|
|
@@ -76,7 +76,6 @@ function createProcedureUtils(client, options) {
|
|
|
76
76
|
experimental_streamedOptions(...[optionsIn = {}]) {
|
|
77
77
|
const queryKey = utils.experimental_streamedKey(optionsIn);
|
|
78
78
|
return {
|
|
79
|
-
enabled: optionsIn.input === skipToken ? false : void 0,
|
|
80
79
|
queryFn: experimental_streamedQuery({
|
|
81
80
|
queryFn: async ({ signal }) => {
|
|
82
81
|
if (optionsIn.input === skipToken) {
|
|
@@ -99,6 +98,7 @@ function createProcedureUtils(client, options) {
|
|
|
99
98
|
},
|
|
100
99
|
...optionsIn.queryFnOptions
|
|
101
100
|
}),
|
|
101
|
+
...optionsIn.input === skipToken ? { enabled: false } : {},
|
|
102
102
|
...optionsIn,
|
|
103
103
|
queryKey
|
|
104
104
|
};
|
|
@@ -110,7 +110,6 @@ function createProcedureUtils(client, options) {
|
|
|
110
110
|
experimental_liveOptions(...[optionsIn = {}]) {
|
|
111
111
|
const queryKey = utils.experimental_liveKey(optionsIn);
|
|
112
112
|
return {
|
|
113
|
-
enabled: optionsIn.input === skipToken ? false : void 0,
|
|
114
113
|
queryFn: experimental_liveQuery(async ({ signal }) => {
|
|
115
114
|
if (optionsIn.input === skipToken) {
|
|
116
115
|
throw new Error("queryFn should not be called with skipToken used as input");
|
|
@@ -130,6 +129,7 @@ function createProcedureUtils(client, options) {
|
|
|
130
129
|
}
|
|
131
130
|
return output;
|
|
132
131
|
}),
|
|
132
|
+
...optionsIn.input === skipToken ? { enabled: false } : {},
|
|
133
133
|
...optionsIn,
|
|
134
134
|
queryKey
|
|
135
135
|
};
|
|
@@ -159,7 +159,7 @@ function createProcedureUtils(client, options) {
|
|
|
159
159
|
}
|
|
160
160
|
});
|
|
161
161
|
},
|
|
162
|
-
|
|
162
|
+
...optionsIn.input === skipToken ? { enabled: false } : {},
|
|
163
163
|
...optionsIn,
|
|
164
164
|
queryKey
|
|
165
165
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@orpc/tanstack-query",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.8.
|
|
4
|
+
"version": "1.8.2",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://orpc.unnoq.com",
|
|
7
7
|
"repository": {
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
],
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@tanstack/query-core": ">=5.80.2",
|
|
28
|
-
"@orpc/client": "1.8.
|
|
28
|
+
"@orpc/client": "1.8.2"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@orpc/shared": "1.8.
|
|
31
|
+
"@orpc/shared": "1.8.2"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@angular/core": "^20.1.
|
|
35
|
-
"@tanstack/angular-query-experimental": "^5.
|
|
36
|
-
"@tanstack/query-core": "^5.
|
|
37
|
-
"@tanstack/react-query": "^5.
|
|
38
|
-
"@tanstack/solid-query": "^5.
|
|
39
|
-
"@tanstack/svelte-query": "^5.
|
|
40
|
-
"@tanstack/vue-query": "^5.
|
|
41
|
-
"svelte": "^5.
|
|
34
|
+
"@angular/core": "^20.1.7",
|
|
35
|
+
"@tanstack/angular-query-experimental": "^5.85.3",
|
|
36
|
+
"@tanstack/query-core": "^5.85.3",
|
|
37
|
+
"@tanstack/react-query": "^5.85.3",
|
|
38
|
+
"@tanstack/solid-query": "^5.85.3",
|
|
39
|
+
"@tanstack/svelte-query": "^5.85.3",
|
|
40
|
+
"@tanstack/vue-query": "^5.85.3",
|
|
41
|
+
"svelte": "^5.38.1",
|
|
42
42
|
"vue": "^3.5.18",
|
|
43
|
-
"zod": "^4.0.
|
|
43
|
+
"zod": "^4.0.17"
|
|
44
44
|
},
|
|
45
45
|
"scripts": {
|
|
46
46
|
"build": "unbuild",
|