Skip to content

Releases: RobinTail/express-zod-api

v20.3.0

04 Jul 15:31
b80968b
Compare
Choose a tag to compare

Feature

  • Feat: remap() accepts a shape transforming function by @RobinTail in #1887

Fix

Full Changelog: v20.2.0...v20.3.0

v20.2.0

03 Jul 12:27
3da4092
Compare
Choose a tag to compare

Feature

  • Partial mapping and passthrough support for .remap() by @RobinTail in #1878

Fix (documentation)

Chores

Full Changelog: v20.1.0...v20.2.0

v20.1.0

03 Jul 08:40
70f7320
Compare
Choose a tag to compare

Feature

Chores

Full Changelog: v20.0.1...v20.1.0

v20.0.1

28 Jun 12:38
3c72054
Compare
Choose a tag to compare

What's Changed

Full Changelog: v20.0.0...v20.0.1

v20.0.0

28 Jun 11:15
a4f72ab
Compare
Choose a tag to compare

Version 20 is for Zoey

This version focuses on improving typing, consistency of methods and approaches, and simplifying the testing approach. A number of creator functions have been replaced with classes. Creating ResultHandlers and Middlewares has become more flexible. To eliminate frequent confusion, a new approach to endpoint testing has been applied: request and response mocking is completely detached from testing frameworks and works out of the box without any tricks. For the first time, an automatic migration is offered as an ESLint plugin, which itself adapts your code to this version.

Breaking changes (and features)

  • Method createLogger() removed — use new BuiltinLogger() instead if needed;
  • Method createResultHandler removed — use new ResultHandler() instead:
    • The argument's properties renamed: getPositiveResponse to positive and getNegativeResponse to negative;
    • Both properties can now accept static values (not only functions).
  • Method createMiddleware() removed — use either new Middleware() or EndpointsFactory::addMiddleware() instead:
    • The argument's property middleware renamed to handler.
  • Method testEndpoint() was changed:
    • It was detached from any testing frameworks, fnMethod property removed from the argument;
    • Mocked request and response are now fully operational and do not require to mock anything to do the job;
    • The responseProps property changed to responseOptions, it's no longer meant to be used for custom props;
    • The returned entities requestMock, responseMock and loggerMock no longer rely on testing framework for props.
      Instead, they provide methods to assert expectations in tests:

Migration

  • See the migration guide in Changelog;
  • Consider using the provided ESLint plugin migration in order to apply changes automatically (except assertions).
// eslint.config.mjs — minimal config to apply migrations automatically using "eslint . --fix" (at least ESLint 8)
import parser from "@typescript-eslint/parser";
import migration from "express-zod-api/migration";

export default [{ languageOptions: { parser }, files: ["**/*.ts"] }, migration];

v19.2.3

25 Jun 19:21
Compare
Choose a tag to compare

What's Changed

Chores

Full Changelog: v19.2.2...v19.2.3

v19.2.2

06 Jun 13:10
Compare
Choose a tag to compare

Fixes

Chores

Full Changelog: v19.2.1...v19.2.2

v19.2.1

23 May 21:33
Compare
Choose a tag to compare

What's Changed

  • Upgrading openapi3-ts to 4.3.2 (fixed distribution) by @RobinTail in #1784

Full Changelog: v19.2.0...v19.2.1

v19.2.0

23 May 20:47
Compare
Choose a tag to compare

Features

Chores

Full Changelog: v19.1.2...v19.2.0

v18.6.3

18 May 08:53
Compare
Choose a tag to compare

Fixes

Chores

Full Changelog: v18.6.2...v18.6.3