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

226 Commits

Author SHA1 Message Date
Leibale
debd277002 Release client@1.5.12 2023-11-20 13:48:13 -05:00
Clubsandwich
623b56b5ca fix cluster.sUnsubscribe - make listener optional 2023-11-20 13:40:38 -05:00
Leibale Eidelman
68d835d7a2 fix #2632 - handle socket close in "socket initiator" phase (#2653) 2023-11-20 13:16:36 -05:00
Shaya Potter
a8b81bdd01 Send client user-agent during connection, via CLIENT SETINFO (#2645)
* Add SETINFO support to client connection, with the ability to disable sending the user agent if the end user desires.  * Also enables modifying the user-agent with a tag to enable distinguishing different usages.
2023-11-07 14:43:20 +02:00
Leibale
d1fdf1e7e2 Release client@1.5.11 2023-09-22 07:01:48 -04:00
Leibale
38e9a40d1a fix #2619 #2618 #2617 #2616 - support for node >= 14 2023-09-22 07:00:26 -04:00
Leibale
fef006cc1d Release client@1.5.10 2023-09-19 17:53:20 -04:00
Charley DAVID
e00041e0eb Fix: XAUTOCLAIM after a TRIM with pending messages returns nil (#2565)
* fix(client): XCLAIM & XAUTOCLAIM after a TRIM might return nils

* fix(client): Fix race condition in specs

* revert test utils changes

* make tests faster

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-09-19 17:37:16 -04:00
avinashkrishna613
4ec97be4f0 fix #1956 - add support for LATENCY HISTORY (#2555)
* added support for LATENCY_HISTORY command

* clean code

* Update LATENCY_HISTORY.ts

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-09-19 16:21:54 -04:00
Asher
6848f3d207 Add support for PUBSUB SHARDNUMSUB (#2541)
* Add support for command 'PUBSUB SHARDNUMSUB'

* Use import from PUBSUB_SHARDNUMSUB

* Add test case for non-empty reply

* clean tests

* run tests in redis >= 7, fix integration test

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-09-19 15:59:02 -04:00
Moshe L
01ca54e907 fix #1970 - add support for RESTORE (#2535)
* - Added RESTORE functionality

* add FIRST_KEY_INDEX, fix tests, clean example, add example to examples table

* use returnBuffers in test

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-09-18 19:45:33 -04:00
Evis Cheng
8ecfd3ebda Add support for CLUSTER MYSHARDID (#2528)
* Add support for CLUSTER.MYSHARDID command

* Update CLUSTER_MYSHARDID.ts

* Update CLUSTER_MYSHARDID.spec.ts

* add test and clean code

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-09-18 19:31:03 -04:00
Leibale
1f97893785 fix ACL GETUSER test 2023-09-18 18:25:13 -04:00
Codrin-Mihai Chira
4e610c2f8a Add support for CLIENT NO-TOUCH (#2497) 2023-09-18 17:49:37 -04:00
Francisco Presencia
fb255eb5d0 Have client.connect() return a Promise<RedisClient> (#2602)
* Connect returns the instance of the client

* Added a test

* No auto setup

* Added a bit of docs

* fix the return type, test, and the docs

* fix return type

* Update packages/client/lib/client/index.spec.ts

Co-authored-by: Francisco Presencia <franciscop@users.noreply.github.com>

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-09-18 17:40:08 -04:00
Leibale
4976231f24 upgrade deps, remove node 14 & 16 from tests matrix 2023-09-18 17:23:01 -04:00
Leibale
504a05baad Release client@1.5.9 2023-08-23 15:16:51 -04:00
Leibale
fe74e322dd upgrade deps 2023-08-23 14:53:26 -04:00
Joren Vandeweyer
bc8abd5a38 fixes #2524 delaying graceful exit while pingInterval is set (#2525)
* fixes #2524

* `clearTimeout` in `disconnect` too

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-08-23 13:20:20 -04:00
Leibale
2baf5df23c Release client@1.5.8 2023-05-31 15:46:32 +03:00
Leibale Eidelman
0298c1ac41 upgrade deps (#2517)
* upgrade deps

* fix graph tests
2023-05-29 09:01:34 -04:00
Leibale Eidelman
100a5232ac use setImmediate instead of queueMicrotask (to improve performance) (#2516) 2023-05-29 09:01:22 -04:00
Kumar Arnav
e696653bf9 Add support for LATENCY LATEST (#2514)
* Add support for LATENCY LATEST.

* Fix the review comments.

* Fix the review comments.

* Update LATENCY_LATEST.ts

* Update dockers.ts

* Update LATENCY_GRAPH.spec.ts

* enable debug mode in tests

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-05-29 09:00:58 -04:00
Codrin-Mihai Chira
d4f194352f XINFO CONSUMERS - add support for the inactive field (#2490)
* Support XINFO CONSUMERS: Added the inactive field

* Update XINFO_CONSUMERS.ts

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-05-21 08:06:46 -04:00
Leibale
e8e09a7b5b Release client@1.5.7 2023-04-27 18:46:40 -04:00
Leibale Eidelman
dc920d3b67 fix isolationPool after reconnect (#2409)
* fix #2406 - fix isolationPool after reconnect

* revert breaking change

* fix
2023-04-26 14:44:09 -04:00
Leibale Eidelman
ba31c8a50e fix #2443 - fix multiple sockets on error in socket initiator (#2480)
* fix #2443 - fix multiple sockets on error in socket initiator

* handle `error` events in test
2023-04-26 12:56:42 -04:00
Carl Hopf
e1658ba6ef fix cluster extractFirstKey skip commandOptions() passed to args (#2439)
* cluster extractFirstKey skip commandOptions() passed to args

* cluster with commandOptions unit test

* improve performance

* fix type

* fix type

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-04-26 12:56:04 -04:00
Gady
c88dea6151 Augment subpackages npm info (#2478)
* augment subpackages npm info

* some more keywords

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-04-24 12:41:44 -04:00
sorilove
9f2e27d07d Fixed a bug in the updateIsActive function (#2476)
Missing PubSubType.SHARDED and duplicate comparison of PubSubType.CHANNELS when comparing listeners size in updateIsActive function
2023-04-24 12:41:30 -04:00
Leibale
f756d9aaa9 Release client@1.5.6 2023-02-24 18:10:07 -05:00
Leibale Eidelman
4937efca6b upgrade dependencies (#2426) 2023-02-24 18:05:43 -05:00
Leibale Eidelman
e95b258dca fix #2419 - fix RESP2 array decoder in edge cases (#2424) 2023-02-24 17:34:19 -05:00
Leibale Eidelman
63e5228ce6 fix #2411 - export RedisFlushModes (#2425) 2023-02-24 17:34:00 -05:00
Mik13
0f28dad2a2 Execute empty MULTI (#2423)
* Fix multi.exec with empty queue and previous watch

When calling exec on a multi instance which you did not use, no command is sent currently.

This is a problem for watched keys, because no EXEC means no unwatch, which might cause hard-to-debug problems.

Proposed Fix: Sending UNWATCH

* execute empty multi command (instead of skipping)

* Update index.ts

* Update index.ts

* Update multi-command.ts

* Update multi-command.ts

* Update multi-command.ts

* Update multi-command.ts

* short circuit empty pipelines

* Update index.ts

---------

Co-authored-by: Leibale <me@leibale.com>
2023-02-24 17:33:16 -05:00
Leibale
e4229a40b6 Release client@1.5.5 2023-01-30 14:27:42 -05:00
Leibale Eidelman
7cb467ad23 fix #2398 - fix v4 interface in legacyMode (#2402) 2023-01-30 14:24:11 -05:00
Leibale
f1e951debe Release client@1.5.4 2023-01-28 18:24:14 -05:00
Leibale Eidelman
b3cd78503d fix reconnecting event (#2396)
* fix #2395 - fix reconnecting event

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

* upgrade dependencies

* fix v3 benchmark

* update package-lock.json
2023-01-25 13:05:42 -05:00
Leibale Eidelman
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
Ananda
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
Benjie
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