| Name | Modified | Size | Downloads / 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-errorsversions:^2.0.1; - Supported
zodversions:^4.1.13: - This Zod patch contains an important fix that makes the
globalRegistrytruly global across both CJS and ESM bundles of the Zod distribution; - The issue was found and reported by @shadone;
DependsOnMethodremoved:- 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
optionsproperty has been renamed toctxin the argument of: Middleware::handler(),ResultHandler::handler(),- The
handlerof theEndpointsFactory::build()argument, testMiddleware();EndpointsFactory::addOptions()renamed toaddContext();- The
Integration::constructor()argument object now requires aconfigproperty, similar toDocumentation.
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