Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Releases: kotools/libraries

Kotools Types v4.0.0-beta

20 Dec 12:10
Compare
Choose a tag to compare
Pre-release

All platforms

Added

  • Hierarchy of AnyInt representing integers (#132).
  • The length property to the NotBlankString type (#143).

Changed

  • Move the NotBlankString type to the kotools.types.text package (#133).
  • Move the following types to the kotools.types.collection package: NotEmptyList, NotEmptySet and NotEmpty (#138).

Removed

Deprecated declarations from version 3 (#37).

Kotools Types v3.2.0

13 Dec 19:57
Compare
Choose a tag to compare

All platforms

Added

  • Explicit builders for all types (#22).
  • Types in the kotools.types package:
    • NotBlankString (#103)
    • NonZeroInt (#104)
    • PositiveInt (#105)
    • NegativeInt (#106)
    • StrictlyPositiveInt (#107)
    • StrictlyNegativeInt (#108)
    • NotEmptyList (#109)
    • NotEmptySet (#110)
    • NotEmptyMap (#111).

Changed

  • Update random API for getting a random IntHolder (#17).
  • Replace the SinceKotoolsTypes annotation by the SinceKotools shared annotation (#54).

Deprecated

  • The random function in the companion object of IntHolder's subtypes (#17).
  • Builders throwing an exception without having the OrThrow suffix in their name (#22).
  • Builders having an invalid name, like PositiveIntOrNull (#22).
  • ConstructionError objects (#22).
  • The DSL in alpha stage for building numbers (#33).
  • The NotBlankString type from the kotools.types.string package (#103).
  • The following types from the kotools.types.number package:
    • NonZeroInt (#104)
    • PositiveInt (#105)
    • NegativeInt (#106)
    • StrictlyPositiveInt (#107)
    • StrictlyNegativeInt (#108).
  • The following types from the kotools.types.collections package:
    • NotEmptyList (#109)
    • NotEmptySet (#110)
    • NotEmptyMap (#111).

Kotools Types v3.1.1

18 Nov 10:36
Compare
Choose a tag to compare

All platforms

Changed

Remove error promotions of deprecated declarations from v3.1 (#55).

Kotools Types v3.2.0-alpha.1

17 Nov 20:21
Compare
Choose a tag to compare
Pre-release

All platforms

Added

Add explicit builders for all types (#22).

Changed

  • Update random API for getting a random IntHolder (#17).
  • Replace the SinceKotoolsTypes annotation by the SinceKotools shared annotation (#54).

Deprecated

  • The random function in the companion object of subtypes IntHolder (#17).
  • Builders throwing an exception without having the OrThrow suffix in their name (#22).
  • Builders having an invalid name, like PositiveIntOrNull (#22).
  • ConstructionError objects (#22).
  • The DSL for building numbers (#33).

Kotools CSV v2.2.1

04 Nov 15:33
Compare
Choose a tag to compare

This version contains every changes included in v2.0.2 and v2.1.2.

Kotools CSV v2.1.2

04 Nov 11:42
Compare
Choose a tag to compare

Fixed

Fix pagination and filter ordering in the reader: the filter is now applied before the pagination (#8).

Kotools CSV v2.0.2

03 Nov 22:03
Compare
Choose a tag to compare

Fixed

Add missing csvWriterAsync function (#6).

Kotools Types v3.1.0

27 Oct 15:13
Compare
Choose a tag to compare

All platforms

Added

NotEmptyMap type representing maps that contain at least one entry (#120).

Changed

  • Convert the following types from a class to a sealed interface:
    • NotBlankString (#124)
    • NotEmptyList (#125)
    • NotEmptySet (#126).
  • Promote all deprecations of version 3.0 (#119).
  • Stabilize the random API for getting an instance of IntHolder with a random value (#118).
  • The DSL for building numbers is now available in alpha stage in the kotools.types.number package (#130).

Kotools Types v3.0.1

27 Oct 15:03
Compare
Choose a tag to compare

All platforms

Changed

  • Seal the NotEmptyCollection hierarchy (#121).
  • Override the toString function of NotBlankString (#117) and NotEmptySet (#123).

Kotools Types v3.0.0

27 Oct 15:01
Compare
Choose a tag to compare

All platforms

Added

  • Support for the JVM, JS and Native platforms using Kotlin Multiplatform (#62).
  • Serialization and deserialization with kotlinx.serialization of NonZeroInt, PositiveInt, StrictlyPositiveInt, NegativeInt, StrictlyNegativeInt, NotBlankString, NotEmptyList and NotEmptySet (#65).
  • Beta API for getting an instance of IntHolder with a random value.
val x = PositiveInt.random()
val y = PositiveInt.random()
x.value == y.value // false
  • Experimental DSL for building numbers according to the given context. Here's an example with the nonZero context:
nonZero int 1 // NonZeroInt(value = 1)
nonZero int 0 // throws an exception
nonZero intOrNull -1 // NonZeroInt(value = -1)
nonZero intOrNull 0 // null

Changed

  • Update type system for integers with a new IntHolder type (#112).

int-type-system-v3

  • Builders of NotEmptyList and NotEmptySet now work without reifying types (#68).
  • Improve error management (#70).

Deprecated

  • orNull functions for building a subtype of IntHolder (#112) and the NotBlankString type (#113).
// Instead of doing...
NonZeroInt orNull 1
NotBlankString orNull "hello world"
// do this
NonZeroIntOrNull(1)
NotBlankStringOrNull("hello world")
  • Constructor of NotEmptyList and NotEmptySet.
// Instead of doing...
NotEmptyList<Int>(1, 2, 3)
NotEmptySet<Int>(4, 5, 6)
// do this
notEmptyListOf<Int>(1, 2, 3)
notEmptySetOf<Int>(4, 5, 6)
  • Positional access operations of NotEmptyCollection receiving an index of type Int.
val list = notEmptyListOf(1, 2, 3)
// Instead of doing...
list[1]
// do this
list[PositiveInt(1)] // or list[StrictlyPositiveInt(1)] 

Removed

  • NotEmptyMutableList and NotEmptyMutableSet: mutable collections can be empty by definition.
  • Conversions from subtypes of IntHolder.