Skip to content

Releases: rhwilr/adonis-bumblebee

2.2.0

13 Apr 08:26
8b5a8c5
Compare
Choose a tag to compare

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

28 Dec 13:11
99f9474
Compare
Choose a tag to compare

Added

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

Updated

  • Many dev-dependencies were updated

2.0.0

22 Mar 20:29
32ec6be
Compare
Choose a tag to compare

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! 👏

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

25 Feb 22:21
Compare
Choose a tag to compare
2.0.0-beta.2 Pre-release
Pre-release

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

23 Feb 15:55
Compare
Choose a tag to compare
2.0.0-beta.1 Pre-release
Pre-release
tagged beta 2.0.0-beta.1

2.0.0-beta.0

23 Feb 14:39
Compare
Choose a tag to compare
2.0.0-beta.0 Pre-release
Pre-release

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

26 Nov 11:49
Compare
Choose a tag to compare

Updated

  • Updated dev-dependencies

1.5.2

31 Oct 17:50
Compare
Choose a tag to compare

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

29 Oct 18:17
Compare
Choose a tag to compare

Added

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

1.5.0

17 Oct 18:29
Compare
Choose a tag to compare

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