@tanstack/lit-query 0.2.22 → 0.2.24
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/build/legacy/index.cjs.map +1 -1
- package/build/legacy/index.d.cts.map +1 -1
- package/build/legacy/index.d.ts.map +1 -1
- package/build/legacy/index.js.map +1 -1
- package/build/modern/index.cjs.map +1 -1
- package/build/modern/index.d.cts.map +1 -1
- package/build/modern/index.d.ts.map +1 -1
- package/build/modern/index.js.map +1 -1
- package/package.json +7 -7
- package/src/QueryClientProvider.ts +1 -2
- package/src/controllers/BaseController.ts +1 -4
- package/src/createMutationController.ts +1 -2
- package/src/queryOptions.ts +1 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/lit-query",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.24",
|
|
4
4
|
"description": "Lit adapter for TanStack Query Core",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,18 +40,18 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@lit/context": "^1.1.6",
|
|
43
|
-
"
|
|
44
|
-
"
|
|
43
|
+
"@tanstack/query-core": "5.103.3",
|
|
44
|
+
"lit": "^3.3.3"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
|
-
"@tanstack/query-core": "^5.
|
|
47
|
+
"@tanstack/query-core": "^5.103.3",
|
|
48
48
|
"lit": ">=2.8.0 <4"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"@eslint/js": "^9.36.0",
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"
|
|
52
|
+
"@tanstack/query-test-utils": "0.0.0",
|
|
53
|
+
"globals": "^17.12.0",
|
|
54
|
+
"typescript-eslint": "^8.54.0"
|
|
55
55
|
},
|
|
56
56
|
"scripts": {
|
|
57
57
|
"clean": "premove ./build ./coverage ./dist-ts ./.cache/test-types",
|
|
@@ -119,8 +119,7 @@ export class QueryClientProvider extends LitElement {
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
const previousClient = changedProperties.get('client') as
|
|
122
|
-
|
|
|
123
|
-
| undefined
|
|
122
|
+
QueryClient | undefined
|
|
124
123
|
if (previousClient && previousClient !== nextClient && this.isConnected) {
|
|
125
124
|
this.unmountClient(previousClient)
|
|
126
125
|
}
|
|
@@ -7,10 +7,7 @@ import {
|
|
|
7
7
|
} from '../context.js'
|
|
8
8
|
|
|
9
9
|
type QueryClientResolutionState =
|
|
10
|
-
|
|
11
|
-
| 'awaiting-context'
|
|
12
|
-
| 'bound'
|
|
13
|
-
| 'missing'
|
|
10
|
+
'pre-connect' | 'awaiting-context' | 'bound' | 'missing'
|
|
14
11
|
|
|
15
12
|
export abstract class BaseController<TResult> implements ReactiveController {
|
|
16
13
|
protected result: TResult
|
|
@@ -121,8 +121,7 @@ class MutationController<
|
|
|
121
121
|
CreateMutationOptions<TData, TError, TVariables, TOnMutateResult>
|
|
122
122
|
>
|
|
123
123
|
private observer:
|
|
124
|
-
|
|
125
|
-
| undefined
|
|
124
|
+
MutationObserver<TData, TError, TVariables, TOnMutateResult> | undefined
|
|
126
125
|
private unsubscribe: (() => void) | undefined
|
|
127
126
|
private queryClient: QueryClient | undefined
|
|
128
127
|
|
package/src/queryOptions.ts
CHANGED
|
@@ -23,8 +23,7 @@ export type DefinedInitialDataOptions<
|
|
|
23
23
|
'queryFn'
|
|
24
24
|
> & {
|
|
25
25
|
initialData:
|
|
26
|
-
| NonUndefinedGuard<TQueryFnData>
|
|
27
|
-
| (() => NonUndefinedGuard<TQueryFnData>)
|
|
26
|
+
NonUndefinedGuard<TQueryFnData> | (() => NonUndefinedGuard<TQueryFnData>)
|
|
28
27
|
queryFn?: QueryFunction<TQueryFnData, TQueryKey>
|
|
29
28
|
}
|
|
30
29
|
|