@orpc/tanstack-query 1.7.9 → 1.7.11

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/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: boolean;
39
+ enabled: boolean | undefined;
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: boolean;
62
+ enabled: boolean | undefined;
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: boolean;
39
+ enabled: boolean | undefined;
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: boolean;
62
+ enabled: boolean | undefined;
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
- enabled: optionsIn.input !== skipToken,
67
+ enabled: optionsIn.input === skipToken ? false : void 0,
68
68
  ...optionsIn,
69
69
  queryKey
70
70
  };
@@ -76,7 +76,7 @@ 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,
79
+ enabled: optionsIn.input === skipToken ? false : void 0,
80
80
  queryFn: experimental_streamedQuery({
81
81
  queryFn: async ({ signal }) => {
82
82
  if (optionsIn.input === skipToken) {
@@ -110,7 +110,7 @@ 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,
113
+ enabled: optionsIn.input === skipToken ? false : void 0,
114
114
  queryFn: experimental_liveQuery(async ({ signal }) => {
115
115
  if (optionsIn.input === skipToken) {
116
116
  throw new Error("queryFn should not be called with skipToken used as input");
@@ -159,7 +159,7 @@ function createProcedureUtils(client, options) {
159
159
  }
160
160
  });
161
161
  },
162
- enabled: optionsIn.input !== skipToken,
162
+ enabled: optionsIn.input === skipToken ? false : void 0,
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.7.9",
4
+ "version": "1.7.11",
5
5
  "license": "MIT",
6
6
  "homepage": "https://orpc.unnoq.com",
7
7
  "repository": {
@@ -25,10 +25,10 @@
25
25
  ],
26
26
  "peerDependencies": {
27
27
  "@tanstack/query-core": ">=5.80.2",
28
- "@orpc/client": "1.7.9"
28
+ "@orpc/client": "1.7.11"
29
29
  },
30
30
  "dependencies": {
31
- "@orpc/shared": "1.7.9"
31
+ "@orpc/shared": "1.7.11"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@angular/core": "^20.1.4",