Download Latest Version v26.0.0 source code.tar.gz (373.2 kB)
Email in envelope

Get an email when there's a new version of Express Zod API

Home / express-zod-api-v26.0.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2025-12-01 2.1 kB
v26.0.0 source code.tar.gz 2025-12-01 373.2 kB
v26.0.0 source code.zip 2025-12-01 458.7 kB
Totals: 3 Items   834.1 kB 0

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.

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

Full Changelog: https://github.com/RobinTail/express-zod-api/compare/express-zod-api-v25.6.1...express-zod-api-v26.0.0

Source: README.md, updated 2025-12-01