Skip to content

Releases: adonisjs/http-transformers

Release 1.6.0

01 Dec 12:16

Choose a tag to compare

Breaking Changes

  • Paginator output structure: The paginator now enforces a standardized structure:

    • Data is always placed under the data property (no longer configurable)
    • Metadata is now nested under the meta property instead of being merged at the top level
  • Method renaming: Renamed serialize() methods to resolve() on Paginator, Item, and Collection classes 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 Date objects 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 ExtendedJSONTypes interface. For example, you can configure transformers to keep Date objects as Date instead 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 tsdown for 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

29 Sep 11:07

Choose a tag to compare

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

19 Sep 09:09

Choose a tag to compare

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

18 Sep 05:53

Choose a tag to compare

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

15 Sep 12:20

Choose a tag to compare

1.2.0 (2025-09-15)

Bug Fixes

  • Item.transform method return type to not return unknown (3fa2e9b)

Features

  • add paginator, serlaize helper and revamp API (da9ffa4)
  • rename transform method to serialize (1299039)
  • setup typedoc (4528263)

Full Changelog: v1.1.0...v1.2.0

First working version

05 Sep 11:11

Choose a tag to compare

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