ioredis
6.1.0 · 23 Nov 2026MIT45.2M / weekRepositoryHomepagenpmAtom feed
5.11.1 is the newest release of 5.x.
In short
6 breaking1 removed22 new13 fixed
- Breaking
slotsRefreshIntervalis disabled by default, previously, the default value was 5000. - Breaking
allowUsernameInURIis removed and ioredis will always use the username passed via URI. Previously, theusernamepart innew Redis("redis://username:authpassword@127.0.0.1:6380/4")was ignored unlessallowUsernameInURIis specified:new Redis("redis://username:authpassword@127.0.0.1:6380/4?allowUsernameInURI=true"). Now, if you don't want to send username to Redis, just leave the username part empty:new Redis("redis://:authpassword@127.0.0.1:6380/4") - Breaking
Redis#serverInfois removed. This field is never documented so you very likely have never used it. - Breaking
Support for third-party Promise libraries is dropped. Related methods (
exports.Promise = require('bluebird')) are kept but they don't take any effects. The native Promise will always be used. - Breaking
We now require Node.js v12 or newer.
- Breaking
Rediscan't be called as a function anymore as it's now a class. Please changeRedis()tonew Redis(). Note thatRedis()was already deprecated in the previous version. - Removed
Remove dropBufferSupport option
Release note
In the update of v5, we've made ioredis even more stable and developer-friendly while minimizing the number of breaking changes, so you can spend more time enjoying your life 😄.
Please refer to the guideline to upgrade your projects: 🚀 Upgrading from v4 to v5.
Bug Fixes
Add @ioredis/interface-generator to dev deps
Add missing declaration for callBuffer
Add the missing typing for Redis#call()
Better support for CJS importing
Disable slotsRefreshInterval by default
Fix the NOSCRIPT behavior when using pipelines
Improve typing for auto pipelining
Improve typing for pipeline
Make fields private when possible
Parameter declaration of Redis#duplicate
Pipeline fails when cluster is not ready (af60bb0), closes #1460
- Removed
Remove dropBufferSupport option
Remove unused Command#isCustomCommand
Rename interfaces by dropping prefix I
Reset loaded script hashes to force a reload of scripts after reconnect of redis
Support passing keyPrefix via redisOptions
Features
Add @since to method comments
Add declarations for methods
Add tests for cluster
Always parse username passed via URI
Drop support of Node.js 10
Drop support of third-party Promise libraries
Expose official declarations
Improve typings for cluster
Improve typings for pipeline
Improve typings for smismember
Improve typings for transformers
Improve typings for xread
Pipeline-based script loading
Prepare v5 stable release
Refactor code with modern settings
Support commands added in Redis v7
Support defining custom commands via constructor options
Support Redis Functions introduced in Redis 7.0
Breaking changes
- Breaking
slotsRefreshIntervalis disabled by default,
previously, the default value was 5000. - Breaking
allowUsernameInURIis removed and ioredis will always
use the username passed via URI.
Previously, theusernamepart innew Redis("redis://username:authpassword@127.0.0.1:6380/4")
was ignored unlessallowUsernameInURIis specified:new Redis("redis://username:authpassword@127.0.0.1:6380/4?allowUsernameInURI=true").
Now, if you don't want to send username to Redis, just leave the username part empty:new Redis("redis://:authpassword@127.0.0.1:6380/4") - Breaking
Redis#serverInfois removed. This field is never documented so
you very likely have never used it. - Breaking
Support for third-party Promise libraries is dropped. Related methods (
exports.Promise = require('bluebird')) are kept but they don't take any effects. The native Promise will always be used. - Breaking
We now require Node.js v12 or newer.
- Breaking
Rediscan't be called as a function anymore as it's now a class.
Please changeRedis()tonew Redis(). Note thatRedis()was already deprecated
in the previous version.
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.