typelizer 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -3
- data/lib/typelizer/model_plugins/active_record.rb +1 -2
- data/lib/typelizer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fa25b7b1816ce597e18fd9914b7f9434a4f9cbc4e5e7dcb80c783850a0e3d99c
|
4
|
+
data.tar.gz: 882d39a7faffcec6d7911c646a5a82a5164be04943c5f109b3c245f03728bcb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c99a3bc8dd6bbeaeed50394963d5a7081ebf3d1d837c9fa0b3bff6e4bd822974c8953fa355b22b07539736f18f2f7cf7f998e1bb68bdb01785a18bc1a6e5e0b7
|
7
|
+
data.tar.gz: 7b041dc084316a0ce823150b32c6af5555abacf15aaa99f4a286eec87d4a7f5b7ada172dcf3b45735139574647c91e7e5fe722d5da0a1959305a4e87d093157d
|
data/CHANGELOG.md
CHANGED
@@ -7,11 +7,17 @@ and this project adheres to [Semantic Versioning].
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.5.1] - 2025-09-11
|
11
|
+
|
12
|
+
### Fixed
|
13
|
+
|
14
|
+
- Fix type inference when using virtual associations. ([@hkamberovic])
|
15
|
+
|
10
16
|
## [0.5.0] - 2025-09-01
|
11
17
|
|
12
18
|
### Added
|
13
19
|
|
14
|
-
- Support for multiple output writers: emit several variants (e.g., snake_case and camelCase) in parallel. ([@supdex])
|
20
|
+
- Support for multiple output writers: emit several variants (e.g., snake_case and camelCase) in parallel. ([@prog-supdex])
|
15
21
|
- Support for Rails' Attributes API. ([@skryukov])
|
16
22
|
|
17
23
|
## [0.4.2] - 2025-06-23
|
@@ -178,6 +184,7 @@ and this project adheres to [Semantic Versioning].
|
|
178
184
|
|
179
185
|
[@davidrunger]: https://github.com/davidrunger
|
180
186
|
[@Envek]: https://github.com/Envek
|
187
|
+
[@hkamberovic]: https://github.com/hkamberovic
|
181
188
|
[@kristinemcbride]: https://github.com/kristinemcbride
|
182
189
|
[@nkriege]: https://github.com/nkriege
|
183
190
|
[@NOX73]: https://github.com/NOX73
|
@@ -185,10 +192,11 @@ and this project adheres to [Semantic Versioning].
|
|
185
192
|
[@patvice]: https://github.com/patvice
|
186
193
|
[@PedroAugustoRamalhoDuarte]: https://github.com/PedroAugustoRamalhoDuarte
|
187
194
|
[@skryukov]: https://github.com/skryukov
|
188
|
-
[@supdex]: https://github.com/supdex
|
195
|
+
[@prog-supdex]: https://github.com/prog-supdex
|
189
196
|
[@ventsislaf]: https://github.com/ventsislaf
|
190
197
|
|
191
|
-
[Unreleased]: https://github.com/skryukov/typelizer/compare/v0.5.
|
198
|
+
[Unreleased]: https://github.com/skryukov/typelizer/compare/v0.5.1...HEAD
|
199
|
+
[0.5.1]: https://github.com/skryukov/typelizer/compare/v0.5.0...v0.5.1
|
192
200
|
[0.5.0]: https://github.com/skryukov/typelizer/compare/v0.4.2...v0.5.0
|
193
201
|
[0.4.2]: https://github.com/skryukov/typelizer/compare/v0.4.1...v0.4.2
|
194
202
|
[0.4.1]: https://github.com/skryukov/typelizer/compare/v0.4.0...v0.4.1
|
@@ -63,7 +63,6 @@ module Typelizer
|
|
63
63
|
column = model_class&.columns_hash&.dig(prop.column_name.to_s)
|
64
64
|
return nil unless column
|
65
65
|
|
66
|
-
column = model_class&.columns_hash&.dig(prop.column_name.to_s)
|
67
66
|
prop.multi = !!column.try(:array)
|
68
67
|
case config.null_strategy
|
69
68
|
when :nullable
|
@@ -88,7 +87,7 @@ module Typelizer
|
|
88
87
|
def infer_types_for_attribute(prop)
|
89
88
|
return nil unless model_class.respond_to?(:attribute_types)
|
90
89
|
|
91
|
-
attribute_type_obj = model_class.attribute_types
|
90
|
+
attribute_type_obj = model_class.attribute_types.fetch(prop.column_name.to_s, nil)
|
92
91
|
return nil unless attribute_type_obj
|
93
92
|
|
94
93
|
if attribute_type_obj.respond_to?(:subtype)
|
data/lib/typelizer/version.rb
CHANGED