Releases: kotools/types
5.1.1
♻️ Changed
- Improve dependency compatibility documentation (8a6f2fc).
🔥 Removed
- Version 5.0.0 from API reference (62652e1).
🐛 Fixed
- Incompatibility with different dependency versions (#907, originally reported by @MichaelStH).
Thanks to @MichaelStH for contributing to this new release. 🙏
5.1.0
✨ Added
- Support iOS arm64 Kotlin/Native target (#843).
- Support browser target for Kotlin/JS (#874).
Integerexperimental type for preventing overflow when performing arithmetic operations with integers, and for consistent behavior across all platforms when dividing an integer by zero (#880).- Serializer for
Integertype, inKotoolsTypesSerializersModule()experimental function (#898). of(String)andof(String, EmailAddressRegex)experimental functions inEmailAddress.Companiontype, for creating an instance ofEmailAddress(#865).EmailAddressRegex.Companion.of(String)experimental function for creating an instance ofEmailAddressRegex(#868).- Java compatibility in dependency compatibility (1dacbda).
♻️ Changed
- Improve declarations lifecycle documentation (1f9e815, 7a8e483, fd2f9b2 and 7a1942a).
- Update dependency compatibility documentation (c60c84d).
- Hide
KotoolsTypesSerializersModule()experimental function from Java code (#897).
🗑️ Deprecated
orNullandorThrowexperimental functions fromEmailAddress.Companionwith an error level, for using itsoffunctions instead (#865).orNull(String)andorThrow(String)experimental functions fromEmailAddressRegex.Companionwith an error level,
for using itsoffunction instead (#868).
🔥 Removed
- Following deprecated declarations from
EmailAddress.Companionexperimental type:PATTERNconstant,orNull(String, String)andorThrow(String, String)functions (#838). Zeroexperimental type and its serializers (#844). UseInteger.from(0)instead.stringSerializer()experimental functions (#897). UseKotoolsTypesSerializersModule()instead.
🐛 Fixed
5.0.1
✨ Added
- The
EmailAddressRegexexperimental type representing a regular expression for validating email addresses, in thetypesGradle subproject (#809). - The
EmailAddress.Companion.orNull(String, EmailAddressRegex)and theEmailAddress.Companion.orThrow(String, EmailAddressRegex)experimental functions, in thetypesGradle subproject, for creating an email address matching the specified regular expression (#809). - The
EmailAddressRegex.Companion.stringSerializer()experimental function, in thetypes-kotlinx-serializationGradle subproject, for serializing theEmailAddressRegextype asString(#809). - The
KotoolsTypesSerializersModule()experimental function, in thetypes-kotlinx-serializationGradle subproject, for providing a collection of default serializers for serializing types provided by Kotools Types (#790). - The following extension functions on the
Zero.Companionexperimental type, in thetypes-kotlinx-serializationGradle subproject (#793):byteSerializer()for serializing theZerotype asByte.shortSerializer()for serializing theZerotype asShort.intSerializer()for serializing theZerotype asInt.longSerializer()for serializing theZerotype asLong.floatSerializer()for serializing theZerotype asFloat.doubleSerializer()for serializing theZerotype asDouble.stringSerializer()for serializing theZerotype asString.
- The
EmailAddress.Companion.stringSerializer()experimental function, in thetypes-kotlinx-serializationGradle subproject, for serializing theEmailAddresstype asString(#794). - Explanations associated to each symbol used in patterns present in the API reference (fba9c4e).
♻️ Changed
- The README documentation of the
types-kotlinx-serializationGradle subproject, for using the newKotoolsTypesSerializersModule()function (#790).
🗑️ Deprecated
- The
EmailAddress.Companion.PATTERNexperimental property with an error level for using theEmailAddressRegex.Companion.default()function instead (#809). - The
EmailAddress.Companion.orNull(String, String)experimental function with an error level for using theorNull(String, EmailAddressRegex)overload instead (#809). - The
EmailAddress.Companion.orThrow(String, String)experimental function with an error level for using theorThrow(String, EmailAddressRegex)overload instead (#809).
🔥 Removed
- Versions 4.5.0, 4.5.1 and 4.5.2 from the API reference (#771).
- Experimental declarations from the
kotools.types.*packages in thetypesGradle subproject (#802). Better alternatives for these declarations will be introduced in theorg.kotools.typespackage. - The
KotoolsTypesSerializersexperimental type from thetypes-kotlinx-serializationGradle subproject, for using theKotoolsTypesSerializersModule()function instead (#790). - The
ZeroAsByteSerializerexperimental type, from thetypes-kotlinx-serializationGradle subproject, for using theZero.Companion.byteSerializer()function instead (#795). - The
EmailAddressAsStringSerializerexperimental type, from thetypes-kotlinx-serializationGradle subproject, for using theEmailAddress.Companion.stringSerializer()function instead (#796).
5.0.0
✨ Added
- Support iOS Simulator arm64 and iOS x64 Kotlin Native targets (#415 and #416).
- Dependency upgrades strategy in the dependency compatibility documentation (#289).
- Overloads for the
orNulland theorThrowfunctions in theZero.Companionexperimental type, for creating an instance ofZerofrom a number of typeShort(#716),Int(#717),Long(#718),Float(#719) andDouble(#720), or from a text of typeString(#761).
♻️ Changed
- Bump embedded Kotlin from 1.8.22 to 1.9.25, Kotlin language version from 1.5 to 1.9, and kotlinx.serialization from 1.5.1 to 1.6.3 (#407 and #740).
- Use default package names for Linux x64, macOS x64 and MinGW x64 Kotlin Native targets (#405).
- Move
ExperimentalKotoolsTypesApifrom thekotools.types.experimentalpackage to theorg.kotools.typesone (#636). - Documentation of
EmailAddress.Companion.PATTERNthat now refers to RegExr (#762).
🔥 Removed
KotoolsTypesSerializers.zerodeprecated property from the experimental API (#723).KotoolsTypesSerializers.emailAddressdeprecated property, from the experimental API (#727).- Hidden annotations from the
kotools.types.experimentalpackage (#318). Zero.Companion.fromByteandZero.Companion.fromByteOrNulldeprecated functions from the experimental API (#715).EmailAddress.Companion.fromStringandEmailAddress.Companion.fromStringOrNulldeprecated functions from the experimental API (#721).
🐛 Fixed
- Links to the API reference from the README documentation (#742).
Thanks to @bodiam for contributing to this new release. 🙏
4.5.3
✨ Added
- The
Zero.Companion.orThrow(Byte)experimental method for Kotlin and Java platforms, and theZero.Companion.orNull(Byte)experimental method only for Kotlin platforms (#688). - In the
EmailAddress.Companionexperimental type, theorThrow(String)and theorThrow(String, String)methods for Kotlin and Java platforms, theorNull(String)and theorNull(String, String)methods only for Kotlin platforms (#692). - The
ZeroAsByteSerializerexperimental type, in thetypes-kotlinx-serializationsubproject, for serializing theZerotype asByte(#690). - The
EmailAddressAsStringSerializerexperimental type, in thetypes-kotlinx-serializationsubproject, for serializing theEmailAddresstype asString(#691).
🗑️ Deprecated
- In the
Zero.Companionexperimental type, thefromByteand thefromByteOrNullmethods with an error level for using theorThrowand theorNullones instead (#688). - In the
EmailAddress.Companionexperimental type, thefromStringand thefromStringOrNullmethods with an error level for using theorThrowand theorNullones instead (#692). - The
KotoolsTypesSerializers.zeroexperimental property, from thetypes-kotlinx-serializationsubproject, with an error level for using theZeroAsByteSerializertype instead (#690). - The
KotoolsTypesSerializers.emailAddressexperimental property, from thetypes-kotlinx-serializationsubproject, with an error level for using theEmailAddressAsStringSerializertype instead (#691).
🔥 Removed
- Versions
4.0.0and4.3.0from the API reference (#704). - JUnit 5 and System Lambda unused dependencies (#703).
🐛 Fixed
- Inappropriate usages of the
functionword instead of themethodone in the API reference (#706).
🔒 Security
Bumped the following NPM packages for fixing DOM Clobbering Gadget leading to XSS:
Thanks to @LVMVRQUXL for contributing to this new release. 🙏
4.5.2
✨ Added
- The following declarations to the
Zeroexperimental type: - Samples to the
Zero()constructor (7c8172d).
♻️ Changed
- The
valueparameter of thefromStringand thefromStringOrNullfunctions from theEmailAddress.Companionexperimental type, that is now namedtext(#682). - Documentation of the
EmailAddresstype, theEmailAddress.Companion.PATTERNproperty, and theEmailAddress.Companion.fromStringfunctions (f1ac24c, 1a0ea52, fd003c4 and 4c188db). - Documentation of the
Zerotype, theZero.Companion.fromByte(Byte)and theZero.Companion.fromByteOrNull(Byte)functions (#681 and ccaaa3a). - Samples for using assertions instead of printing values and collapsing them by default (#641 and #678).
- Kotlin and Java samples of the
StrictlyNegativeDouble.Companion.create(Number)function (0a4258f).
🐛 Fixed
- API dependencies of the
types-kotlinx-serializationsubproject by exporting the kotlinx.serialization library (#700). - Kotlin samples of the
createand thecreateOrNullexperimental functions from theNotEmptyMap.Companiontype (1fa89b0 and 35d599b). - Java sample of the
StrictlyNegativeDouble.equals(Any?)experimental function (c862e0c).
🔥 Removed
- The
kotools.types.web.EmailAddressdeprecated type from the experimental API (#663). - Availability of the
Zero.Companion.fromByteOrNull(Byte)experimental function from Java code (#683). - Availability of the
EmailAddress.Companion.fromStringOrNullexperimental functions from Java code (#684).
Thanks to @LVMVRQUXL and @MartiPresa for contributing to this new release. 🙏
4.5.1
✨ Added
- Introduced the
Zeroexperimental type representing the zero number in the neworg.kotools.typespackage (#644). This package will contain reimplemented types and those from thekotools.types.*packages will be deprecated incrementally. - Introduced the
EmailAddressexperimental type representing email addresses in theorg.kotools.typespackage (#635). This new implementation provides newfromStringandfromStringOrNullfactory functions accepting avalueargument of typeAny. For simplicity purpose, the default pattern used for validating email addresses is^\S+@\S+\.\S+$, which allows a wider range of values. But it is also possible to provide apatternargument to these new factory functions for customizing the validation.
val value: Any = "contact@kotools.org"
val pattern: Any = "^[a-z]+@[a-z]+\\.[a-z]+\$"
val emailAddress: EmailAddress = EmailAddress.fromString(value, pattern)
println(emailAddress) // "contact@kotools.org"- New
types-kotlinx-serializationmodule for supporting serialization of types from theorg.kotools.typespackage using the Kotlin Serialization library (#602). See its README documentation for more details on how to use it.
♻️ Changed
- Our versioning strategy is now based on backward compatibility, focusing on behavioral, source and binary compatibilities.
- The
createand thecreateOrNullexperimental functions of theNotBlankString.Companiontype now accept a value of typeAnyinstead ofAny?(#626).
// Before
NotBlankString.create(null) // pass
NotBlankString.createOrNull(null) // pass
// Now
NotBlankString.create(null) // compilation error
NotBlankString.createOrNull(null) // compilation error- The documentation of the
AnyInt(Int)experimental constructor-like function now uses collapsing sections for splitting Kotlin and Java samples (8eb8044).
🗑️ Deprecated
- The following annotations are now hidden from sources (#334):
ExperimentalCollectionApi,ExperimentalNumberApi,ExperimentalRangeApi,ExperimentalResultApiandExperimentalTextApi. - The
EmailAddressexperimental type from thekotools.types.webpackage is now deprecated with a warning level for using the corresponding type from theorg.kotools.typespackage (#635). ItscreateandcreateOrNullfactory functions are also deprecated with an error level for this reason.
🔥 Removed
Due to an internal compilation error of Kotlin when comparing generics, the following types have been removed from the experimental API: NotEmptyRange, Bound, InclusiveBound and ExclusiveBound (#627). Experimental properties using these types were also removed.
Thanks to @augustomtt and @LVMVRQUXL for contributing to this new release. 🙏
4.5.0
✨ Added
- Support macOS arm64 systems with Kotlin Native (#414).
- The
StrictlyNegativeDoubleexperimental type for representing a floating-point number of type Double that is less than zero (#555). - The
create(Any?)and thecreateOrNull(Any?)experimental factory functions inNotBlankString.Companion(#341). - The
create(Number)andcreateOrNull(Number)experimental factory functions in the following types: - The
create(Collection<E>), thecreateOrNull(Collection<E>)and theof(E, vararg E)experimental factory functions inNotEmptyList.Companion(#352) and inNotEmptySet.Companion(#353). - The
create(Map<K, V>), thecreateOrNull(Map<K, V>)and theof(Pair<K, V>, vararg Pair<K, V>)experimental factory functions inNotEmptyMap.Companion(#354). - The
NotBlankString.plus(Any)experimental operation (#543). - Documentation of dependency compatibility (#288).
- The documentation of the serialization and the deserialization processes in the API reference for the following types:
AnyInt,NonZeroInt,PositiveInt,NegativeInt,StrictlyPositiveInt,StrictlyNegativeInt,ZeroInt,NotBlankString,NotEmptyList,NotEmptySetandNotEmptyMap(#256). - References to the corresponding factory functions for eligible types in the API reference (cfc99b2).
- Tagline suggested by @jmfayard in the README documentation (#338).
♻️ Changed
- Bump embedded Kotlin from 1.7.21 to 1.8.22 (#172 and #196).
- Bump kotlinx.serialization from 1.4.0 to 1.5.1 (#378 and #381).
- Move the
EmailAddressexperimental type from thekotools.types.experimentalpackage to the newkotools.types.webone (#377). - Make the
regexproperty of theEmailAddressexperimental type inaccessible for Java sources, due to the unavailability of thekotlin.text.Regextype for this language (8d0d098). - Update the regular expression of the
EmailAddressexperimental type for following the RFC-5322 (#394). - Update our Git commit messages convention using Gitmoji in our Contribution Guidelines (#490).
🗑️ Deprecated
Deprecation promotion of the following annotations to error (#333):
ExperimentalCollectionApiExperimentalNumberApiExperimentalRangeApiExperimentalResultApiExperimentalTextApi
🔥 Removed
The plus experimental operations using the NotBlankString type (#542).
Thanks to @jmfayard and @LVMVRQUXL for contributing to this new release. 🙏
4.4.2
🐛 Fixed
Serialization problems using the Kotlin/JS IR compiler for all serializable types (#431).
Thanks to @robertfmurdock and @LVMVRQUXL for contributing to this new release. 🙏
4.4.1
🐛 Fixed
The types-internal subproject was missing in the Gradle dependency tree of Kotools Types 4.4.0 (#406).
Thanks to @robertfmurdock and @LVMVRQUXL for contributing to this new release. 🙏