Releases: RobinTail/express-zod-api
v20.3.1
Fix
- Removing ESLint and Prettier from optional peers by @RobinTail in #1890
Chores
- Switching to Vitest 2.0 by @RobinTail in #1888
- Set
vitest
pool
back tothreads
by @RobinTail in #1889 - Bump typescript-eslint from 8.0.0-alpha.38 to 8.0.0-alpha.39 in the typescript-eslint group by @dependabot in #1879
Full Changelog: v20.3.0...v20.3.1
v20.3.0
Feature
- Feat:
remap()
accepts a shape transforming function by @RobinTail in #1887
Fix
- Proxy
UnknownKeys
parameter inremap()
by @RobinTail in #1886
Full Changelog: v20.2.0...v20.3.0
v20.2.0
Feature
- Partial mapping and passthrough support for
.remap()
by @RobinTail in #1878
Fix (documentation)
- Recommend shallow top level transformations by @RobinTail in #1884
Chores
- Bump tsx from 4.16.0 to 4.16.2 by @dependabot in #1880
- Bump globals from 15.7.0 to 15.8.0 by @dependabot in #1882
- Bump typescript from 5.5.2 to 5.5.3 by @dependabot in #1883
Full Changelog: v20.1.0...v20.2.0
v20.1.0
Feature
- Top level transformations and remapping by @RobinTail in #1869
Chores
- Interface correction by @RobinTail in #1866
- Upgrading
typescript-eslint
to v8 alpha 36. by @RobinTail in #1868 - Bump tsx from 4.15.7 to 4.16.0 by @dependabot in #1873
- Bump globals from 15.6.0 to 15.7.0 by @dependabot in #1872
- Upgrading
typescript-eslint
to v8 alpha 38 by @RobinTail in #1874 - Ungroup
@eslint/js
by @RobinTail in #1867 - Bump eslint from 9.5.0 to 9.6.0 by @dependabot in #1875
- Upgrading
eslint-plugin-import-x
to 0.5.3 by @RobinTail in #1877
Full Changelog: v20.0.1...v20.1.0
v20.0.1
What's Changed
- Ref: Use
_getJSONData()
method by @RobinTail in #1865
Full Changelog: v20.0.0...v20.0.1
v20.0.0
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 — usenew BuiltinLogger()
instead if needed; - Method
createResultHandler
removed — usenew ResultHandler()
instead:- The argument's properties renamed:
getPositiveResponse
topositive
andgetNegativeResponse
tonegative
; - Both properties can now accept static values (not only functions).
- The argument's properties renamed:
- Method
createMiddleware()
removed — use eithernew Middleware()
orEndpointsFactory::addMiddleware()
instead:- The argument's property
middleware
renamed tohandler
.
- The argument's property
- 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 toresponseOptions
, it's no longer meant to be used for custom props; - The returned entities
requestMock
,responseMock
andloggerMock
no longer rely on testing framework for props.
Instead, they provide methods to assert expectations in tests:responseMock._getStatusCode()
,responseMock._getHeaders()
,responseMock._getData()
,loggerMock._getLogs()
;- See the documentation of node-mocks-http library for details.
- It was detached from any testing frameworks,
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
What's Changed
- Ref: optimizations using Typescript 5.5 by @RobinTail in #1832
Chores
- Fix
no-extraneous-dependencies
rule operation by @RobinTail in #1857 - Upgrading all dependencies. by @RobinTail in #1838
- Dependabot #1823, #1824, #1825, #1826, #1822, #1827, #1828, #1830, #1829, #1831, #1837, #1835, #1836, #1834, #1839, #1840, #1841, #1842, #1846, #1845, #1844, #1843, #1848, #1850, #1852, #1853, #1855, #1856, #1851
Full Changelog: v19.2.2...v19.2.3
v19.2.2
Fixes
- Fix missing defaults for BuiltinLogger by @RobinTail in #1821
- Improving types for a couple depicters and producers by @RobinTail in #1820
Chores
- Lint: Addressing
any
in tests by @RobinTail in #1785 - Dependabot: new group to track after switching to ESLint 9 by @RobinTail in #1791
- Minor: renaming depictRequest to depictBody. by @RobinTail in #1794
- Add
eslint
group to dependabot rules by @RobinTail in #1812 - Dependencies by @dependabot #1790, #1795, #1798, #1807, #1809, #1810, #1813, #1806, #1818, #1817, #1816, #1815, #1814
- Upgrading all dependencies. by @RobinTail in #1819
Full Changelog: v19.2.1...v19.2.2
v19.2.1
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
Features
- Built-in logger class with
.child()
method by @RobinTail in #1778
Chores
- Bump tsx #1775, #1777, #1781
- Bump the typescript-eslint #1779
- Upgrading all dependencies #1776, #1782
- ESLint 9 from the scratch by @RobinTail in #1767
Full Changelog: v19.1.2...v19.2.0