Previously, this module only consisted of pure functions. This release introduces the RedisClient
class that uses these same functions under the hood, alongside a new simple queueing mechanism that fixes previous issues with race conditions during concurrent task execution. To migrate, replace functions with RedisClient
methods.
Before:
import { sendCommand } from "https://deno.land/x/r2d2/mod.ts";
const redisConn = await Deno.connect({ port: 6379 });
// Returns "OK"
await sendCommand(redisConn, ["SET", "hello", "world"]);
// Returns "world"
await sendCommand(redisConn, ["GET", "hello"]);
After:
import { RedisClient } from "https://deno.land/x/r2d2/mod.ts";
const redisConn = await Deno.connect({ port: 6379 });
const redisClient = new RedisClient(redisConn);
// Returns "OK"
await redisClient.sendCommand(["SET", "hello", "world"]);
// Returns "world"
await redisClient.sendCommand(["GET", "hello"]);
What's Changed
- BREAKING:
RedisClient
class by @iuioiua in #149 - docs: update description by @iuioiua in #158
- chore: update dependencies by @github-actions in #148
- chore: disable Redis server persistence by @iuioiua in #150
- chore: rework
cov:*
tasks by @iuioiua in #151 - chore: update
bench:dev
task by @iuioiua in #152 - chore: shutdown Redis server after failed tests by @iuioiua in #153
- chore(deps): bump actions/checkout from 3 to 4 by @dependabot in #154
- chore(deps): bump peter-evans/create-pull-request from 4 to 5 by @dependabot in #155
- chore: simplify
update
workflow by @iuioiua in #156 - chore:
update
workflow step order by @iuioiua in #157
New Contributors
- @dependabot made their first contribution in #154
Full Changelog: v1.1.11...v2.0.0