@ethlete/query 5.43.1 → 5.44.0
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/CHANGELOG.md +12 -0
- package/fesm2022/ethlete-query.mjs +6 -5
- package/fesm2022/ethlete-query.mjs.map +1 -1
- package/index.d.ts +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ethlete/query
|
|
2
2
|
|
|
3
|
+
## 5.44.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`8d2efef`](https://github.com/ethlete-io/ethdk/commit/8d2efef2a367db82d44977a3fdfe56396bb46515) Thanks [@TomTomB](https://github.com/TomTomB)! - Minor bump only
|
|
8
|
+
|
|
9
|
+
## 5.43.2
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`830b987`](https://github.com/ethlete-io/ethdk/commit/830b987eba43a51252c3c55eee5590ceef8bf1cb) Thanks [@TomTomB](https://github.com/TomTomB)! - Fix query v3 features not reacting to 204 responses due to null checks
|
|
14
|
+
|
|
3
15
|
## 5.43.1
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -1547,11 +1547,11 @@ const withSuccessHandling = (options) => {
|
|
|
1547
1547
|
type: QueryFeatureType.WITH_SUCCESS_HANDLING,
|
|
1548
1548
|
fn: (context) => {
|
|
1549
1549
|
nestedEffect(() => {
|
|
1550
|
-
const
|
|
1551
|
-
if (
|
|
1550
|
+
const event = context.state.latestHttpEvent();
|
|
1551
|
+
if (!event || event.type !== HttpEventType.Response)
|
|
1552
1552
|
return;
|
|
1553
1553
|
untracked(() => {
|
|
1554
|
-
options.handler(response);
|
|
1554
|
+
options.handler(context.state.response());
|
|
1555
1555
|
});
|
|
1556
1556
|
}, { injector: context.deps.injector });
|
|
1557
1557
|
},
|
|
@@ -1684,7 +1684,8 @@ const createQuerySnapshotFn = (options) => {
|
|
|
1684
1684
|
snapshotState.response.set(currentResponse);
|
|
1685
1685
|
if (currentLoading)
|
|
1686
1686
|
return;
|
|
1687
|
-
|
|
1687
|
+
const hasCompletedResponse = currentLatestHttpEvent?.type === HttpEventType.Response;
|
|
1688
|
+
if (!hasCompletedResponse && !currentError)
|
|
1688
1689
|
return;
|
|
1689
1690
|
// kill the effect once loading is done and we either have a response or an error
|
|
1690
1691
|
killEffectRef.destroy();
|
|
@@ -2084,7 +2085,6 @@ const createHttpRequest = (options) => {
|
|
|
2084
2085
|
return true;
|
|
2085
2086
|
};
|
|
2086
2087
|
const updateState = (event) => {
|
|
2087
|
-
currentEvent.set(event);
|
|
2088
2088
|
switch (event.type) {
|
|
2089
2089
|
case HttpEventType.Response:
|
|
2090
2090
|
{
|
|
@@ -2111,6 +2111,7 @@ const createHttpRequest = (options) => {
|
|
|
2111
2111
|
}
|
|
2112
2112
|
break;
|
|
2113
2113
|
}
|
|
2114
|
+
currentEvent.set(event);
|
|
2114
2115
|
};
|
|
2115
2116
|
const updateErrorState = (errorResponse) => {
|
|
2116
2117
|
const errorRes = createQueryErrorResponse(errorResponse);
|