Releases: RobinTail/express-zod-api
v22.3.0
Feature
Subscription
class for SSE by @RobinTail in #2280
Chore
- Fix constraints on id of
rest
const by @RobinTail in #2346
Full Changelog: v22.2.0...v22.3.0
v22.2.0
Feature
- Detecting headers from
Middleware::security
declaration by @RobinTail in #2344
Chores
- Fix tags shadow const in Documentation by @RobinTail in #2342
- dependabot in #2343
Full Changelog: v22.1.1...v22.2.0
v22.1.1
Fixes
- Dataflow diagram @RobinTail in #2341
LogicalContainer
handling by @RobinTail in #2332
Full Changelog: v22.1.0...v22.1.1
v22.1.0
Features
- Configurable client class name by @RobinTail in #2336
- Client default implementation by @RobinTail in #2304
Chores
- dependabot in #2340
Full Changelog: v22.0.0...v22.1.0
v22.0.0
Version 22 is for Tai
This version of the framework sets its main task to clean the runtime code from obsolete methods and redundancies in order to make public interfaces easier to use. In particular, support for Node.js version 18 is discontinued (its lifespan ends in 3 months) in order to move to native localization methods. The approach to tagging endpoints is changed: restrictions are separated from the descriptive part: the first is implemented through module augmentation (similar to the logger type), and the second is moved to the Documentation. This architectural solution allows to not "drag" tags through the entire runtime code. Another important change is that all headers (not just x-prefixed ones) are now handled when this feature is enabled. The documentation generator detects both x-prefixed and well-known headers, and it is now possible to customize this.
Breaking changes and features
- Minimum supported Node versions: 20.9.0 and 22.0.0:
- Node 18 is no longer supported; its end of life is April 30, 2025.
BuiltinLogger::profile()
behavior changed for picoseconds: expressing them through nanoseconds;- Feature: handling all (not just
x-
prefixed) headers as an input source (when enabled):- Behavior changed for
headers
insideinputSources
config option: all headers are addressed to theinput
object; - This change is motivated by the deprecation of
x-
prefixed headers; - Since the order inside
inputSources
matters, consider movingheaders
to the first place to avoid overwrites; - The generated
Documentation
recognizes bothx-
prefixed inputs and well-known headers listed on IANA.ORG; - You can customize that behavior by using the new option
isHeader
of theDocumentation::constructor()
.
- Behavior changed for
- The
splitResponse
property on theIntegration::constructor()
argument is removed; - Changes to the client code generated by
Integration
:- The class name changed from
ExpressZodAPIClient
to justClient
; - The overload of the
Client::provide()
having 3 arguments and theProvider
type are removed; - The public
jsonEndpoints
const is removed — use thecontent-type
header of an actual response instead; - The public type
MethodPath
is removed — use theRequest
type instead.
- The class name changed from
- The approach to tagging endpoints changed:
- The
tags
property moved from the argument ofcreateConfig()
toDocumentation::constructor()
; - The overload of
EndpointsFactory::constructor()
acceptingconfig
property is removed; - The argument of
EventStreamFactory::constructor()
is now the events map (formerly assigned toevents
property); - Tags should be declared as the keys of the augmented interface
TagOverrides
instead;
- The
- The public method
Endpoint::getSecurity()
now returns an array;
Migration
- Check out samples 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/v22": "error" } },
];
Full Changelog: v21.9.0...v22.0.0
v21.11.1
Fixes
- Moving styles from
BuiltinLogger
instance by @RobinTail in #2321 - Integration: JSON namespace constraints by @RobinTail in #2300
Chores
- Declaring the package manager for Node
corepack
by @RobinTail in #2315 - Vitest 3 by @RobinTail and @dependabot in #2316
- Removing HTTP Errors comparator (Vitest 3) by @RobinTail in #2320
- Upgrading all dependencies. by @RobinTail in #2322
- dependabot in #2302, #2301, #2309, #2308, #2311, #2310, #2317, #2319
Full Changelog: v21.11.0...v21.11.1
v21.11.0
Feature
- Exposing the child logger context on
BuiltinLogger
by @RobinTail in #2295
Chores
- Create empty interfaces upon instantiation of
Integration
by @RobinTail in #2298 - dependabot in #2291, #2292, #2293 and #2296
Full Changelog: v21.10.0...v21.11.0
v21.10.0
Feat
- Integration: configurable
serverUrl
by @RobinTail in #2278
Chores
- moving eslint rules: extracting ts factory concerns. by @RobinTail in #2279
- Upgrading all dependencies. by @RobinTail in #2283 and #2286
- dependabot in #2282 and #2285
Full Changelog: v21.9.0...v21.10.0
v21.9.0
Deprecation
MethodPath
—>Request
by @RobinTail in #2275
Minor changes
- JSDoc for every type and interface of the generated
Integration
by @RobinTail in #2269
Patch level changes
- Ref: Extracting
responseVariants
once by @RobinTail in #2273 - ref(Integration): delegating props quotation to specific cases by @RobinTail in #2274
Chores
- Replacing
range()
withtimes()
forenumerateExamples()
by @RobinTail in #2263 - Addressing contributor username changes by @RobinTail in #2270
- Upgrading all dependencies. by @RobinTail in #2272 and #2268
- dependabot in #2261, #2277, #2265, #2271
Full Changelog: v21.8.0...v21.9.0
v21.8.0
Deprecation
jsonEndpoints
public const by @RobinTail in #2258
Chores
- Upgrading all dependencies. by @RobinTail in #2256
Full Changelog: v21.7.0...v21.8.0