1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-03 04:01:40 +03:00
Commit Graph

191 Commits

Author SHA1 Message Date
e4229a40b6 Release client@1.5.5 2023-01-30 14:27:42 -05:00
7cb467ad23 fix #2398 - fix v4 interface in legacyMode (#2402) 2023-01-30 14:24:11 -05:00
f1e951debe Release client@1.5.4 2023-01-28 18:24:14 -05:00
b3cd78503d fix reconnecting event (#2396)
* fix #2395 - fix reconnecting event

* Update socket.ts
2023-01-28 18:20:48 -05:00
be335efc20 Release client@1.5.3 2023-01-27 09:47:16 -05:00
2dba7f200b fix #2392 - handle errors in legacyMode (#2394) 2023-01-27 09:45:22 -05:00
92043563f2 Release client@1.5.2 2023-01-25 20:46:05 -05:00
c6587e219a Release client@1.5.1 2023-01-25 20:38:56 -05:00
3bd28a9924 fix #2391 - remove node: prefix from imports 2023-01-25 20:37:00 -05:00
4904fe4a5d Release client@1.5.0 2023-01-25 13:23:58 -05:00
e9de74c96f revert client version to 1.4.2 2023-01-25 13:23:28 -05:00
0a46fcbdaf upgrade dependencies (#2381)
* upgrade deps

* upgrade dependencies

* fix v3 benchmark

* update package-lock.json
2023-01-25 13:05:42 -05:00
3b1bad2296 Add support for sharded PubSub (#2373)
* refactor pubsub, add support for sharded pub sub

* run tests in redis 7 only, fix PUBSUB SHARDCHANNELS test

* add some comments and fix some bugs

* PubSubType, not PubSubTypes 🤦‍♂️

* remove test.txt

* fix some bugs, add tests

* add some tests

* fix #2345 - allow PING in PubSub mode (remove client side validation)

* remove .only

* revert changes in cluster/index.ts

* fix tests minimum version

* handle server sunsubscribe

* add 'sharded-channel-moved' event to docs, improve the events section in the main README (fix #2302)

* exit "resubscribe" if pubsub not active

* Update commands-queue.ts

* Release client@1.5.0-rc.0

* WIP

* use `node:util` instead of `node:util/types` (to support node 14)

* run PubSub resharding test with Redis 7+

* fix inconsistency in live resharding test

* add some tests

* fix iterateAllNodes when starting from a replica

* fix iterateAllNodes random

* fix slotNodesIterator

* fix slotNodesIterator

* clear pubSubNode when node in use

* wait for all nodes cluster state to be ok before testing

* `cluster.minimizeConections` tests

* `client.reconnectStrategry = false | 0` tests

* sharded pubsub + cluster 🎉

* add minimum version to sharded pubsub tests

* add cluster sharded pubsub live reshard test, use stable dockers for tests, make sure to close pubsub clients when a node disconnects from the cluster

* fix "ssubscribe & sunsubscribe" test

* lock search docker to 2.4.9

* change numberOfMasters default to 2

* use edge for bloom

* add tests

* add back getMasters and getSlotMaster as deprecated functions

* add some tests

* fix reconnect strategy + docs

* sharded pubsub docs

* Update pub-sub.md

* some jsdoc, docs, cluster topology test

* clean pub-sub docs

Co-authored-by: Simon Prickett <simon@redislabs.com>

* reconnect startegy docs and bug fix

Co-authored-by: Simon Prickett <simon@redislabs.com>

* refine jsdoc and some docs

Co-authored-by: Simon Prickett <simon@redislabs.com>

* I'm stupid

* fix cluster topology test

* fix cluster topology test

* Update README.md

* Update clustering.md

* Update pub-sub.md

Co-authored-by: Simon Prickett <simon@redislabs.com>
2023-01-25 11:00:39 -05:00
e75a5db3e4 Add CLIENT LIST command and fix CLIENT INFO (#2368)
* fix client info

* add client list

* fix key validation in transformClientInfoReply

* fix issue with field in CLIENT LIST reply

* clean code

* fix multimem

* fix qbufFree argvMem totMem multiMem

Co-authored-by: Leibale <me@leibale.com>
2023-01-25 10:52:59 -05:00
2287efdd1e Fix legacyMode/pingInterval issue (#2386)
* Add a test for legacyMode pingInterval

* Apply patch to fix legacy mode ping interval

* use this.#sendCommand instead of this.#v4

Co-authored-by: Leibale <me@leibale.com>
2023-01-24 20:11:48 -05:00
63511e5b9b Add latency graph command (#2359)
* add latency graph command

* fix coding style

* Clean code

* use "enable-debug-command" is redis 7+ only

* Update LATENCY_GRAPH.spec.ts

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-01-18 12:55:38 -05:00
fad23973a5 fix #2333 - fix quit reply (#2346) 2023-01-18 12:55:11 -05:00
aa75ee49c6 #2038 Resolve legacy mode hGetAll returning in the wrong format compared to v3 results (#2367)
* Ensure that transformReply is optionally passed through to commands in legacy mode within multi

* Execute transformReply on legacy #sendCommand

* Scope transform changes to hGetAll

* Extensible method of transforming legacy replies, expands RedisCommand interface

* check `TRANSFORM_LEGACY_REPLY` on client creation (rather then on command exec), add tests

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-01-18 12:54:29 -05:00
c5b6f77c33 exclude dist from coverage report 2022-12-26 13:35:37 -05:00
f6093b7b0f fix: zero ttl is ignored (#2349)
* fix: zero ttl is ignored

* Update SET.ts

* Update SET.ts

Co-authored-by: Leibale Eidelman <me@leibale.com>
2022-12-15 12:04:13 -05:00
1557164b1c Release client@1.4.2 2022-11-24 14:10:38 -05:00
549a779a01 Merge branch 'master' of github.com:redis/node-redis 2022-11-24 14:06:20 -05:00
3b36963986 Release client@1.4.1 2022-11-24 14:05:42 -05:00
13ad249ae6 fix #2010 - stop reconnect after .disconnect() (#2323)
* fix #2010 - stop reconnect after .disconnect()

* fix quit
2022-11-24 14:03:34 -05:00
28b9701543 fix #2318 - add MULTI (uppercase) (#2324) 2022-11-24 14:01:43 -05:00
d923f7127a fix #2205 - reject commands in connect phase when disableOfflineQueue is true (#2328) 2022-11-24 14:01:09 -05:00
e5532706cf fix #2205 - reject commands in connect phase when disableOfflineQueue is true 2022-11-16 16:27:36 -05:00
2e6fdee052 Release client@1.4.0 2022-11-10 03:56:23 -05:00
3c2f7ab92a Ping interval (#2321)
* fix #1598 fix #2276 - add `pingInterval` to client config

* setPingTimer on ready (instead of on connect)

* use isReady (instead of isOpen) and fix test

* Update client-configuration.md
2022-11-10 03:49:56 -05:00
aa869b72d4 Release client@1.3.1 2022-11-01 16:12:15 -04:00
252c2192ea fix(client): Avoids infinite promise-chaining when socket's creation fails (#2295)
* fix(client): timeout issues during tests

* fix(client): avoiding infinite Promise chaining while socket creation fails

* fix(client): Added missing semicolons

* clean test

Co-authored-by: leibale <leibale1998@gmail.com>
2022-10-26 16:42:52 -04:00
c413657357 Reject multi.exec() promise with ClientClosedError after client disconnect (#2293)
* Add reject multi chain on client disconnect assertion to client test suite

* Reject multi chain exec with client closed error after client disconnect
2022-10-26 16:40:14 -04:00
0abd950f03 fix tsbuild (#2307)
* fix tsbuild

* fix tsbuild

* fix tsbuild
2022-10-26 15:32:19 -04:00
29f734f60e upgrade dependencies (#2306) 2022-10-26 14:47:10 -04:00
2a8e11a51d Export SetOptions type in redis/client command (#2268)
* Export setOptions type

* Export setOptions type in commands

* Revert "Export setOptions type in commands"

* Export SetOptions type in redis client

* Export SetOptions type in @redis/client

* Fix lint
2022-09-21 17:05:16 -04:00
e1c0580d65 Fix CLUSTER_NODES ipv6 address parsing (#2269) 2022-09-19 13:31:21 -04:00
c73c3ef6fd Release client@1.3.0 2022-08-22 18:28:28 -04:00
35be671332 upgrade dependencies (#2242) 2022-08-22 18:23:43 -04:00
942de1f0b4 Handle unhandled errors in socket.reconnectStrategry (#2226)
* handle errors in reconnect strategy

* add test

* fix retries typo

* fix #2237 - flush queues on reconnect strategy error

* Update socket.ts

* Update socket.ts
2022-08-22 17:59:45 -04:00
ac032d82a0 fix: loop over arguments instead of spreading (#2160)
* fix: loop over arguments instead of spreading

* update to use concat

* use the returned array from pushVerdictArguments (instead of assuming it'll push to the original array)

* fix "Type 'RedisCommandArguments' is not assignable to type 'string[]'."

* fix "Argument of type 'RedisCommandArgument | RedisCommandArguments[]' is not assignable to parameter of type 'RedisCommandArgument | RedisCommandArgument[]'"

* fix "Type 'RedisCommandArguments' is not assignable to type 'string[]'"

Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
2022-07-13 07:01:35 -04:00
71d582368a Add support for client.unref() and client.ref() (#2188)
* close #2185 - add support for client.unref() and client.ref()

* allow sync tests
2022-07-13 07:01:20 -04:00
f9f5e494dd fixed MIGRATE function when key is array (#2184)
* fix: 2163 push empty string as arg

* fix: updated migrate test with keys array
2022-07-07 14:33:58 -04:00
704cf5ad34 Release client@1.2.0 2022-07-05 11:44:06 -04:00
9ffc30c727 upgrade deps 2022-07-05 11:42:43 -04:00
25b76d460b Merge branch 'master' of github.com:redis/node-redis 2022-06-30 13:38:29 -04:00
11e6d495b0 Release client@1.1.1 2022-06-30 13:29:56 -04:00
6a850d36ae upgrade deps, fix "invalid save argument" error (#2174) 2022-06-30 13:07:29 -04:00
82f43d9a53 Fix issue with buffers in objects using hSet (#2139)
* Fix issue with buffers in objects using hSet

When using hSet with an object, any buffer values inside the object are converted to strings instead of left as buffers.
This fix specifically handles the special case of buffers, whilst casting everything else strings (to continue "gracefully" handling the case where the value not a valid type).

* Update HSET.ts

* Update HSET.spec.ts

Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
2022-05-26 09:56:10 -04:00
bf80c163b1 fix #2046 - add support for multi in select (#2133)
* fix #2046 - add support for multi in select

* fix "Argument of type 'symbol | undefined' is not assignable to parameter of type 'number | undefined'"
2022-05-26 09:55:47 -04:00
7196b907e5 fix #1915 - CLIENT TRACKINGINFO (#2127)
* fix #1915 - CLIENT TRACKINGINFO

* remove .only
2022-05-12 13:05:27 -04:00