dry-types v1.3.0 Release Notes

Release Date: 2020-02-10 // 15 days ago
  • ➕ Added

    • 🔀 Schema#merge for merging two hash schemas (@waiting-for-dev)
    • Aliases for .constructor to non-constructor types. Now you can call .prepend/.append without silly checks for the type being a constructor (flash-gordon)

      (Dry::Types['integer'].prepend(-> { _1 + 1 })).(1) # => 2(Dry::Types['coercible.integer'] >> -> { _1 * 2 }).('99') # => 198

    • Hash::Schema#clear returns a schema with the same options but without keys

    • 0️⃣ Optional namespace now includes strict types by default (@flash-gordon)

    🛠 Fixed

    • Schema::Key#optional returns an instance of Schema::Key as it should have done
    • Composition with function handling exceptions. This could occasionally lead to unexpected exceptions (@flash-gordon)

    Compare v1.2.2...v1.3.0