ioredis
6.1.0 · 23 Nov 2026MIT45.2M / weekRepositoryHomepagenpmAtom feed
Summary· from the note as AI read it
Security fixUpgrade: this release fixes a security issue.
Security
- Credentials were leaked in error objects; upgrade and review past error logs.
New
- This release adds smart client handoffs: the client listens for Redis maintenance notifications, relaxes command and socket timeouts while maintenance is in progress and moves connections to the new endpoint, so planned upgrades and failovers on Redis Enterprise and Redis Cloud cause fewer errors. Cluster sharded Pub/Sub gets a health check that detects subscribers which stop receiving messages and reconnects them. The command set grows with the Redis 8.12 set member expiration, sorted set move,
- client: smart client handoffs, which handle Redis maintenance notifications with the
maintNotifications,maintEndpointType,maintRelaxedCommandTimeoutandmaintRelaxedSocketTimeoutoptions - cluster: add a health check for sharded subscribers, configured with
shardedSubscriberHealthCheckInterval(default10000ms,nulldisables it) - cluster: add the
subscriberNodeRoleoption to choose the node role for the Pub/Sub subscriber - commands: add the set member expiration commands
SADDEX,SEXPIRE,SEXPIREAT,SEXPIRETIME,SPERSIST,SPEXPIRE,SPEXPIREAT,SPEXPIRETIME,SPTTLandSTTL(Redis 8.12)
In short
1 security8 new48 fixed11 internal
- Security
Redact credentials from the command attached to errors
Release note
Highlights
This release adds smart client handoffs: the client listens for Redis maintenance notifications, relaxes command and socket timeouts while maintenance is in progress and moves connections to the new endpoint, so planned upgrades and failovers on Redis Enterprise and Redis Cloud cause fewer errors. Cluster sharded Pub/Sub gets a health check that detects subscribers which stop receiving messages and reconnects them. The command set grows with the Redis 8.12 set member expiration, sorted set move,BITRANGEINTARRAY and BLESS commands. Many fixes land for reconnection, the selected database, Cluster pipelines and autopipelining, Sentinel and RESP3 decoding.
New Features
client: Smart client handoffs, which handle Redis maintenance notifications with the
maintNotifications,maintEndpointType,maintRelaxedCommandTimeoutandmaintRelaxedSocketTimeoutoptionscluster: Add a health check for sharded subscribers, configured with
shardedSubscriberHealthCheckInterval(default10000ms,nulldisables it)cluster: Add the
subscriberNodeRoleoption to choose the node role for the Pub/Sub subscribercommands: Add the set member expiration commands
SADDEX,SEXPIRE,SEXPIREAT,SEXPIRETIME,SPERSIST,SPEXPIRE,SPEXPIREAT,SPEXPIRETIME,SPTTLandSTTL(Redis 8.12)commands: Add the sorted set move commands
ZMOVE,BZMOVEandZMOVEMEMBER(Redis 8.12), withBZMOVEhandled as a blocking commandcommands: Add
BITRANGEINTARRAY(Redis 8.12)commands: Add the BLESS command family (Redis 8.12)
Bug Fixes
Connection and reconnection
End the client when
quit()ordisconnect()is called while reconnectingReset retry attempts when
connect()is called after the client gave upReset the manual close state when
connect()is called afterendReject unfulfilled commands dropped on reconnect
Handle rejections from auto-resubscribe and
SELECTon reconnectClose the monitor connection when
monitor()rejects
Selected database
Keep the selected database for commands queued while reconnecting
Restore the database selected by a non-lowercase
SELECTafter reconnectingHandle a rejection from the database-restoring
SELECTonreconnectOnError
Cluster lifecycle
Fix the cluster getting stuck in
closeEnd when
quit()ordisconnect()is called while reconnectingStay ended when nodes removed by
disconnect()end lateStop refreshing slots when
disconnect()is called during a refreshDo not fall back to a replica when no primary is left
Map every slot when
stringNumbersis enabledPass the retry delay to the
reconnectingevent
Cluster pipelines and autopipelining
Resend only the redirected command in a pipeline
Do not reject pipeline commands for connecting nodes when the offline queue is disabled
Do not throw when autopipelining meets an uncached slot
Bucket autopipelined
MSETobjects by their first keyHash autopipelined
Bufferkeys by their bytesHash lone surrogates as the UTF-8 that Node sends
Vendor
cluster-key-slotto fix the slot of keys with an empty hash tagAlign autopipeline callbacks for dynamic commands
Cluster Pub/Sub
Keep forwarding sharded messages after reconnecting from
endSupport a zero-argument
SUNSUBSCRIBEwith sharded subscribersMatch
Buffershard channels when unsubscribingEmit sharded subscriber connect errors silently
Inherit
connectTimeoutfor cluster subscribers
Sentinel
Retry unreachable sentinels in a loop instead of recursing
Correct the retry order after node connection failures
Handle errors on failover detector connections
Clean up failover subscriptions after
quit()
Pub/Sub
Keep subscriber mode while other channel kinds remain subscribed
Resolve an argument-less
UNSUBSCRIBE/PUNSUBSCRIBEonce its own kind is empty
RESP and replies
Decode RESP3 attribute replies instead of failing the connection
Decode RESP3 doubles with
NumberDecode integer replies up to
Number.MAX_SAFE_INTEGERexactlyKeep
String.prototypein fast mode after definingVerbatimStringApply the legacy reply shape to uppercase command names
Commands and errors
Redact credentials from the command attached to errors
Keep the
exec()error out of its ownpreviousErrorsPreserve empty keys and
MATCHpatterns in scan streams
Types
Accept field arrays in
hmget/hmgetBufferAccept
string | stringfordelAllow a number for the
zrangestop argumentAccept the documented TLS profile options
Add event overloads to the
ClusterinterfaceAdd
smessageandsmessageBufferevent overloads
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.