Skip to content

Releases: RobinTail/express-zod-api

v22.3.0

28 Jan 21:40
Compare
Choose a tag to compare

Feature

Chore

Full Changelog: v22.2.0...v22.3.0

v22.2.0

26 Jan 08:12
Compare
Choose a tag to compare

Feature

  • Detecting headers from Middleware::security declaration by @RobinTail in #2344

Chores

Full Changelog: v22.1.1...v22.2.0

v22.1.1

25 Jan 19:45
Compare
Choose a tag to compare

Fixes

Full Changelog: v22.1.0...v22.1.1

v22.1.0

25 Jan 08:17
880f930
Compare
Choose a tag to compare

Features

Chores

Full Changelog: v22.0.0...v22.1.0

v22.0.0

24 Jan 21:09
fb25b7e
Compare
Choose a tag to compare

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 inside inputSources config option: all headers are addressed to the input object;
    • This change is motivated by the deprecation of x- prefixed headers;
    • Since the order inside inputSources matters, consider moving headers to the first place to avoid overwrites;
    • The generated Documentation recognizes both x- prefixed inputs and well-known headers listed on IANA.ORG;
    • You can customize that behavior by using the new option isHeader of the Documentation::constructor().
  • The splitResponse property on the Integration::constructor() argument is removed;
  • Changes to the client code generated by Integration:
    • The class name changed from ExpressZodAPIClient to just Client;
    • The overload of the Client::provide() having 3 arguments and the Provider type are removed;
    • The public jsonEndpoints const is removed — use the content-type header of an actual response instead;
    • The public type MethodPath is removed — use the Request type instead.
  • The approach to tagging endpoints changed:
    • The tags property moved from the argument of createConfig() to Documentation::constructor();
    • The overload of EndpointsFactory::constructor() accepting config property is removed;
    • The argument of EventStreamFactory::constructor() is now the events map (formerly assigned to events property);
    • Tags should be declared as the keys of the augmented interface TagOverrides instead;
  • 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

18 Jan 11:40
Compare
Choose a tag to compare

Fixes

Chores

Full Changelog: v21.11.0...v21.11.1

v21.11.0

11 Jan 14:31
Compare
Choose a tag to compare

Feature

  • Exposing the child logger context on BuiltinLogger by @RobinTail in #2295

Chores

Full Changelog: v21.10.0...v21.11.0

v21.10.0

06 Jan 20:47
Compare
Choose a tag to compare

Feat

Chores

Full Changelog: v21.9.0...v21.10.0

v21.9.0

31 Dec 20:26
Compare
Choose a tag to compare

Deprecation

Minor changes

  • JSDoc for every type and interface of the generated Integration by @RobinTail in #2269

Patch level changes

Chores

Full Changelog: v21.8.0...v21.9.0

v21.8.0

20 Dec 17:53
Compare
Choose a tag to compare

Deprecation

Chores

Full Changelog: v21.7.0...v21.8.0