Releases: adonisjs/http-transformers
Release 1.6.0
Breaking Changes
-
Paginator output structure: The paginator now enforces a standardized structure:
- Data is always placed under the
dataproperty (no longer configurable) - Metadata is now nested under the
metaproperty instead of being merged at the top level
- Data is always placed under the
-
Method renaming: Renamed
serialize()methods toresolve()onPaginator,Item, andCollectionclasses to better reflect their purpose. These methods build return values using transformers and resolve relationships rather than performing serialization (which happens during HTTP response transmission). -
Automatic JSON serialization: Transformer return values are now recursively JSON serialized. This means data types like
Dateobjects will be automatically converted to strings.
Features
-
Additional transformer parameters: You can now pass additional parameters to transformers for greater flexibility.
-
Type retention: Added support for retaining specific data types during type-level serialization via the
ExtendedJSONTypesinterface. For example, you can configure transformers to keepDateobjects asDateinstead of converting them to strings.
Improvements
-
Performance optimization: Significantly improved performance of recursive type resolution, reducing type instantiations from ~20,000 to ~1,700.
-
Build tooling: Migrated to
tsdownfor the build process.
Commits
- add support for passing additional data to transformers constructor e21761c
- cleanup types 7eef989
- cleanup types and JSON recursive serialization 55155c4
- omit base transformer methods when extracting variants b7b5124
- recursively resolve json types ad53980
- rename serialize methods on paginator, collection and item to resolve d4c8efe
Full Changelog: v1.5.0...v1.6.0
Filter out functions from pick and omit suggestions
1.5.0 (2025-09-29)
Features
- filter out functions from pick and omit methods (6866a62)
Full Changelog: v1.4.0...v1.5.0
Add type to infer all Variants of a transformer
1.4.0 (2025-09-19)
Features
- add type for inferring all variants of a transformer (a9e336f)
Full Changelog: v1.3.0...v1.4.0
Allow passing non-serializable values to the serialize method
1.3.0 (2025-09-18)
Features
- allow passing non object values to serialize method (97761ac)
- parallelize promises resolution (c3e33ff)
Full Changelog: v1.2.0...v1.3.0
Add paginator, serializer and revamp API for creating relationships
First working version
1.1.0 (2025-09-05)
Features
- extract transform function type to TransformFn (293a284)
- initial working version (79d152d)
- setup typedoc (f5e412c)
Full Changelog: https://github.com/adonisjs/http-transformers/commits/v1.1.0