Skip to content

Releases: RobinTail/express-zod-api

v27.1.1

17 Mar 05:40

Choose a tag to compare

Chores

Full Changelog: express-zod-api-v27.1.0...express-zod-api-v27.1.1

v27.1.0

08 Mar 18:38

Choose a tag to compare

Feature

  • ez.paginated() by @RobinTail in #3245
  • Well-known header: Incremental by @github-actions[bot] in #3244

Chores

Full Changelog: express-zod-api-v27.0.1...express-zod-api-v27.1.0

v27.0.1

03 Feb 08:25

Choose a tag to compare

Fix

  • Removed rolldown dts plugin comments from distribution by @RobinTail in #3199

Full Changelog: express-zod-api-v27.0.0...express-zod-api-v27.0.1

v27.0.0

01 Feb 08:31

Choose a tag to compare

v27 is for Nikki Kuhnhausen

Version 27 makes typescript an optional peer dependency with explicit injection of the manually imported module into the Integration class constructor (new Integration({ typescript, ... })), or by calling the new async Integration.create() factory method for automatic loading. The Zod Plugin now leverages Zod 4.3's inheritable metadata feature, removing the need for pack() and unpack() helpers while simplifying brand handling by storing brands in standard metadata under x-brand property.

  • Supported zod versions: ^4.3.4;
  • The new version of Zod Plugin utilizes the inheritable metadata feature of Zod 4.3;
  • The typescript dependency is now optional and only required for making Integration:
    • Either import and assign the typescript property to its constructor argument;
    • Or use the new static async method create() to delegate the import;
    • This change addresses the memory consumption issue fixed previously in v26.1.0, but with proper ESM handling;
  • Consider the automated migration.
  /** Option 1: import and assign */
  import { Integration } from "express-zod-api";
+ import typescript from "typescript";

  const client = new Integration({
    routing,
    config,
+   typescript,
  });
  /** Option 2: delegate asynchronously */
  import { Integration } from "express-zod-api";

- const client = new Integration({
+ const client = await Integration.create({
    routing,
    config,
  });

Full Changelog: express-zod-api-v26.3.2...express-zod-api-v27.0.0

v26.3.2

01 Feb 07:56

Choose a tag to compare

Patch

  • Improved readability of the types declaration in the bundle, by @RobinTail in #3188

Chores

Full Changelog: express-zod-api-v26.3.1...express-zod-api-v26.3.2

v26.3.1

12 Jan 07:20

Choose a tag to compare

Fix

Chores

Full Changelog: express-zod-api-v26.3.0...express-zod-api-v26.3.1

v26.3.0

01 Jan 15:23

Choose a tag to compare

Feature

  • Integration: support z.looseRecord() and z.exactOptional() by @RobinTail in #3157

Chores

Full Changelog: express-zod-api-v26.2.0...express-zod-api-v26.3.0

v26.2.0

29 Dec 16:12

Choose a tag to compare

Feature

Chores

Full Changelog: express-zod-api-v26.1.0...express-zod-api-v26.2.0

v26.1.0

26 Dec 09:16

Choose a tag to compare

Minor

Patch

Chores

Full Changelog: express-zod-api-v26.0.0...express-zod-api-v26.1.0

v26.0.0

01 Dec 06:35

Choose a tag to compare

v26 is for Lia Smith

Feature

  • The new version of the Zod plugin now also extends the CJS exports of Zod:
    • This fixes the "TypeError: example is not a function" in CJS and removes the requirement to use an ESM environment;
    • The issue was reported by @squishykid and addressed earlier in v25.5.3;

Breaking changes

  • Supported http-errors versions: ^2.0.1;
  • Supported zod versions: ^4.1.13:
    • This Zod patch contains an important fix that makes the globalRegistry truly global across both CJS and ESM bundles of the Zod distribution;
    • The issue was found and reported by @shadone;
  • DependsOnMethod removed:
    • You can now specify methods as direct keys of an assigned object in Routing;
    • That object can still contain nested paths as before;
    • Keys matching lowercase HTTP methods are treated according to the new config setting methodLikeRouteBehavior:
      • method — when assigned with an Endpoint, the key is treated as a method of its parent path (default);
      • path — the key is always treated as a nested path segment;
  • The options property has been renamed to ctx in the argument of:
    • Middleware::handler(),
    • ResultHandler::handler(),
    • The handler of the EndpointsFactory::build() argument,
    • testMiddleware();
  • EndpointsFactory::addOptions() renamed to addContext();
  • The Integration::constructor() argument object now requires a config property, similar to Documentation.

Migration

Consider the automated migration.

  const routing: Routing = {
-   "/v1/users": new DependsOnMethod({
+   "/v1/users": {
      get: getUserEndpoint,
-   }).nest({
      create: makeUserEndpoint
-   }),
+   },
  };

Full Changelog: express-zod-api-v25.6.1...express-zod-api-v26.0.0