1.21.0 - 2026-08-23
New Features
[refined4s-core] Add cats.Order type class instances for all pre-defined types (#617)
refined4s-core already provides cats.Eq, cats.Hash and cats.Show instances for the pre-defined types using the "no more orphans" technique from orphan-cats, so they are available without any import when cats is on the classpath while refined4s-core itself does not depend on cats. Now cats.Order is provided in the same way.
import cats.*
import cats.syntax.all.*
import refined4s.types.all.*
Order[PosInt].compare(PosInt(1), PosInt(2))
// Int = -1
PosInt(1) < PosInt(2)
// Boolean = true
NonEmptyString("b") comparison NonEmptyString("a")
// cats.kernel.Comparison = GreaterThan
NonEmptyString("b") max NonEmptyString("a")
// NonEmptyString = bThe Order instance is derived from the underlying type's cats.Order, and it is added to every pre-defined type in
refined4s.types.numericNegInt,NonNegInt,PosInt,NonPosIntNegLong,NonNegLong,PosLong,NonPosLongNegShort,NonNegShort,PosShort,NonPosShortNegByte,NonNegByte,PosByte,NonPosByteNegFloat,NonNegFloat,PosFloat,NonPosFloatNegDouble,NonNegDouble,PosDouble,NonPosDoubleNegBigInt,NonNegBigInt,PosBigInt,NonPosBigIntNegBigDecimal,NonNegBigDecimal,PosBigDecimal,NonPosBigDecimal
refined4s.types.stringsNonEmptyString,NonBlankString,Uuid
refined4s.types.networkUri,UrlPortNumber,SystemPortNumber,NonSystemPortNumber,UserPortNumber,DynamicPortNumber
refined4s.types.timeMonth,Day,Hour,Minute,Second,Millis
NOTE:
UuidV7has anOrderinstance as well, yet it remains temporarily hidden and unusable as it is not ready for production use.
Internal Housekeeping
Update effectie, extras and logback, and move test-only dependencies into libs.tests (#615)
effectie:2.4.0=>2.5.0extras:0.55.0=>0.56.0logback-classic:1.5.6=>1.5.13
effectie 2.5.0 replaces the effect-specific Ce2Resource and Ce3Resource with a single ReleasableResource driven by a UseResource type class, so the doobie CE2 and CE3 test helpers now use ReleasableResource and require a UseResource context bound.
All test-only dependencies are moved into the libs.tests object with % Test attached at the definition, so each module's libraryDependencies no longer repeats % Test for them.
Update scalafmt from 3.8.3 to 3.10.5 and reformat the code accordingly (#616)
scalafmt:3.8.3=>3.10.5
.scalafmt.conf is adjusted for the new option names and dialect handling, and the code is reformatted by the new version. There is no behaviour change as these are formatting-only updates.
Bump sbt to 1.12.14 (#614)
What's Changed
- Bump sbt to 1.12.14 by @kevin-lee in #614
- Update
effectie,extrasandlogback, and move test-only dependencies intolibs.testsby @kevin-lee in #615 - Update
scalafmtfrom3.8.3to3.10.5and reformat the code accordingly by @kevin-lee in #616 - Close #617: Add
cats.Ordertype class instances for all pre-defined types withorphan-catsby @kevin-lee in #618 - Add a GitHub Actions job to generate release notes and update
sbt-devoopsto3.8.0by @kevin-lee in #619 - refined4s v1.21.0 by @kevin-lee in #620
Full Changelog: v1.20.0...v1.21.0