Your AdonisJS ecosystem, in the loop.
All insights
release

HTTP Transformers v2.3.2: Up to 5x Faster Serialization for Nested Resources

· Developer impact : medium

The AdonisJS HTTP Transformers package version 2.3.2 significantly improves serialization performance, especially for nested relations. Nested serialization is approximately 5 times faster by avoiding expensive stack trace captures unless the value is undefined. Flat list serialization is about 20% faster by skipping unnecessary async awaits. The serialized output remains unchanged, and the debuggingError argument in Item and Collection constructors is now optional, improving error handling consistency.

What this means for your code

Developers using HTTP Transformers will experience much faster serialization times, particularly when dealing with nested relations or paginated responses. Existing code remains compatible as the debuggingError argument is now optional and existing calls continue to work. The change in microtask timing for leaf transformers' .then() callbacks is a minor side effect unlikely to affect most applications.

  • Upgrade @adonisjs/http-transformers to v2.3.2 to benefit from performance improvements.
  • Review any custom transformers if relying on debuggingError argument behavior, though no breaking changes are expected.
  • Test serialization performance in your application to observe improvements and ensure no unexpected side effects.

Original sources

AI-generated analysis based on the linked sources. Check the original documentation before changing your application.

Independent ecosystem watch. Sources linked in every insight.Built with AdonisJS · AI-assisted summariesBy Jérémy Chaufourier · chaufourier.fr