Packages

ioredis

6.1.0 · 23 Nov 2026MIT45.2M / weekRepositoryHomepagenpmAtom feed

Your version

6.1.0

Latest23 Nov 2026Where it was published

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, maintRelaxedCommandTimeout and maintRelaxedSocketTimeout options
  • cluster: add a health check for sharded subscribers, configured with shardedSubscriberHealthCheckInterval (default 10000 ms, null disables it)
  • cluster: add the subscriberNodeRole option 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, SPTTL and STTL (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, maintRelaxedCommandTimeout and maintRelaxedSocketTimeout options

  • cluster: Add a health check for sharded subscribers, configured with shardedSubscriberHealthCheckInterval (default 10000 ms, null disables it)

  • cluster: Add the subscriberNodeRole option 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, SPTTL and STTL (Redis 8.12)

  • commands: Add the sorted set move commands ZMOVE, BZMOVE and ZMOVEMEMBER (Redis 8.12), with BZMOVE handled as a blocking command

  • commands: Add BITRANGEINTARRAY (Redis 8.12)

  • commands: Add the BLESS command family (Redis 8.12)

Bug Fixes

Connection and reconnection

  • End the client when quit() or disconnect() is called while reconnecting

  • Reset retry attempts when connect() is called after the client gave up

  • Reset the manual close state when connect() is called after end

  • Reject unfulfilled commands dropped on reconnect

  • Handle rejections from auto-resubscribe and SELECT on reconnect

  • Close 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 SELECT after reconnecting

  • Handle a rejection from the database-restoring SELECT on reconnectOnError

Cluster lifecycle

  • Fix the cluster getting stuck in close

  • End when quit() or disconnect() is called while reconnecting

  • Stay ended when nodes removed by disconnect() end late

  • Stop refreshing slots when disconnect() is called during a refresh

  • Do not fall back to a replica when no primary is left

  • Map every slot when stringNumbers is enabled

  • Pass the retry delay to the reconnecting event

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 MSET objects by their first key

  • Hash autopipelined Buffer keys by their bytes

  • Hash lone surrogates as the UTF-8 that Node sends

  • Vendor cluster-key-slot to fix the slot of keys with an empty hash tag

  • Align autopipeline callbacks for dynamic commands

Cluster Pub/Sub

  • Keep forwarding sharded messages after reconnecting from end

  • Support a zero-argument SUNSUBSCRIBE with sharded subscribers

  • Match Buffer shard channels when unsubscribing

  • Emit sharded subscriber connect errors silently

  • Inherit connectTimeout for 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 / PUNSUBSCRIBE once its own kind is empty

RESP and replies

  • Decode RESP3 attribute replies instead of failing the connection

  • Decode RESP3 doubles with Number

  • Decode integer replies up to Number.MAX_SAFE_INTEGER exactly

  • Keep String.prototype in fast mode after defining VerbatimString

  • Apply 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 own previousErrors

  • Preserve empty keys and MATCH patterns in scan streams

Types

  • Accept field arrays in hmget / hmgetBuffer

  • Accept string | string for del

  • Allow a number for the zrange stop argument

  • Accept the documented TLS profile options

  • Add event overloads to the Cluster interface

  • Add smessage and smessageBuffer event 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.