Skip to content

Releases: skryukov/typelizer

v0.3.0

01 Mar 08:16
b06d3fd
Compare
Choose a tag to compare

Added

  • Support transform keys. (@patvice, @skryukov)

    Typelizer now respects transform_keys/key_transform configurations for all plugins.

  • Support typing method def in Alba. (@patvice)

    The typelize helper now can be used before a method definition:

    class UserResource < ApplicationResource
      attributes :id, :name, :email, :chars_in_name
    
      typelize :number
      def chars_in_name(obj)
        obj.name.chars.count
      end
    end
  • Support for deprecated attributes. (@Envek)

    They will be marked as deprecated using JSDoc @deprecated tag in TypeScript interface comments.

    In ActiveModel::Serializer attributes deprecated option is recognized.

    For other serializers, you can use deprecated option of typelize method.

Fixed

  • Ignore nil values on fingerprint calculation. (@Envek)

Full Changelog: v0.2.0...v0.3.0

v0.2.0

26 Nov 12:03
c8fcf9a
Compare
Choose a tag to compare

Added

  • Add support for enum attributes declared using ActiveRecord::Enum or explicitly in serializers (@Envek)
  • Add support for comments in generated TypeScript interfaces (@Envek)
  • Add TypeScript verbatim module syntax support through verbatim_module_syntax config option (@patvice)
  • Add typelizer:generate:refresh command to clean output directory and regenerate all interfaces (@patvice)
  • Allow disabling Typelizer in Rails development with DISABLE_TYPELIZER environment variable to true (@okuramasafumi)
  • Allow to get interfaces without generating TypeScript files (@Envek)

Fixes

  • Do not override Typelizer.dirs in the railtie initializer (@patvice)
  • Do not raise on empty nested serializers (@skryukov)
  • Attribute options merging in inherited serializers (@Envek)
  • Allow recursive type definition (@okuramasafumi)

New Contributors

  • @Envek made their first contribution in #21

Full Changelog: v0.1.5...v0.2.0

v0.1.5

07 Oct 15:18
9339681
Compare
Choose a tag to compare

Fixed

  • Fix the duplicated import with multiple same association (@okuramasafumi)

Full Changelog: v0.1.4...v0.1.5

v0.1.4

04 Oct 12:40
82a6c62
Compare
Choose a tag to compare

Added

Full Changelog: v0.1.3...v0.1.4

v0.1.3

27 Sep 11:58
0b0015a
Compare
Choose a tag to compare

Added

  • Support inline associations (@okuramasafumi, @skryukov)

    Example of Alba serializer with inline associations (note the helper Typelizer::DSL, see Alba's docs for more details):

    class FooSerializer
      include Alba::Resource
      helper Typelizer::DSL
    
      many :bars do
        typelize_from Bar
    
        attributes :id, :name
      end
    end

Full Changelog: v0.1.2...v0.1.3

v0.1.2

05 Sep 08:24
5284071
Compare
Choose a tag to compare

Fixed

New Contributors

Full Changelog: v0.1.1...v0.1.2

v0.1.1

26 Aug 18:53
ab90684
Compare
Choose a tag to compare

Fixed

New Contributors

Full Changelog: v0.1.0...v0.1.1

v0.1.0

26 Aug 18:52
5cf1cdd
Compare
Choose a tag to compare

Added

Full Changelog: https://github.com/skryukov/typelizer/commits/v0.1.0