Adonis Bumblebee Versions Save

Api Transformer for AdonisJs Framework

2.2.0

4 years ago

Added

  • Serializers now have access to the nesting level of included resources.
  • Added a SLDataSerializer that only adds the data keyword on the first level, #72

2.1.0

4 years ago

Added

  • it is now possible to define include properties in snake_case, #67

Updated

  • Many dev-dependencies were updated

2.0.0

5 years ago

The developer experience release!

With this release, we improved the integration of Bumblebee into your application by allowing you to pass the Transformer by name, while also improving performance by changing the defaultInclude & availableInclude methods to static getters. For a complete list of all changes, see the changelog below.

An absolutely huge thank goes to @RomainLanz, who suggested and implemented many of the features we have in this release. Great work man! :clap:

Breaking Changes

  • The toArray() was renamed to toJSON() to be consistent with the rest of the framework. If you use the toArray() method, you should rename this it to toJSON(). The signature and returned value remain the same. [#29]

  • Changed defaultInclude & availableInclude methods to static getter for better performance. [#29]

    // before
    class BookTransformer extends TransformerAbstract {
      defaultInclude () {
        return ['author']
      }
    }
    
    // after
    class BookTransformer extends TransformerAbstract {
      static get defaultInclude () {
        return ['author']
      }
    }
    

Added

  • Transformers can now be automatically resolved when passed by name. [#33]
  • Multiple transform methods can be defined and used with the new Transformer Variants feature. [#32]
  • The Adonis/Addons/Bumblebee/TransformerAbstract class now has an optional shorter alias to Bumblebee/Transformer. [#29]

Deprecated

  • The toArray() method was marked as deprecated. [#29]

2.0.0-beta.2

5 years ago

Added

  • Multiple transform methods can be defined and used with the new Transformer Variants feature.
  • Transformers can now be referenced by name only if they are in App/Transformers

2.0.0-beta.1

5 years ago

2.0.0-beta.0

5 years ago

Breaking Changes

  • The toArray() was renamed to toJSON().
  • Changed defaultInclude & availableInclude methods to static getter

Added

  • Transformers can now be automatically resolved when passed by name.
  • The Adonis/Addons/Bumblebee/TransformerAbstract class now has a shorter alias to Bumblebee/Transformer.

Deprecated

  • The toArray() method was marked as deprecated.

1.5.3

5 years ago

Updated

  • Updated dev-dependencies

1.5.2

5 years ago

Fixed

  • While refactoring a bug was introduced in the adonis make:transformer command that caused it to generate invalid transformers, #26 (by @vincentducorps)

1.5.1

5 years ago

Added

  • The adonis make:transformer command now supports subfolders, #23 (by @NeroOficial)

1.5.0

5 years ago

Added

  • You can now generate a transformer by calling adonis make:transformer, #22

Fixed

  • When an invalid transformer is passed, a better understandable error message is thrown, #21