Skip to content

Releases: RobinTail/express-zod-api

v21.1.0

20 Nov 21:22
cae198d
Compare
Choose a tag to compare

Feature

Full Changelog: v21.0.0...v21.1.0

v21.0.0

20 Nov 10:15
d8e2ca1
Compare
Choose a tag to compare

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 to http and made optional — (can now configure HTTPS only);
    • These properties moved to the top level: jsonParser, upload, compression, rawParser and beforeRouting;
    • Both logger and getChildLogger arguments of beforeRouting function are replaced with all-purpose getLogger.
  • For createServer() resolved return:
    • Both httpServer and httpsServer are combined into single servers property (array, same order).
  • For EndpointsFactory::build() argument:
    • Plural methods, tags and scopes properties replaced with singular method, tag, scope accordingly;
    • The method property also made optional and can now be derived from DependsOnMethod or imply GET by default;
    • When method is assigned with an array, it must be non-empty.
  • For positive and negative properties of ResultHandler constructor argument:
    • Plural statusCodes and mimeTypes props within the values are replaced with singular statusCode and mimeType.
  • The serializer property of Documentation and Integration constructor argument removed;
  • The originalError property of InputValidationError and OutputValidationError removed (use cause instead);
  • The getStatusCodeFromError() method removed (use the ensureHttpError().statusCode instead);
  • The testEndpoint() method can no longer test CORS headers — that function moved to Routing traverse;
  • For Endpoint: getMethods() may return undefined, getMimeTypes() removed, getSchema() variants reduced;
  • Public properties pairs, firstEndpoint and siblingMethods of DependsOnMethod replaced with entries.

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

20 Nov 08:50
Compare
Choose a tag to compare

Fixes

Chores

Full Changelog: v20.22.0...v20.22.1

v20.22.0

18 Nov 18:48
Compare
Choose a tag to compare

Feature

Chores

Full Changelog: v20.21.2...v20.22.0

v20.21.2

16 Nov 21:05
Compare
Choose a tag to compare

Fix

Chores

Full Changelog: v20.21.1...v20.21.2

v20.21.1

15 Nov 16:23
Compare
Choose a tag to compare

Fix

Chores

Full Changelog: v20.21.0...v20.21.1

v20.21.0

11 Nov 18:24
a29e4f3
Compare
Choose a tag to compare

Feature

Fix

Chores

Full Changelog: v20.20.1...v20.21.0

v20.20.1

09 Nov 10:06
Compare
Choose a tag to compare

Changes

New Contributors

Full Changelog: v20.20.0...v20.20.1

v20.20.0

07 Nov 06:49
Compare
Choose a tag to compare

Feature

Chores

Full Changelog: v20.19.0...v20.20.0

v20.19.0

05 Nov 20:41
Compare
Choose a tag to compare

Feature

Full Changelog: v20.18.0...v20.19.0