dry-types v1.2.2 Release Notes

Release Date: 2019-12-14 // over 4 years ago
  • 1.2.2 2019-12-14

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Types.Contructor doesn't re-wrap class instances implementing type interface, this fixes some quirks in dry-struct (flash-gordon)

    ๐Ÿ”„ Changed

    • ๐ŸŽ Types now use immutable equalizers. This should improve performance in certain cases e.g. in ROM (flash-gordon)
    • Attempting to use non-symbol keys in hash schemas raises an error. We always supported only symbols as keys, but there was no check, now it'll throw an argument error. If you want to convert strings to symbols, use Hash#with_key_transform (flash-gordon)
    • ๐Ÿ— Params and JSON types accept Time/Date/Datetime instances and boolean values. This can be useful in tests, but we discourage you from relying on this behavior in production code. For example, building structs with Params types is considered a smell. There are dedicated tools for coercion, namely dry-schema and dry-validation. Be a responsible user of dry-types! โค (flash-gordon)

    Compare v1.2.1...v1.2.2