@tanstack/lit-query 0.2.30 → 0.2.31
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 +3 -3
- package/build/legacy/index.cjs.map +1 -1
- package/build/legacy/index.js +3 -3
- package/build/legacy/index.js.map +1 -1
- package/build/modern/index.cjs +3 -3
- package/build/modern/index.cjs.map +1 -1
- package/build/modern/index.js +3 -3
- package/build/modern/index.js.map +1 -1
- package/package.json +3 -3
- package/src/QueryClientProvider.ts +2 -2
- package/src/controllers/BaseController.ts +1 -1
- package/src/createQueriesController.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tanstack/lit-query",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.31",
|
|
4
4
|
"description": "Lit adapter for TanStack Query Core",
|
|
5
5
|
"author": "tannerlinsley",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@lit/context": "^1.1.6",
|
|
43
|
-
"@tanstack/query-core": "5.
|
|
43
|
+
"@tanstack/query-core": "5.105.0",
|
|
44
44
|
"lit": "^3.3.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"typescript": "6.0.3"
|
|
50
50
|
},
|
|
51
51
|
"peerDependencies": {
|
|
52
|
-
"@tanstack/query-core": "^5.
|
|
52
|
+
"@tanstack/query-core": "^5.105.0",
|
|
53
53
|
"lit": ">=2.8.0 <4"
|
|
54
54
|
},
|
|
55
55
|
"scripts": {
|
|
@@ -120,7 +120,7 @@ export class QueryClientProvider extends LitElement {
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
const nextClient = this.client
|
|
123
|
-
// oxlint-disable-next-line typescript/no-unnecessary-condition
|
|
123
|
+
// oxlint-disable-next-line typescript/no-unnecessary-condition -- 'client' is undefined until it is assigned
|
|
124
124
|
if (!nextClient) {
|
|
125
125
|
if (this.isConnected) {
|
|
126
126
|
this.unmountClient(this.mountedClient)
|
|
@@ -183,7 +183,7 @@ export class QueryClientProvider extends LitElement {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
private requireClient(): QueryClient {
|
|
186
|
-
// oxlint-disable-next-line typescript/no-unnecessary-condition
|
|
186
|
+
// oxlint-disable-next-line typescript/no-unnecessary-condition -- 'client' is undefined until it is assigned
|
|
187
187
|
if (!this.client) {
|
|
188
188
|
throw createMissingQueryClientError()
|
|
189
189
|
}
|
|
@@ -284,7 +284,7 @@ export abstract class BaseController<TResult> implements ReactiveController {
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
const resolutionChanged = this.updateQueryClientResolutionState(
|
|
287
|
-
// oxlint-disable-next-line typescript/no-unnecessary-condition
|
|
287
|
+
// oxlint-disable-next-line typescript/no-unnecessary-condition -- the provider sends 'undefined' when its 'client' is removed
|
|
288
288
|
value === undefined ? 'missing' : 'bound',
|
|
289
289
|
)
|
|
290
290
|
const clientChanged = this.contextClient !== value
|
|
@@ -599,13 +599,13 @@ class QueriesController<
|
|
|
599
599
|
const observers = this.observer.getObservers()
|
|
600
600
|
|
|
601
601
|
return rawResult.map((result, index) => {
|
|
602
|
-
const
|
|
602
|
+
const resultObserver = observers[index]
|
|
603
603
|
|
|
604
|
-
if (!
|
|
604
|
+
if (!resultObserver || resultObserver.options.notifyOnChangeProps) {
|
|
605
605
|
return result
|
|
606
606
|
}
|
|
607
607
|
|
|
608
|
-
return
|
|
608
|
+
return resultObserver.trackResult(result, (accessedProp) => {
|
|
609
609
|
observers.forEach((observer) => {
|
|
610
610
|
observer.trackProp(accessedProp)
|
|
611
611
|
})
|