Skip to content

Releases: reactive/data-client

@data-client/vue@0.16.1

16 Apr 02:18
4f5b6b6

Choose a tag to compare

📝 Read the full release announcement


Patch Changes

  • fd64b41 - Include @data-client/normalizr@0.16.6 performance improvements:

    • #3875 467a5f6 - Fix deepClone to only copy own properties

      deepClone in the immutable store path now uses Object.keys() instead of for...in, preventing inherited properties from being copied into cloned state.

    • #3877 e9e96f1 - Replace megamorphic computed dispatch in getDependency with switch

      getDependency used delegate[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 a switch on path.length for monomorphic dispatch.

    • #3876 7d28629 - Improve denormalization performance by pre-allocating the dependency tracking slot

      Replace Array.prototype.unshift() in GlobalCache.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 setEntity

      Lazy-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 object

      The normalize result object was constructed with result: '' as any then mutated via ret.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

16 Apr 11:20
a196c0f

Choose a tag to compare

📝 Read the full release announcement


Minor Changes

  • #3914 930c8ed - resource() accepts nonFilterArgumentKeys

    const PostResource = resource({
      path: '/:group/posts/:id',
      searchParams: {} as { orderBy?: string; author?: string },
      schema: Post,
      nonFilterArgumentKeys: ['orderBy'],
    });

@data-client/react@0.16.7

16 Apr 02:18
4f5b6b6

Choose a tag to compare

📝 Read the full release announcement


Patch Changes

  • fd64b41 - Include @data-client/normalizr@0.16.6 performance improvements:

    • #3875 467a5f6 - Fix deepClone to only copy own properties

      deepClone in the immutable store path now uses Object.keys() instead of for...in, preventing inherited properties from being copied into cloned state.

    • #3877 e9e96f1 - Replace megamorphic computed dispatch in getDependency with switch

      getDependency used delegate[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 a switch on path.length for monomorphic dispatch.

    • #3876 7d28629 - Improve denormalization performance by pre-allocating the dependency tracking slot

      Replace Array.prototype.unshift() in GlobalCache.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 setEntity

      Lazy-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 object

      The normalize result object was constructed with result: '' as any then mutated via ret.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

16 Apr 02:18
4f5b6b6

Choose a tag to compare

📝 Read the full release announcement


Patch Changes

  • fd64b41 - Include @data-client/normalizr@0.16.6 performance improvements:
    • #3875 467a5f6 - Fix deepClone to only copy own properties

      deepClone in the immutable store path now uses Object.keys() instead of for...in, preventing inherited properties from being copied into cloned state.

    • #3877 e9e96f1 - Replace megamorphic computed dispatch in getDependency with switch

      getDependency used delegate[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 a switch on path.length for monomorphic dispatch.

    • #3876 7d28629 - Improve denormalization performance by pre-allocating the dependency tracking slot

      Replace Array.prototype.unshift() in GlobalCache.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 setEntity

      Lazy-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 object

      The normalize result object was constructed with result: '' as any then mutated via ret.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

15 Apr 13:53
7f5611a

Choose a tag to compare

📝 Read the full release announcement


Patch Changes

  • #3868 8a7c8d9 - Add content property to RestEndpoint for typed response parsing

    Set content to 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') constrain schema to
    undefined at the type level, with a runtime check that throws if a normalizable schema is set.

    When content is not set, auto-detection now handles binary Content-Types (image/*,
    application/octet-stream, application/pdf, etc.) by returning response.blob() instead of
    corrupting data via .text().

  • #3904 8af3d5e - Export CollectionOptions from the public @data-client/endpoint and @data-client/rest entrypoints.

  • #3910 81c63a0 - Fix Collection extender body types to match their HTTP method semantics

    PATCH extenders (.move, .remove) now type their body as Partial, matching
    partialUpdate. Previously they
    required the full body type even though they are PATCH endpoints.

    Standalone RestEndpoint without an explicit body option now derives a typed
    body from the Collection's entity schema instead of falling back to any.

    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

15 Apr 13:53
7f5611a

Choose a tag to compare

📝 Read the full release announcement


Patch Changes

  • #3875 467a5f6 - Fix deepClone to only copy own properties

    deepClone in the immutable store path now uses Object.keys() instead of for...in, preventing inherited properties from being copied into cloned state.

  • #3877 e9e96f1 - Replace megamorphic computed dispatch in getDependency with switch

    getDependency used delegate[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 a switch on path.length for monomorphic dispatch.

  • #3876 7d28629 - Improve denormalization performance by pre-allocating the dependency tracking slot

    Replace Array.prototype.unshift() in GlobalCache.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 setEntity

    Lazy-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 object

    The normalize result object was constructed with result: '' as any then mutated via ret.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

15 Apr 13:53
7f5611a

Choose a tag to compare

📝 Read the full release announcement


Patch Changes

  • #3904 8af3d5e - Export CollectionOptions from the public @data-client/endpoint and @data-client/rest entrypoints.

@data-client/rest@0.16.5

05 Apr 16:43
be8f8d0

Choose a tag to compare

📝 Read the full release announcement


Patch Changes

  • #3866 16f5d92 - Bundle path-to-regexp as tree-shaken ESM

    Bundle only the functions we use (compile, parse, pathToRegexp) from
    path-to-regexp into 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 the ID regex).

@data-client/rest@0.16.4

03 Apr 22:01
aa54c4c

Choose a tag to compare

📝 Read the full release announcement


Patch Changes

  • #3862 a214720 - Fix StackBlitz WebContainers compatibility with path-to-regexp

    Use namespace import (import *) instead of named imports for the CJS
    path-to-regexp dependency. 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

03 Apr 20:03
53c7091

Choose a tag to compare

📝 Read the full release announcement


Patch Changes

  • #3858 c83a81d - Fix maxEntityDepth missing from Entity types on TypeScript 4.0

    maxEntityDepth was 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 WebContainers

    Consolidate path-to-regexp imports into a single module to avoid
    CJS/ESM interop failures in StackBlitz's WebContainers environment,
    where webpack could not resolve the pathToRegexp named export from
    the CJS path-to-regexp package.

    Also caches pathToRegexp() results, improving repeated testKey() performance.

  • Updated dependencies [c83a81d]:

    • @data-client/endpoint@0.16.3