Breaking Change in connect-redis v8.0.0: Update Required for Wappler Compatibility

We’ve encountered a breaking change in the latest release of the connect-redis package (v8.0.0) that will affect Wappler NodeJS projects after an ncu -u update. Specifically, the package now uses a named export instead of the default export.

Details:

  • Breaking Change: connect-redis has moved from a default export to a named export, causing incompatibility with older versions of the package.
  • Affected Code in Wappler: The issue arises in the /lib/setup/session.js file on line 17, where the connect-redis package is required:
if (options.store.$type == 'redis') { // https://www.npmjs.com/package/connect-redis
    const RedisStore = require('connect-redis').default;
    options.store = new RedisStore(Object.assign({
        client: global.redisClient
    }, options.store));
}

Last stable release is on v7.1.1

3 Likes

Thank you for mentioning it, the current dependency is still version 7 and updating within Wappler will only update to 7.1.1 which is fine.

The change is simple, but as you mention it is a breaking change and not backwards compatible. We will implement it when we update the dependencies. Other than the named export I didn't see changes that would require a direct update to version 8 and it is safe to stay at version 7 for now.

The needed change is:

const RedisStore = require('connect-redis').default;

becomes

const {RedisStore} = require('connect-redis');
1 Like