diff --git a/.changeset/spicy-nails-work.md b/.changeset/spicy-nails-work.md deleted file mode 100644 index 35d789b2..00000000 --- a/.changeset/spicy-nails-work.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -'@tirke/node-cache-manager-ioredis': major ---- - -node-cache-manager-ioredis is now compatible with new cache-manager@5 major version - -The new major version of `cache-manager` introduced breaking changes around the API to create a cache manager instance. -I also had to rewrite most code because `cache-manager` is now based on promises everywhere so I could ditch the callbacks. -Examples in the README have been updated to reflect the changes. - -For a before / after example: - -```typescript -// Before - -import { IoRedisStore } from '@tirke/node-cache-manager-ioredis' -import { caching } from 'cache-manager' - -const redisCache = caching({ - store: IoRedisStore, - host: 'localhost', // default value - port: 6379, // default value - password: 'XXXXX', - ttl: 600, -}) -``` - -```typescript -// After - -import { ioRedisStore, RedisCache } from '@tirke/node-cache-manager-ioredis' -import { caching } from 'cache-manager' - -const redisCache: RedisCache = caching(ioRedisStore, { - host: 'localhost', // default value - port: 6379, // default value - password: 'XXXXX', - ttl: 600, -}) -``` diff --git a/packages/node-cache-manager-ioredis/CHANGELOG.md b/packages/node-cache-manager-ioredis/CHANGELOG.md index 2cb77459..b5cbad91 100644 --- a/packages/node-cache-manager-ioredis/CHANGELOG.md +++ b/packages/node-cache-manager-ioredis/CHANGELOG.md @@ -1,5 +1,46 @@ # @tirke/node-cache-manager-ioredis +## 3.0.0 + +### Major Changes + +- [`40f233d`](https://github.com/Tirke/node-cache-manager-ioredis/commit/40f233d7756ca813a6e0d607054601e15b6840ff) Thanks [@Tirke](https://github.com/Tirke)! - node-cache-manager-ioredis is now compatible with new cache-manager@5 major version + + The new major version of `cache-manager` introduced breaking changes around the API to create a cache manager instance. + I also had to rewrite most code because `cache-manager` is now based on promises everywhere so I could ditch the callbacks. + Examples in the README have been updated to reflect the changes. + + For a before / after example: + + ```typescript + // Before + + import { IoRedisStore } from '@tirke/node-cache-manager-ioredis' + import { caching } from 'cache-manager' + + const redisCache = caching({ + store: IoRedisStore, + host: 'localhost', // default value + port: 6379, // default value + password: 'XXXXX', + ttl: 600, + }) + ``` + + ```typescript + // After + + import { ioRedisStore, RedisCache } from '@tirke/node-cache-manager-ioredis' + import { caching } from 'cache-manager' + + const redisCache: RedisCache = caching(ioRedisStore, { + host: 'localhost', // default value + port: 6379, // default value + password: 'XXXXX', + ttl: 600, + }) + ``` + ## 2.1.0 ### Minor Changes diff --git a/packages/node-cache-manager-ioredis/package.json b/packages/node-cache-manager-ioredis/package.json index a3ffc968..5117acd7 100644 --- a/packages/node-cache-manager-ioredis/package.json +++ b/packages/node-cache-manager-ioredis/package.json @@ -1,6 +1,6 @@ { "name": "@tirke/node-cache-manager-ioredis", - "version": "2.1.0", + "version": "3.0.0", "type": "commonjs", "repository": "https://github.com/Tirke/node-cache-manager-ioredis", "funding": "https://github.com/sponsors/tirke",