From 46c3c55bed20297b0ed5feb1dc48b9b804a0ad9d Mon Sep 17 00:00:00 2001 From: Mitchell Yuwono Date: Tue, 12 Sep 2023 23:23:03 +1000 Subject: [PATCH 1/2] upgrade kotest --- gradle/libs.versions.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index b0d8fcf8..baaa9705 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] -arrow = "1.1.5" +arrow = "1.2.1" kotlin = "1.8.10" -kotest = "5.6.2" +kotest = "5.7.2" kotlinx-coroutines = "1.6.4" animalsniffer = "1.7.0" kotlinBinaryCompatibilityValidator = "0.13.2" From 6c400620f78d102ee07e8a604c2a6f8aa0cb5418 Mon Sep 17 00:00:00 2001 From: Mitchell Yuwono Date: Tue, 12 Sep 2023 23:34:50 +1000 Subject: [PATCH 2/2] add deprecation notice --- gradle/libs.versions.toml | 2 +- .../assertions/arrow/core/Nelnspectors.kt | 40 +++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index baaa9705..bd1372d0 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -arrow = "1.2.1" +arrow = "1.1.5" kotlin = "1.8.10" kotest = "5.7.2" kotlinx-coroutines = "1.6.4" diff --git a/kotest-assertions-arrow/src/commonMain/kotlin/io/kotest/assertions/arrow/core/Nelnspectors.kt b/kotest-assertions-arrow/src/commonMain/kotlin/io/kotest/assertions/arrow/core/Nelnspectors.kt index 798d1bb8..79489fd8 100644 --- a/kotest-assertions-arrow/src/commonMain/kotlin/io/kotest/assertions/arrow/core/Nelnspectors.kt +++ b/kotest-assertions-arrow/src/commonMain/kotlin/io/kotest/assertions/arrow/core/Nelnspectors.kt @@ -12,42 +12,82 @@ import io.kotest.inspectors.forNone import io.kotest.inspectors.forOne import io.kotest.inspectors.forSome +@Deprecated( + "use Kotest's Collection.forAll.", + ReplaceWith("forAll", "io.kotest.inspectors.forAll") +) public fun NonEmptyList.forAll(f: (A) -> Unit): Unit { all.forAll(f) } +@Deprecated( + "use Kotest's Collection.forOne.", + ReplaceWith("forOne", "io.kotest.inspectors.forOne") +) public fun NonEmptyList.forOne(f: (A) -> Unit): Unit { all.forOne(f) } +@Deprecated( + "use Kotest's Collection.forExactly.", + ReplaceWith("forExactly", "io.kotest.inspectors.forExactly") +) public fun NonEmptyList.forExactly(k: Int, f: (A) -> Unit): Unit { all.forExactly(k, f) } +@Deprecated( + "use Kotest's Collection.forSome.", + ReplaceWith("forSome", "io.kotest.inspectors.forSome") +) public fun NonEmptyList.forSome(f: (A) -> Unit): Unit { all.forSome(f) } +@Deprecated( + "use Kotest's Collection.forAny.", + ReplaceWith("forAny", "io.kotest.inspectors.forAny") +) public fun NonEmptyList.forAny(f: (A) -> Unit): Unit { all.forAny(f) } +@Deprecated( + "use Kotest's Collection.forAtLeastOne.", + ReplaceWith("forAtLeastOne", "io.kotest.inspectors.forAtLeastOne") +) public fun NonEmptyList.forAtLeastOne(f: (A) -> Unit): Unit { all.forAtLeastOne(f) } +@Deprecated( + "use Kotest's Collection.forAtLeast.", + ReplaceWith("forAtLeast", "io.kotest.inspectors.forAtLeast") +) public fun NonEmptyList.forAtLeast(k: Int, f: (A) -> Unit): Unit { all.forAtLeast(k, f) } +@Deprecated( + "use Kotest's Collection.forAtMostOne.", + ReplaceWith("forAtMostOne", "io.kotest.inspectors.forAtMostOne") +) public fun NonEmptyList.forAtMostOne(f: (A) -> Unit): Unit { all.forAtMostOne(f) } +@Deprecated( + "use Kotest's Collection.forAtMost.", + ReplaceWith("forAtMost", "io.kotest.inspectors.forAtMost") +) public fun NonEmptyList.forAtMost(k: Int, f: (A) -> Unit): Unit { all.forAtMost(k, f) } +@Deprecated( + "use Kotest's Collection.forNone.", + ReplaceWith("forNone", "io.kotest.inspectors.forNone") +) public fun NonEmptyList.forNone(f: (A) -> Unit): Unit { all.forNone(f) }