ioredis 5.0.1 → 5.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,7 +15,7 @@ Supports Redis >= 2.6.12 and (Node.js >= 12.22.0). Completely compatible with Re
15
15
  ioredis is a robust, full-featured Redis client that is
16
16
  used in the world's biggest online commerce company [Alibaba](http://www.alibaba.com/) and many other awesome companies.
17
17
 
18
- 0. Full-featured. It supports [Cluster](http://redis.io/topics/cluster-tutorial), [Sentinel](http://redis.io/topics/sentinel), [Streams](https://redis.io/topics/streams-intro), [Pipelining](http://redis.io/topics/pipelining), and of course [Lua scripting](http://redis.io/commands/eval), [Redis Functions](https://redis.io/topics/functions-intro), [Pub/Sub](http://redis.io/topics/pubsub) (with the support of binary messages).
18
+ 0. Full-featured. It supports [Cluster](http://redis.io/topics/cluster-tutorial), [Sentinel](https://redis.io/docs/reference/sentinel-clients), [Streams](https://redis.io/topics/streams-intro), [Pipelining](http://redis.io/topics/pipelining), and of course [Lua scripting](http://redis.io/commands/eval), [Redis Functions](https://redis.io/topics/functions-intro), [Pub/Sub](http://redis.io/topics/pubsub) (with the support of binary messages).
19
19
  0. High performance 🚀.
20
20
  0. Delightful API 😄. It works with Node callbacks and Native promises.
21
21
  0. Transformation of command arguments and replies.
@@ -155,6 +155,7 @@ redis.set("mykey", "hello", "EX", 10);
155
155
 
156
156
  See the `examples/` folder for more examples. For example:
157
157
 
158
+ * [TTL](examples/ttl.js)
158
159
  * [Strings](examples/string.js)
159
160
  * [Hashes](examples/hash.js)
160
161
  * [Lists](examples/list.js)
@@ -163,6 +164,8 @@ See the `examples/` folder for more examples. For example:
163
164
  * [Streams](examples/stream.js)
164
165
  * [Redis Modules](examples/module.js) e.g. RedisJSON
165
166
 
167
+ All Redis commands are supported. See [the documentation](http://luin.github.io/ioredis/classes/default.html) for details.
168
+
166
169
  ## Connect to Redis
167
170
 
168
171
  When a new `Redis` instance is created,
@@ -84,7 +84,7 @@ export interface CommonRedisOptions extends CommanderOptions {
84
84
  /**
85
85
  * @default 20
86
86
  */
87
- maxRetriesPerRequest?: number;
87
+ maxRetriesPerRequest?: number | null;
88
88
  /**
89
89
  * @default 10000
90
90
  */
@@ -2321,7 +2321,7 @@ interface RedisCommander<Context extends ClientContext = {
2321
2321
  * - _complexity_: O(N) where N is the number of fields being set.
2322
2322
  * - _since_: 2.0.0
2323
2323
  */
2324
- hmset(key: RedisKey, object: Record<string, string | Buffer | number>, callback?: Callback<"OK">): Result<"OK", Context>;
2324
+ hmset(key: RedisKey, object: object, callback?: Callback<"OK">): Result<"OK", Context>;
2325
2325
  hmset(key: RedisKey, map: Map<string | Buffer | number, string | Buffer | number>, callback?: Callback<"OK">): Result<"OK", Context>;
2326
2326
  hmset(...args: [
2327
2327
  key: RedisKey,
@@ -2361,7 +2361,7 @@ interface RedisCommander<Context extends ClientContext = {
2361
2361
  * - _complexity_: O(1) for each field/value pair added, so O(N) to add N field/value pairs when the command is called with multiple field/value pairs.
2362
2362
  * - _since_: 2.0.0
2363
2363
  */
2364
- hset(key: RedisKey, object: Record<string, string | Buffer | number>, callback?: Callback<number>): Result<number, Context>;
2364
+ hset(key: RedisKey, object: object, callback?: Callback<number>): Result<number, Context>;
2365
2365
  hset(key: RedisKey, map: Map<string | Buffer | number, string | Buffer | number>, callback?: Callback<number>): Result<number, Context>;
2366
2366
  hset(...args: [
2367
2367
  key: RedisKey,
@@ -2949,7 +2949,7 @@ interface RedisCommander<Context extends ClientContext = {
2949
2949
  * - _complexity_: O(N) where N is the number of keys to set.
2950
2950
  * - _since_: 1.0.1
2951
2951
  */
2952
- mset(object: Record<string, string | Buffer | number>, callback?: Callback<"OK">): Result<"OK", Context>;
2952
+ mset(object: object, callback?: Callback<"OK">): Result<"OK", Context>;
2953
2953
  mset(map: Map<string | Buffer | number, string | Buffer | number>, callback?: Callback<"OK">): Result<"OK", Context>;
2954
2954
  mset(...args: [
2955
2955
  ...keyValues: (RedisKey | string | Buffer | number)[],
@@ -2962,7 +2962,7 @@ interface RedisCommander<Context extends ClientContext = {
2962
2962
  * - _complexity_: O(N) where N is the number of keys to set.
2963
2963
  * - _since_: 1.0.1
2964
2964
  */
2965
- msetnx(object: Record<string, string | Buffer | number>, callback?: Callback<"OK">): Result<"OK", Context>;
2965
+ msetnx(object: object, callback?: Callback<"OK">): Result<"OK", Context>;
2966
2966
  msetnx(map: Map<string | Buffer | number, string | Buffer | number>, callback?: Callback<"OK">): Result<"OK", Context>;
2967
2967
  msetnx(...args: [
2968
2968
  ...keyValues: (RedisKey | string | Buffer | number)[],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ioredis",
3
- "version": "5.0.1",
3
+ "version": "5.0.2",
4
4
  "description": "A robust, performance-focused and full-featured Redis client for Node.js.",
5
5
  "main": "./built/index.js",
6
6
  "types": "./built/index.d.ts",