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

19 Commits

Author SHA1 Message Date
Leibale Eidelman
13ad249ae6 fix #2010 - stop reconnect after .disconnect() (#2323)
* fix #2010 - stop reconnect after .disconnect()

* fix quit
2022-11-24 14:03:34 -05:00
Jonas Faure
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
Leibale Eidelman
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
Leibale Eidelman
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
Leibale Eidelman
23b65133c9 New RESP2 parser (#1899)
* parser

* a new RESP parser :)

* clean code

* fix simple string and bulk string cursor

* performance improvements

* change typescript compiler target

* do not use stream.Transform

* Update decoder.ts

* fix for 1d09acb

* improve integer performance

* revert 1d09acb

* improve RESP2 decoder performance

* improve performance

* improve encode performance

* remove unused import

* upgrade benchmark deps

* clean code

* fix socket error handlers, reset parser on error

* fix #2080 - reset pubSubState on socket error

* reset decoder on socket error

* fix pubsub

* fix "RedisSocketInitiator"

* fix returnStringsAsBuffers

* fix merge
2022-04-25 08:24:33 -04:00
Leibale Eidelman
e6de453fdd fix socket error handlers (#2092)
* fix socket error handlers, reset parser on error

* fix #2080 - reset pubSubState on socket error

* fix pubsub

* fix "RedisSocketInitiator"
2022-04-25 05:47:51 -04:00
Leibale Eidelman
c473c5fcce call setKeepAlive after the connect event (#2074) 2022-04-11 13:28:03 -04:00
Matan Yemini
741aff0c30 update tls type to be boolean instead of "true" (RedisTlsSocketOptions) (#1851)
* update tls type to be boolean instead of "true"

* Update socket.ts

* Update socket.ts

* Update socket.ts

Co-authored-by: Matan Yemini <matan@engageli.com>
Co-authored-by: Leibale Eidelman <leibale1998@gmail.com>
2022-01-31 04:33:11 -05:00
Leibale Eidelman
7ded3dd79f fix #1846 - handle arguments that are not buffers or strings (#1849)
* fix #1846 - handle arguments that are not buffers or strings

* use toString() instead of throw TypeError

* remove .only and uncomment tests
2022-01-24 12:04:30 -05:00
leibale
7e2059b1cf ref #1789 - reject "hanging" promises when closing connection 2022-01-03 16:24:59 -05:00
leibale
74daee3023 fix #1801 2021-12-29 14:28:22 -05:00
leibale
b70aa4e470 fix for e11256854e - should not retry connecting if failed due to wrong auth 2021-12-09 02:48:10 -05:00
leibale
e11256854e fix #1771 - fix PubSub resubscribe 2021-12-08 10:27:29 -05:00
leibale
2d2d58d881 fix #1741 - change default to localhost and update docs 2021-11-27 22:53:59 -05:00
leibale
e81bf64914 ref #1741 - fix socket options type 2021-11-27 22:36:18 -05:00
Evert Pot
7d2629f083 Support esModuleInterop set to false. (#1717)
* Support esModuleInterop set to false.

When testing the upcoming 4.x release, we got a bunch of typescript
errors emitted from this project.

We quickly realized this is because the library uses the esModuleInterop
flag. This makes some imports _slightly_ easier to write, but it comes
at a cost: it forces any application or library using this library to
*also* have esModuleInterop on.

The `esModuleInterop` flag is a bit of a holdover from an earlier time,
and I would not recommend using it in libraries. The main issue is that
if it's set to true, you are forcing any users of the library to also
have `esModuleInterop`, where if you keep have it set to `false` (the
default), you leave the decision to the user.

This change should have no rammifications to users with
`esModuleInterop` on, but it will enable support for those that have it
off.

This is especially good for library authors such as myself, because I
would also like to keep this flag off to not force *my* users into this
feature.

* All tests now pass!

* Move @types/redis-parser into client sub-package

and removed a comma
2021-11-15 16:52:48 -05:00
Leibale Eidelman
a6a1637686 Update socket.ts 2021-11-11 00:45:34 -05:00
Da-Jin Chu
d4f63219af Add rejectedUnauthorized and other TLS options (#1708) 2021-11-10 23:44:22 -05:00
leibale
3eb99dbe83 use dockers for tests, use npm workspaces, add rejson & redisearch modules, fix some bugs 2021-11-08 19:21:15 -05:00