From 3bf4514e2e0c0b76126bb1997103b7555ff4b003 Mon Sep 17 00:00:00 2001 From: Matthijs Dabroek Date: Sat, 4 Jul 2020 23:24:56 +0200 Subject: [PATCH] Release version 2.1.0 --- CHANGELOG.md | 4 ++++ dist/index.js | 4 +++- package.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc1c26f..dff2b5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Changelog +## v2.1.0 - 4 Jul, 2020 + +Added support for using an external Redis instance using the new `redisInstance` parameter. Special thanks to [@marcoreni](https://github.com/marcoreni)! + ## v2.0.0 - 13 Feb, 2020 Removes all Babel related configuration and updates all outdated dependencies. Updating Jest from v20 to v25 revealed that not all tests that asserted a promise rejecting were succeeding as expected. This resulted in the breaking change mentioned below. diff --git a/dist/index.js b/dist/index.js index 7b40650..9fea7dc 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5,7 +5,9 @@ const Redis = require('ioredis'); const redisStore = (...args) => { let redisCache = null; - if (args.length > 0 && args[0].clusterConfig) { + if (args.length > 0 && args[0].redisInstance) { + redisCache = args[0].redisInstance; + } else if (args.length > 0 && args[0].clusterConfig) { const { nodes, options diff --git a/package.json b/package.json index 28a710c..356b620 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "cache-manager-ioredis", "author": "Matthijs Dabroek ", "description": "IORedis store for node-cache-manager", - "version": "2.0.0", + "version": "2.1.0", "license": "MIT", "main": "dist/index.js", "repository": {