@orpc/solid-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 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
@@ -31,9 +31,9 @@ interface QueryOptionsBase<TOutput, TError> {
31
31
  queryFn(ctx: QueryFunctionContext): Promise<TOutput>;
32
32
  throwOnError?(error: TError): boolean;
33
33
  retryDelay?: (count: number, error: TError) => number;
34
- enabled: boolean | undefined;
34
+ enabled?: boolean;
35
35
  }
36
- type experimental_StreamedQueryOptions = Omit<Parameters<typeof experimental_streamedQuery>[0]['refetchMode'], 'queryFn'>;
36
+ type experimental_StreamedQueryOptions = Omit<Parameters<typeof experimental_streamedQuery>[0], 'queryFn'>;
37
37
  type experimental_InferStreamedOutput<TOutput> = TOutput extends AsyncIterable<infer U> ? U[] : never;
38
38
  type experimental_StreamedOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TSelectData> = QueryOptionsIn<TClientContext, TInput, TOutput, TError, TSelectData> & {
39
39
  queryFnOptions?: experimental_StreamedQueryOptions;
@@ -52,7 +52,7 @@ interface InfiniteOptionsBase<TOutput, TError, TPageParam> {
52
52
  queryFn(ctx: QueryFunctionContext<QueryKey, TPageParam>): Promise<TOutput>;
53
53
  throwOnError?(error: TError): boolean;
54
54
  retryDelay?: (count: number, error: TError) => number;
55
- enabled: boolean | undefined;
55
+ enabled?: boolean;
56
56
  }
57
57
  type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TMutationContext> = (Record<never, never> extends TClientContext ? {
58
58
  context?: TClientContext;
package/dist/index.d.ts CHANGED
@@ -31,9 +31,9 @@ interface QueryOptionsBase<TOutput, TError> {
31
31
  queryFn(ctx: QueryFunctionContext): Promise<TOutput>;
32
32
  throwOnError?(error: TError): boolean;
33
33
  retryDelay?: (count: number, error: TError) => number;
34
- enabled: boolean | undefined;
34
+ enabled?: boolean;
35
35
  }
36
- type experimental_StreamedQueryOptions = Omit<Parameters<typeof experimental_streamedQuery>[0]['refetchMode'], 'queryFn'>;
36
+ type experimental_StreamedQueryOptions = Omit<Parameters<typeof experimental_streamedQuery>[0], 'queryFn'>;
37
37
  type experimental_InferStreamedOutput<TOutput> = TOutput extends AsyncIterable<infer U> ? U[] : never;
38
38
  type experimental_StreamedOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TSelectData> = QueryOptionsIn<TClientContext, TInput, TOutput, TError, TSelectData> & {
39
39
  queryFnOptions?: experimental_StreamedQueryOptions;
@@ -52,7 +52,7 @@ interface InfiniteOptionsBase<TOutput, TError, TPageParam> {
52
52
  queryFn(ctx: QueryFunctionContext<QueryKey, TPageParam>): Promise<TOutput>;
53
53
  throwOnError?(error: TError): boolean;
54
54
  retryDelay?: (count: number, error: TError) => number;
55
- enabled: boolean | undefined;
55
+ enabled?: boolean;
56
56
  }
57
57
  type MutationOptionsIn<TClientContext extends ClientContext, TInput, TOutput, TError, TMutationContext> = (Record<never, never> extends TClientContext ? {
58
58
  context?: TClientContext;
package/dist/index.mjs CHANGED
@@ -23,13 +23,12 @@ function createProcedureUtils(client, options) {
23
23
  }
24
24
  return client(optionsIn.input, { signal, context: optionsIn.context });
25
25
  },
26
- enabled: optionsIn.input === skipToken ? false : void 0,
26
+ ...optionsIn.input === skipToken ? { enabled: false } : {},
27
27
  ...optionsIn
28
28
  };
29
29
  },
30
30
  experimental_streamedOptions(...[optionsIn = {}]) {
31
31
  return {
32
- enabled: optionsIn.input === skipToken ? false : void 0,
33
32
  queryKey: generateOperationKey(options.path, { type: "streamed", input: optionsIn.input, fnOptions: optionsIn.queryFnOptions }),
34
33
  queryFn: experimental_streamedQuery({
35
34
  queryFn: async ({ signal }) => {
@@ -44,6 +43,7 @@ function createProcedureUtils(client, options) {
44
43
  },
45
44
  ...optionsIn.queryFnOptions
46
45
  }),
46
+ ...optionsIn.input === skipToken ? { enabled: false } : {},
47
47
  ...optionsIn
48
48
  };
49
49
  },
@@ -59,7 +59,7 @@ function createProcedureUtils(client, options) {
59
59
  }
60
60
  return client(optionsIn.input(pageParam), { signal, context: optionsIn.context });
61
61
  },
62
- enabled: optionsIn.input === skipToken ? false : void 0,
62
+ ...optionsIn.input === skipToken ? { enabled: false } : {},
63
63
  ...optionsIn
64
64
  };
65
65
  },
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@orpc/solid-query",
3
3
  "type": "module",
4
- "version": "1.8.0",
4
+ "version": "1.8.2",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -29,15 +29,15 @@
29
29
  "peerDependencies": {
30
30
  "@tanstack/solid-query": ">=5.80.2",
31
31
  "solid-js": ">=1.9.0",
32
- "@orpc/client": "1.8.0"
32
+ "@orpc/client": "1.8.2"
33
33
  },
34
34
  "dependencies": {
35
- "@orpc/shared": "1.8.0",
36
- "@orpc/tanstack-query": "1.8.0"
35
+ "@orpc/shared": "1.8.2",
36
+ "@orpc/tanstack-query": "1.8.2"
37
37
  },
38
38
  "devDependencies": {
39
- "@tanstack/solid-query": "^5.83.0",
40
- "zod": "^4.0.14"
39
+ "@tanstack/solid-query": "^5.85.3",
40
+ "zod": "^4.0.17"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "unbuild",