Packages

ioredis

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

Your version

5.0.0

major26 Mar 2022Where it was published

5.11.1 is the newest release of 5.x.

In short

6 breaking1 removed22 new13 fixed

  • Breaking

    slotsRefreshInterval is disabled by default, previously, the default value was 5000.

  • Breaking

    allowUsernameInURI is removed and ioredis will always use the username passed via URI. Previously, the username part in new Redis("redis://username:authpassword@127.0.0.1:6380/4") was ignored unless allowUsernameInURI is 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#serverInfo is 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

    Redis can't be called as a function anymore as it's now a class. Please change Redis() to new Redis(). Note that Redis() 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

  • keyPrefix should work with Buffer (6942cec), closes #1486

  • 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

  • Skip ready check on NOPERM error (b530a0b), closes #1293

  • Support commands added in Redis v7

  • Support defining custom commands via constructor options

  • Support Redis Functions introduced in Redis 7.0

Breaking changes

  • Breaking

    slotsRefreshInterval is disabled by default,
    previously, the default value was 5000.

  • Breaking

    allowUsernameInURI is removed and ioredis will always
    use the username passed via URI.
    Previously, the username part in new Redis("redis://username:authpassword@127.0.0.1:6380/4")
    was ignored unless allowUsernameInURI is 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#serverInfo is 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

    Redis can't be called as a function anymore as it's now a class.
    Please change Redis() to new Redis(). Note that Redis() 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.