Skip to content

Releases: dry-rb/dry-types

v0.12.1

04 Nov 14:33
Compare
Choose a tag to compare

v0.12.1 2017-10-11

Fixed

  • Constructor#try rescues ArgumentError (raised in cases like Integer('foo')) (flash-gordon)
  • #constructor works correctly for default and enum types (solnic)
  • Optional sum types work correctly in safe mode (GustavoCaso)
  • The equalizer of constrained types respects meta (flash-gordon)

Compare v0.12.0...v0.12.1

v0.12.0

04 Nov 14:32
Compare
Choose a tag to compare

v0.12.0 2017-09-15

Added

  • A bunch of shortcut methods for constructing types to the autogenerated module, e.g. Types.Constructor(String, &:to_s) (flash-gordon)

Deprecated

  • Types::Array#member was deprecated in favor of Types::Array#of (flash-gordon)

Compare v0.11.1...v0.12.0

v0.11.1

04 Nov 14:32
Compare
Choose a tag to compare

v0.11.1 2017-08-14

Changed

  • Constructors are now equalized using fn and meta too (flash-gordon)

Fixed

  • Fixed Constructor#name with Sum-types (flash-gordon)

Compare v0.11.0...v0.11.1

v0.11.0

30 Jun 21:48
Compare
Choose a tag to compare

Added

  • #to_ast available for all type objects (GustavoCaso)
  • Types::Array#of as an alias for #member (maliqq)
  • Detailed failure objects are passed to results which improves constraint violation messages (GustavoCaso)

v0.10.3

06 May 14:26
v0.10.3
Compare
Choose a tag to compare

Added

  • Callable defaults accept the underlying type (v-kolesnikov)

Compare v0.10.2...v0.10.3

v0.10.2

28 Apr 11:04
v0.10.2
f7f05ff
Compare
Choose a tag to compare

Fixed

  • Fixed Type#optional? for sum types (flash-gordon)

Compare v0.10.1...v0.10.2

v0.10.1

28 Apr 11:05
Compare
Choose a tag to compare

Added

  • Type#optional? returns true if type is Sum and left is nil (GustavoCaso)
  • Type#pristine returns a type without meta (flash-gordon)

Fixed

  • meta is used in type equality again (solnic)
  • Any works correctly with meta again (flash-gordon)

Compare v0.10.0...v0.10.1

v0.10.0

28 Apr 11:05
Compare
Choose a tag to compare

Added

  • Types can be used in case statements now (GustavoCaso)

Fixed

  • Return original value when Date.parse raises a RangeError (jviney)

Changed

  • Meta data are now stored separately from options (flash-gordon)
  • Types::Object was renamed to Types::Any (flash-gordon)

Compare v0.9.4...v0.10.0

v0.7.2

11 May 20:34
Compare
Choose a tag to compare
bump to 0.7.2