@keyv/redis 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keyv/redis",
3
- "version": "2.3.0",
3
+ "version": "2.3.1",
4
4
  "description": "Redis storage adapter for Keyv",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -9,9 +9,9 @@
9
9
  "clean": "rm -rf node_modules && rm -rf .nyc_output && rm -rf coverage.lcov"
10
10
  },
11
11
  "xo": {
12
- "extends": "xo-lukechilds",
13
12
  "rules": {
14
- "unicorn/prefer-module": 0
13
+ "unicorn/prefer-module": 0,
14
+ "unicorn/prefer-node-protocol": 0
15
15
  }
16
16
  },
17
17
  "ava": {
@@ -47,7 +47,6 @@
47
47
  "@keyv/test-suite": "*",
48
48
  "ava": "^4.1.0",
49
49
  "delay": "^5.0.0",
50
- "eslint-config-xo-lukechilds": "^1.0.1",
51
50
  "keyv": "*",
52
51
  "nyc": "^15.1.0",
53
52
  "requirable": "^1.0.5",
package/src/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import EventEmitter from 'node:events';
1
+ import {EventEmitter} from 'events';
2
2
 
3
3
  declare class KeyvRedis extends EventEmitter {
4
4
  readonly ttlSupport: false;
package/src/index.js CHANGED
@@ -1,4 +1,3 @@
1
- // @ts-ignore
2
1
  const EventEmitter = require('events');
3
2
  const Redis = require('ioredis');
4
3
 
@@ -12,7 +11,7 @@ class KeyvRedis extends EventEmitter {
12
11
  if (uri instanceof Redis || uri instanceof Redis.Cluster) {
13
12
  this.redis = uri;
14
13
  } else {
15
- options = { ...(typeof uri === 'string' ? { uri } : uri), ...options };
14
+ options = {...(typeof uri === 'string' ? {uri} : uri), ...options};
16
15
  this.redis = new Redis(options.uri, options);
17
16
  }
18
17