Redis Node.js Client Release Notes
๐ New Features
- EntraID added support for azure identity by @bobymicroby in https://github.com/redis/node-redis/pull/2901
- Added HGETEX, HSETEX, HGETDEL hash field expiration commands by @htemelski in https://github.com/redis/node-redis/pull/2907
- feat(auth): add Entra ID identity provider integration for Redis client authentication by @bobymicroby in https://github.com/redis/node-redis/pull/2877
- RESP3 support : Node Redis v5 adds support for RESP3, the new Redis serialization protocol introduced in Redis 6.0. RESP3 offers richer data types and improved type handling compared to RESP2
- Sentinel: Redis Sentinel provides high availability for Redis through monitoring, automatic failover, and client-side support.
- Type mapping: Version five allows you configuring the type mapping. Responses can be mapped to objects, arrays, or maps. Likewise, numeric formats can be mapped to either strings or numbers.
๐ ๏ธ Improvements
BREAKING CHANGES
client.ft.search('index', '*', {DIALECT: 1})
-
Client Configuration:
keepAlive option has been split into keepAlive (boolean) and keepAliveInitialDelay (number)
- Legacy mode is now accessed via
.legacy() method instead of { legacyMode: true }
-
Command Options:
- New API uses "proxy client" to store options instead of passing them directly to commands
- Example:
client.withCommandOptions({ ... }).get('key') instead of client.get(client.commandOptions({ ... }), 'key')
-
Connection Management:
client.QUIT/quit() is replaced by client.close()
client.disconnect() has been renamed to client.destroy()
-
Scan Iterators:
- Now yield collections of items instead of individual items
- Example:
for await (const keys of client.scanIterator()) { ... } returns arrays of keys
-
Isolation Pool:
- Superseded by
RedisClientPool for better separation of concerns
-
Cluster Multi:
cluster.multi().addCommand() now requires isReadonly parameter for replica execution support
-
Boolean to Number Types:
- Many commands now return numbers (0/1) instead of booleans for better Redis protocol alignment
- Affects: COPY, EXPIRE, EXPIREAT, HEXISTS, HSETNX, MOVE, PEXPIRE, PEXPIREAT, PFADD, RENAMENX, SETNX, etc.
-
API Changes:
- Many commands have updated parameter names and return types
- Enums replaced with constants (e.g.,
RedisFlushModes โ REDIS_FLUSH_MODES)
- Module-specific commands (JSON, Search, Time Series) have parameter restructuring
Full migration details: https://github.com/redis/node-redis/blob/master/docs/v4-to-v5.md
New Contributors