Releases: RobinTail/express-zod-api
v21.3.0
Deprecation
- Always split response type by @RobinTail in #2225
Fix
- Client usage example by @RobinTail in #2224
Chores
Full Changelog: v21.2.0...v21.3.0
v21.2.0
Feature
- Client: handling excessive routes by @RobinTail in #2200
Performance fix
- Replacing
chain()
with.map()
by @RobinTail in #2208 - Replacing
.flatMap()
withchain()
by @RobinTail in #2209
Chores
- OpenAPI validation custom workflow by @RobinTail in #2202 and #2207
- Organizing ESLint rules by @RobinTail in #2215
- Upgrading all dependencies. by @RobinTail in #2223
- dependabot in #2201, #2205, #2210, #2211, #2212, #2213, #2217, #2216, #2220, #2221
Full Changelog: v21.1.0...v21.2.0
v21.1.0
v21.0.0
Version 21 is for Kesaria
This version aims to improve the security and the overall development experience. In particular, the requirements for the Express version are increased, and you can now run the secure server exclusively. Alternative plural properties are replaced with universal singular ones supporting arrays. Specifying the method when creating an endpoint is now optional, which also makes it easier to assign endpoints on a same route for different methods. Memory consumption reduced for Routing traverse. Previously deprecated methods and properties have been removed, several public interfaces changed in order to enable features coming up later.
Breaking changes (and features)
- Minimum supported versions of
express
: 4.21.1 and 5.0.1 (fixed vulnerabilities); - For
createConfig()
argument:- The
server
property renamed tohttp
and made optional — (can now configure HTTPS only); - These properties moved to the top level:
jsonParser
,upload
,compression
,rawParser
andbeforeRouting
; - Both
logger
andgetChildLogger
arguments ofbeforeRouting
function are replaced with all-purposegetLogger
.
- The
- For
createServer()
resolved return:- Both
httpServer
andhttpsServer
are combined into singleservers
property (array, same order).
- Both
- For
EndpointsFactory::build()
argument:- Plural
methods
,tags
andscopes
properties replaced with singularmethod
,tag
,scope
accordingly; - The
method
property also made optional and can now be derived fromDependsOnMethod
or implyGET
by default; - When
method
is assigned with an array, it must be non-empty.
- Plural
- For
positive
andnegative
properties ofResultHandler
constructor argument:- Plural
statusCodes
andmimeTypes
props within the values are replaced with singularstatusCode
andmimeType
.
- Plural
- The
serializer
property ofDocumentation
andIntegration
constructor argument removed; - The
originalError
property ofInputValidationError
andOutputValidationError
removed (usecause
instead); - The
getStatusCodeFromError()
method removed (use theensureHttpError().statusCode
instead); - The
testEndpoint()
method can no longer test CORS headers — that function moved toRouting
traverse; - For
Endpoint
:getMethods()
may returnundefined
,getMimeTypes()
removed,getSchema()
variants reduced; - Public properties
pairs
,firstEndpoint
andsiblingMethods
ofDependsOnMethod
replaced withentries
.
Migration
- Check out sample in Changelog
- Consider the automated migration using the built-in ESLint rule:
// eslint.config.mjs — minimal ESLint 9 config to apply migrations automatically using "eslint --fix"
import parser from "@typescript-eslint/parser";
import migration from "express-zod-api/migration";
export default [
{ languageOptions: { parser }, plugins: { migration } },
{ files: ["**/*.ts"], rules: { "migration/v21": "error" } },
];
Full Changelog: v20.22.1...v21.0.0
v20.22.1
Fixes
- Avoid logo distortion by @RobinTail in #2198
- Self-diagnosis disabled on production by @RobinTail in #2199
Chores
- Vitest snapshot serializers instead of traversing schema in tests by @RobinTail in #2195
- Upgrading all dependencies. by @RobinTail in #2197
Full Changelog: v20.22.0...v20.22.1
v20.22.0
Feature
- Nested routes helper by @RobinTail in #2188
Chores
- Upgrading all dependencies by @RobinTail in #2184
- dependabot in #2186, #2189 and #2190
Full Changelog: v20.21.2...v20.22.0
v20.21.2
Fix
- Client: JSON parser in case of path params by @RobinTail in #2179
Chores
- Upgrading all dependencies. by @RobinTail in #2173
Full Changelog: v20.21.1...v20.21.2
v20.21.1
Fix
- Revert:
throw
instead ofassert
by @RobinTail in #2169
Chores
- Minor: ESLint config syntax by @RobinTail in #2165
- Upgrading
vitest
to 2.1.5 by @RobinTail in #2166 - @dependabot in #2170
Full Changelog: v20.21.0...v20.21.1
v20.21.0
Feature
- Making
input
schema optional by @RobinTail in #2129
Fix
- Performance tuning for
getInput()
by @RobinTail in #2160
Chores
- Dev: Adjusting package commands by @RobinTail in #2161
- dependabot in #2163 and 2164
Full Changelog: v20.20.1...v20.21.0
v20.20.1
Changes
- Style: Single statement blocks and empty returns by @RobinTail in #2156
- library → framework by @RobinTail in #2157
- Readme: fix small
handler
typo by @JonParton in #2158 - Upgrading all dependencies by @RobinTail in #2159
New Contributors
- @JonParton made their first contribution in #2158
Full Changelog: v20.20.0...v20.20.1