@signalium/query 1.0.16 → 1.0.17

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # @signalium/query
2
2
 
3
+ ## 1.0.17
4
+
5
+ ### Patch Changes
6
+
7
+ - b244daa: Fix infinite query cache hydration and Hermes Uint32Array compatibility
8
+
9
+ - Fix Hermes (React Native) compatibility by spreading Set to Array before Uint32Array conversion, which prevents empty refIds buffers
10
+ - Fix infinite query cache loading by properly handling the array of pages when parsing entities, ensuring entity proxies resolve correctly after app restart
11
+
3
12
  ## 1.0.16
4
13
 
5
14
  ### Patch Changes
@@ -1846,7 +1846,17 @@ class QueryResultImpl {
1846
1846
  );
1847
1847
  }
1848
1848
  const shape = this.def.shape;
1849
- state.value = shape instanceof ValidatorDef ? parseEntities(cached.value, shape, this.queryClient, /* @__PURE__ */ new Set()) : parseValue(cached.value, shape, this.def.id);
1849
+ if (shape instanceof ValidatorDef) {
1850
+ if (this.def.type === QueryType.InfiniteQuery && Array.isArray(cached.value)) {
1851
+ state.value = cached.value.map(
1852
+ (page) => parseEntities(page, shape, this.queryClient, /* @__PURE__ */ new Set())
1853
+ );
1854
+ } else {
1855
+ state.value = parseEntities(cached.value, shape, this.queryClient, /* @__PURE__ */ new Set());
1856
+ }
1857
+ } else {
1858
+ state.value = parseValue(cached.value, shape, this.def.id);
1859
+ }
1850
1860
  }
1851
1861
  } catch (error) {
1852
1862
  this.queryClient.deleteCachedQuery(this.storageKey);