Releases: reactive/data-client
@data-client/vue@0.16.1
📝 Read the full release announcement
Patch Changes
-
fd64b41- Include@data-client/normalizr@0.16.6performance improvements:-
#3875
467a5f6- Fix deepClone to only copy own propertiesdeepClonein the immutable store path now usesObject.keys()instead offor...in, preventing inherited properties from being copied into cloned state. -
#3877
e9e96f1- Replace megamorphic computed dispatch in getDependency with switchgetDependencyuseddelegate[array[index]](...spread)which creates a temporary array, a computed property lookup, and a spread call on every invocation — a megamorphic pattern that prevents V8 from inlining or type-specializing the call site. Replaced with aswitchonpath.lengthfor monomorphic dispatch. -
#3876
7d28629- Improve denormalization performance by pre-allocating the dependency tracking slotReplace
Array.prototype.unshift()inGlobalCache.getResults()with a pre-allocated slot at index 0, avoiding O(n) element shifting on every cache-miss denormalization. -
#3884
7df6a49- Move entity table POJO clone from getNewEntities to setEntityLazy-clone entity and meta tables on first write per entity type instead of eagerly in getNewEntities. This keeps getNewEntities as a pure Map operation, eliminating its V8 Maglev bailout ("Insufficient type feedback for generic named access" on
this.entities). -
#3878
98a7831- Avoid hidden class mutation in normalize() return objectThe normalize result object was constructed with
result: '' as anythen mutated viaret.result = visit(...), causing a V8 hidden class transition when the property type changed from string to the actual result type. Restructured to compute the result first and construct the final object in a single step.
-
-
Updated dependencies [
fd64b41]:- @data-client/core@0.16.7
@data-client/rest@0.17.0
📝 Read the full release announcement
Minor Changes
-
#3914
930c8ed- resource() accepts nonFilterArgumentKeysconst PostResource = resource({ path: '/:group/posts/:id', searchParams: {} as { orderBy?: string; author?: string }, schema: Post, nonFilterArgumentKeys: ['orderBy'], });
@data-client/react@0.16.7
📝 Read the full release announcement
Patch Changes
-
fd64b41- Include@data-client/normalizr@0.16.6performance improvements:-
#3875
467a5f6- Fix deepClone to only copy own propertiesdeepClonein the immutable store path now usesObject.keys()instead offor...in, preventing inherited properties from being copied into cloned state. -
#3877
e9e96f1- Replace megamorphic computed dispatch in getDependency with switchgetDependencyuseddelegate[array[index]](...spread)which creates a temporary array, a computed property lookup, and a spread call on every invocation — a megamorphic pattern that prevents V8 from inlining or type-specializing the call site. Replaced with aswitchonpath.lengthfor monomorphic dispatch. -
#3876
7d28629- Improve denormalization performance by pre-allocating the dependency tracking slotReplace
Array.prototype.unshift()inGlobalCache.getResults()with a pre-allocated slot at index 0, avoiding O(n) element shifting on every cache-miss denormalization. -
#3884
7df6a49- Move entity table POJO clone from getNewEntities to setEntityLazy-clone entity and meta tables on first write per entity type instead of eagerly in getNewEntities. This keeps getNewEntities as a pure Map operation, eliminating its V8 Maglev bailout ("Insufficient type feedback for generic named access" on
this.entities). -
#3878
98a7831- Avoid hidden class mutation in normalize() return objectThe normalize result object was constructed with
result: '' as anythen mutated viaret.result = visit(...), causing a V8 hidden class transition when the property type changed from string to the actual result type. Restructured to compute the result first and construct the final object in a single step.
-
-
Updated dependencies [
fd64b41]:- @data-client/core@0.16.7
@data-client/core@0.16.7
📝 Read the full release announcement
Patch Changes
fd64b41- Include@data-client/normalizr@0.16.6performance improvements:-
#3875
467a5f6- Fix deepClone to only copy own propertiesdeepClonein the immutable store path now usesObject.keys()instead offor...in, preventing inherited properties from being copied into cloned state. -
#3877
e9e96f1- Replace megamorphic computed dispatch in getDependency with switchgetDependencyuseddelegate[array[index]](...spread)which creates a temporary array, a computed property lookup, and a spread call on every invocation — a megamorphic pattern that prevents V8 from inlining or type-specializing the call site. Replaced with aswitchonpath.lengthfor monomorphic dispatch. -
#3876
7d28629- Improve denormalization performance by pre-allocating the dependency tracking slotReplace
Array.prototype.unshift()inGlobalCache.getResults()with a pre-allocated slot at index 0, avoiding O(n) element shifting on every cache-miss denormalization. -
#3884
7df6a49- Move entity table POJO clone from getNewEntities to setEntityLazy-clone entity and meta tables on first write per entity type instead of eagerly in getNewEntities. This keeps getNewEntities as a pure Map operation, eliminating its V8 Maglev bailout ("Insufficient type feedback for generic named access" on
this.entities). -
#3878
98a7831- Avoid hidden class mutation in normalize() return objectThe normalize result object was constructed with
result: '' as anythen mutated viaret.result = visit(...), causing a V8 hidden class transition when the property type changed from string to the actual result type. Restructured to compute the result first and construct the final object in a single step.
-
@data-client/rest@0.16.6
📝 Read the full release announcement
Patch Changes
-
#3868
8a7c8d9- Addcontentproperty to RestEndpoint for typed response parsingSet
contentto control how the response body is parsed, with automatic return type inference:const downloadFile = new RestEndpoint({ path: '/files/:id/download', content: 'blob', dataExpiryLength: 0, }); const blob: Blob = await ctrl.fetch(downloadFile, { id: '123' });
Accepted values:
'json','blob','text','arrayBuffer','stream'.Non-JSON content types (
'blob','text','arrayBuffer','stream') constrainschemato
undefinedat the type level, with a runtime check that throws if a normalizable schema is set.When
contentis not set, auto-detection now handles binary Content-Types (image/*,
application/octet-stream,application/pdf, etc.) by returningresponse.blob()instead of
corrupting data via.text(). -
#3904
8af3d5e- ExportCollectionOptionsfrom the public@data-client/endpointand@data-client/restentrypoints. -
#3910
81c63a0- Fix Collection extender body types to match their HTTP method semanticsPATCH extenders (
.move,.remove) now type their body asPartial, matching
partialUpdate. Previously they
required the full body type even though they are PATCH endpoints.Standalone
RestEndpointwithout an explicitbodyoption now derives a typed
body from the Collection's entity schema instead of falling back toany.const MyResource = resource({ path: '/articles/:id', schema: Article, body: {} as { title: string; content: string }, }); // move (PATCH) now accepts partial body MyResource.getList.move({ id: '1' }, { title: 'new title' }); // push (POST) still requires full body MyResource.getList.push({ title: 'hi', content: 'there' });
-
Updated dependencies [
8af3d5e]:- @data-client/endpoint@0.16.6
@data-client/normalizr@0.16.6
📝 Read the full release announcement
Patch Changes
-
#3875
467a5f6- Fix deepClone to only copy own propertiesdeepClonein the immutable store path now usesObject.keys()instead offor...in, preventing inherited properties from being copied into cloned state. -
#3877
e9e96f1- Replace megamorphic computed dispatch in getDependency with switchgetDependencyuseddelegate[array[index]](...spread)which creates a temporary array, a computed property lookup, and a spread call on every invocation — a megamorphic pattern that prevents V8 from inlining or type-specializing the call site. Replaced with aswitchonpath.lengthfor monomorphic dispatch. -
#3876
7d28629- Improve denormalization performance by pre-allocating the dependency tracking slotReplace
Array.prototype.unshift()inGlobalCache.getResults()with a pre-allocated slot at index 0, avoiding O(n) element shifting on every cache-miss denormalization. -
#3884
7df6a49- Move entity table POJO clone from getNewEntities to setEntityLazy-clone entity and meta tables on first write per entity type instead of eagerly in getNewEntities. This keeps getNewEntities as a pure Map operation, eliminating its V8 Maglev bailout ("Insufficient type feedback for generic named access" on
this.entities). -
#3878
98a7831- Avoid hidden class mutation in normalize() return objectThe normalize result object was constructed with
result: '' as anythen mutated viaret.result = visit(...), causing a V8 hidden class transition when the property type changed from string to the actual result type. Restructured to compute the result first and construct the final object in a single step.
@data-client/endpoint@0.16.6
@data-client/rest@0.16.5
📝 Read the full release announcement
Patch Changes
-
#3866
16f5d92- Bundlepath-to-regexpas tree-shaken ESMBundle only the functions we use (
compile,parse,pathToRegexp) from
path-to-regexpinto the ESM/browser build via rollup. This eliminates
the CJS/ESM boundary that broke StackBlitz WebContainers and reduces bundle
size by tree-shaking unused exports (match,stringify, and theIDregex).
@data-client/rest@0.16.4
📝 Read the full release announcement
Patch Changes
-
#3862
a214720- Fix StackBlitz WebContainers compatibility with path-to-regexpUse namespace import (
import *) instead of named imports for the CJS
path-to-regexpdependency. Named imports trigger webpack's per-export
presence validation, which fails in StackBlitz's WebContainers environment.
Namespace imports defer property access to runtime, bypassing the check
with no tree-shaking loss.
@data-client/rest@0.16.3
📝 Read the full release announcement
Patch Changes
-
#3858
c83a81d- FixmaxEntityDepthmissing from Entity types on TypeScript 4.0maxEntityDepthwas not included in the TS 4.0 legacy type definitions,
so TypeScript 4.0 users could not set or reference this property on Entity classes. -
#3860
886f2cf- Fix compatibility with StackBlitz WebContainersConsolidate
path-to-regexpimports into a single module to avoid
CJS/ESM interop failures in StackBlitz's WebContainers environment,
where webpack could not resolve thepathToRegexpnamed export from
the CJSpath-to-regexppackage.Also caches
pathToRegexp()results, improving repeatedtestKey()performance. -
Updated dependencies [
c83a81d]:- @data-client/endpoint@0.16.3