Releases: skryukov/typelizer
v0.3.0
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 oftypelize
method.
Fixed
- Ignore
nil
values on fingerprint calculation. (@Envek)
Full Changelog: v0.2.0...v0.3.0
v0.2.0
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 totrue
(@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
Full Changelog: v0.1.5...v0.2.0
v0.1.5
Fixed
- Fix the duplicated import with multiple same association (@okuramasafumi)
Full Changelog: v0.1.4...v0.1.5
v0.1.4
Added
- PORO model plugin (@okuramasafumi)
- Auto model plugin (@skryukov)
Full Changelog: v0.1.3...v0.1.4
v0.1.3
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
Fixed
- Prevent Alba's
meta nil
raising an error (@okuramasafumi)
New Contributors
- @okuramasafumi made their first contribution in #5
Full Changelog: v0.1.1...v0.1.2
v0.1.1
Fixed
- Failing method inspection (@skryukov, @davidrunger)
New Contributors
- @davidrunger made their first contribution in #2
Full Changelog: v0.1.0...v0.1.1