ioredis
6.1.0 · 23 Nov 2026MIT45.2M / weekRepositoryHomepagenpmAtom feed
4.31.0 is the newest release of 4.x.
In short
7 breaking1 security7 new1 faster5 fixed
- Breaking
**This is a major release and contain breaking changes.
- Breaking
Drop support for < node v6
- Breaking
Use native Promise instead of Bluebird. This change makes all the code that rely on the features provided by Bluebird not working anymore. For example,
redis.get('foo').timeout(500)now should be failed since the native Promise doesn't support thetimeoutmethod. You can switch back to the Bluebird implementation by settingRedis.Promise: - Breaking
Redis#connect()will be resolved when status is ready instead ofconnect: - Breaking
Cluster#connect()will be resolved when the connection status becomereadyinstead ofconnect. - Breaking
The maxRetriesPerRequest is set to 20 instead of null (same behavior as ioredis v3) by default. So when a redis server is down, pending commands won't wait forever until the connection become alive, instead, they only wait about 10s (depends on the retryStrategy option)
- Breaking
The
newkeyword is required explicitly. CallingRedisas a function like Redis(/* options /)is deprecated and will not be supported in the next major version, usenew Redis(/ options */)` instead. - Security
Solves vulnerabilities dependencies
Release note
This is a major release and contain breaking changes. Please read this changelog before upgrading.
Changes since 4.0.0-3
Bug Fixes
Features
Export Pipeline for inheritances enabling
Export ScanStream at package level
Changes since 3.x
Bug Fixes
Sentinel: unreachable errors when sentinals are healthy
Resolve warning for Buffer() in Node.js 10
Don't add cluster.info to the failover queue before ready
- Security
Solves vulnerabilities dependencies
Cluster: issues when setting enableOfflineQueue to false
Performance Improvements
Upgrade redis-parser for better performance.
Features
Use native Promise instead of Bluebird, and allow users to switch back.
Add maxRetriesPerRequest option to limit the retries attempts per command
Redis#connect()will be resolved when status is readyAdd debug details for connection pool
Wait for ready state before resolving cluster.connect()
Breaking changes
- Breaking
Drop support for < node v6
- Breaking
Use native Promise instead of Bluebird. This change makes all the code that rely on the features provided by Bluebird not working
anymore. For example,redis.get('foo').timeout(500)now should be failed since the native
Promise doesn't support thetimeoutmethod. You can switch back to the Bluebird
implementation by settingRedis.Promise:
const Redis = require('ioredis')
Redis.Promise = require('bluebird')
const redis = new Redis()
// Use bluebird
assert.equal(redis.get().constructor, require('bluebird'))
// You can change the Promise implementation at any time:
Redis.Promise = global.Promise
assert.equal(redis.get().constructor, global.Promise)- Breaking
Redis#connect()will be resolved when status is ready
instead ofconnect:
const redis = new Redis({ lazyConnect: true })
redis.connect().then(() => {
assert(redis.status === 'ready')
})- Breaking
Cluster#connect()will be resolved when the connection
status becomereadyinstead ofconnect. - Breaking
The maxRetriesPerRequest is set to 20 instead of null (same behavior as ioredis v3)
by default. So when a redis server is down, pending commands won't wait forever
until the connection become alive, instead, they only wait about 10s (depends on the
retryStrategy option) - Breaking
The
newkeyword is required explicitly. CallingRedisas a function like
Redis(/* options /)is deprecated and will not be supported in the next major version, usenew Redis(/ options */)` instead.
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.