Releases: profunktor/redis4cats
0.10.0-RC3
Changes
With respect to the previous RC2, these are the changes:
- #285 Rename Redis instantiation methods (
make
=>fromClient
, etc) - #289 Scaladocs as part of the microsite: https://redis4cats.profunktor.dev/api/
- #292 Migrating tests over to
MUnit
- #293 Stdout logging implementation + docs
- #295 Codecs documentation (including JsonCodec)
- #296 Codecs: compression, encryption & docs
- #297 Client options (to configure the underlying Redis client: timeouts, reconnection, etc)
New constructors
Some new constructors now take a ClientOptions
argument.
Redis[IO].withOptions("redis://localhost", opts, codec)
RedisClient[IO](uri, opts)
RedisMasterReplica[IO].withOptions(codec, uri, opts)
Dependency updates
- #288
log4cats-1.1.1
0.10.0-RC2
More breaking changes
- #283 The
exec_
function has been renamed tofilterExec
(transactions and pipelining). - #284 The API has been greatly simplified while also improving type inference
A new quick start section has been added to the documentation:
import cats.effect._
import cats.implicits._
import dev.profunktor.redis4cats.Redis
import dev.profunktor.redis4cats.effect.Log.NoOp._
object QuickStart extends IOApp {
override def run(args: List[String]): IO[ExitCode] =
Redis[IO].utf8("redis://localhost").use { cmd =>
for {
_ <- cmd.set("foo", "123")
x <- cmd.get("foo")
_ <- cmd.setNx("foo", "should not happen")
y <- cmd.get("foo")
_ <- IO(println(x === y)) // true
} yield ExitCode.Success
}
}
New constructors
Redis[IO].utf8("redis://localhost")
Redis[IO].simple("redis://localhost", longCodec)
Redis[IO].clusterUtf8("redis://localhost:30001")
Redis[IO].cluster("redis://localhost:30001", someCodec)
This greatly simplifies the creation of RedisCommands[F, K, V]
while improving type inference (note that K
and V
are inferred from the codec passed as an argument) thanks to the partially applied trick.
0.10.0-RC1
Breaking changes
Package rename
Before | Now |
---|---|
dev.profunktor.redis4cats.algebra.RedisCommands |
dev.profunktor.redis4cats.RedisCommands |
dev.profunktor.redis4cats.interpreter.Redis |
dev.profunktor.redis4cats.Redis |
dev.profunktor.redis4cats.domain._ |
dev.profunktor.redis4cats.data._ |
dev.profunktor.redis4cats.interpreter.pubsub.PubSub |
dev.profunktor.redis4cats.pubsub.PubSub |
dev.profunktor.redis4cats.interpreter.streams.RedisStream |
dev.profunktor.redis4cats.streams.RedisStream |
dev.profunktor.redis4cats.streams._ |
dev.profunktor.redis4cats.pubsub.data._ (*) |
dev.profunktor.redis4cats.streams._ |
dev.profunktor.redis4cats.streams.data._ (*) |
(*) It has been split into two different files.
Typed-transactions & Pipelining
Typed-transactions and pipelining now make use of a custom HList
s. Types are now fully inferred. For example:
//type Cmd = IO[Unit] :: IO[Unit] :: IO[Option[String]] :: IO[Unit] :: IO[Unit] :: IO[Option[String]] :: HNil
val operations =
cmd.set(key1, "sad") :: cmd.set(key2, "windows") :: cmd.get(key1) ::
cmd.set(key1, "nix") :: cmd.set(key2, "linux") :: cmd.get(key1) :: HNil
//type Res = Option[String] :: Option[String] :: HNil
val prog =
RedisTransaction(cmd)
.exec_(operations)
.flatMap {
case res1 ~: res2 ~: HNil =>
putStrLn(s"res1: $res1, res2: $res2")
}
.onError {
case TransactionAborted =>
putStrLn("[Error] - Transaction Aborted")
case TransactionDiscarded =>
putStrLn("[Error] - Transaction Discarded")
case _: TimeoutException =>
putStrLn("[Error] - Timeout")
}
All Changes
- #245 Scan command impl by @oskin1
- #248 [Docs] - Rename fs2-redis to redis4cats by @zaneli
- #252 [Docs] - Add documentation section to README by @ybasket
- #269 Fix bugs in
zRevRangeWithScores
andzRevRangeByScoreWithScores
by @taeguk - #273 Typed transactions using custom HList
- #276 Simpler package naming
- #277 Pipelining using HLists
- #278 Filter Unit types from HList
Dependency updates
Thanks to all the contributors! 🎉
0.9.4
NOTE: Users making use of transactions are encouraged to upgrade immediately.
Changes
#225 Add support for scripting by @ybasket
#233 Fixing hanging transactions by @gvolpe
#235 Fix timeout unit for BLPOP, BRPOP and BRPOPLPUSH by @ybasket
#236 Let blocking commands take Duration instead of FiniteDuration by @ybasket
Dependency updates
#232 cats-core-2.1.1
#223 lettuce-core-5.2.2.RELEASE
#222 cats-effect-2.1.1
#219 fs2-core-2.2.2
0.9.3
Changes
- Add liftK to RedisCommands to allow changing effect by @Doikor
- Removing test-support module in favor of docker-compose by @gvolpe
Internal changes
- Use context-applied plugin by @gvolpe
- Update sbt: 1.3.6 -> 1.3.7 by @scala-steward
- Update sbt-header: 5.3.1 -> 5.4.0 by @scala-steward
- Update sbt-scalafmt: 1.16 -> 2.3.0 by @SethTisue
- Update sbt-microsites: 1.0.2 -> 1.1.0 by @scala-steward
- Update sbt-mdoc: 2.1.0 -> 2.1.1 by @scala-steward
Dependency updates
- Update fs2: 2.1.0 -> 2.2.1 by @scala-steward
0.9.2
Changes
- #163 Relaxing constraint on
RedisURI.make
by @gvolpe - #165 Support for TTL and PTTL commands by @gvolpe
- #194 Making transactions resource-safe by @gvolpe
- #201 Removed topic from Subscriber.state after unsubscribe by @khrupalyk
Internal changes
- #204 GitHub actions as the new CI build by @gvolpe
- #198 Using Mdoc for the microsite documentation by @gvolpe
- #187 Revamp connections by @ChristopherDavenport
- #186 Minor refactoring by @ChristopherDavenport
Dependency updates
- #203
cats-2.1.0
by @gvolpe - #184 Various upgrades by @ChristopherDavenport
- #166
lettuce-core-5.2.1.RELEASE
0.9.1
Changes
- #158 args support for
set
command by @zakolenko - #155 Add server commands by @PawelJ-PL
- #154 Add KeyCommands api for generic redis commands by @alirezameskin
- #152 Add
exists
command support by @alirezameskin
Dependency Updates
Thanks to all the contributors for this release! 🎉
0.9.0
0.8.3
First release for Scala 2.13.0 🎉 ! And also for Scala 2.12.8 as usual.
Changes
Dependency updates for Scala 2.12.x
Dependency updates for Scala 2.13.x
cats-core-2.0.0-M4
cats-effect-2.0.0-M4
fs2-core-1.1.0-M1
log4cats-0.4.0-M1
scalatest-3.1.0-SNAP13
Thanks to all the contributors!