@keyv/redis 5.1.5 → 5.1.6

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/dist/index.cjs CHANGED
@@ -107,7 +107,7 @@ function createKeyvNonBlocking(connect, options) {
107
107
 
108
108
  // src/index.ts
109
109
  var KeyvRedis = class extends import_hookified.Hookified {
110
- _client = (0, import_client.createClient)();
110
+ _client;
111
111
  _namespace;
112
112
  _keyPrefixSeparator = "::";
113
113
  _clearBatchSize = 1e3;
@@ -154,6 +154,8 @@ var KeyvRedis = class extends import_hookified.Hookified {
154
154
  this._client = (0, import_client.createCluster)(connect);
155
155
  }
156
156
  }
157
+ } else {
158
+ this._client = (0, import_client.createClient)({ socket });
157
159
  }
158
160
  this.setOptions(options);
159
161
  this.initClient();
@@ -870,6 +872,9 @@ var KeyvRedis = class extends import_hookified.Hookified {
870
872
  }
871
873
  }
872
874
  initClient() {
875
+ this._client.on("error", (error) => {
876
+ this.emit("error", error);
877
+ });
873
878
  this._client.on("connect", () => {
874
879
  this.emit("connect", this._client);
875
880
  });
package/dist/index.js CHANGED
@@ -73,7 +73,7 @@ function createKeyvNonBlocking(connect, options) {
73
73
 
74
74
  // src/index.ts
75
75
  var KeyvRedis = class extends Hookified {
76
- _client = createClient();
76
+ _client;
77
77
  _namespace;
78
78
  _keyPrefixSeparator = "::";
79
79
  _clearBatchSize = 1e3;
@@ -120,6 +120,8 @@ var KeyvRedis = class extends Hookified {
120
120
  this._client = createCluster(connect);
121
121
  }
122
122
  }
123
+ } else {
124
+ this._client = createClient({ socket });
123
125
  }
124
126
  this.setOptions(options);
125
127
  this.initClient();
@@ -836,6 +838,9 @@ var KeyvRedis = class extends Hookified {
836
838
  }
837
839
  }
838
840
  initClient() {
841
+ this._client.on("error", (error) => {
842
+ this.emit("error", error);
843
+ });
839
844
  this._client.on("connect", () => {
840
845
  this.emit("connect", this._client);
841
846
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keyv/redis",
3
- "version": "5.1.5",
3
+ "version": "5.1.6",
4
4
  "description": "Redis storage adapter for Keyv",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -45,16 +45,16 @@
45
45
  "hookified": "^1.13.0"
46
46
  },
47
47
  "peerDependencies": {
48
- "keyv": "^5.5.5"
48
+ "keyv": "^5.6.0"
49
49
  },
50
50
  "devDependencies": {
51
- "@biomejs/biome": "^2.3.8",
52
- "@faker-js/faker": "^10.1.0",
53
- "@vitest/coverage-v8": "^4.0.15",
51
+ "@biomejs/biome": "^2.3.11",
52
+ "@faker-js/faker": "^10.2.0",
53
+ "@vitest/coverage-v8": "^4.0.16",
54
54
  "rimraf": "^6.1.2",
55
55
  "timekeeper": "^2.3.1",
56
56
  "tsd": "^0.33.0",
57
- "vitest": "^4.0.15",
57
+ "vitest": "^4.0.16",
58
58
  "@keyv/test-suite": "^2.1.2"
59
59
  },
60
60
  "tsd": {