Comparing version 5.0.0-beta.3 to 5.0.0-beta.4
@@ -47,3 +47,21 @@ "use strict"; | ||
if (options.keyPrefix) { | ||
this._iterateKeys((key) => options.keyPrefix + key); | ||
// @ts-expect-error | ||
const isBufferKeyPrefix = options.keyPrefix instanceof Buffer; | ||
// @ts-expect-error | ||
let keyPrefixBuffer = isBufferKeyPrefix | ||
? options.keyPrefix | ||
: null; | ||
this._iterateKeys((key) => { | ||
if (key instanceof Buffer) { | ||
if (keyPrefixBuffer === null) { | ||
keyPrefixBuffer = Buffer.from(options.keyPrefix); | ||
} | ||
return Buffer.concat([keyPrefixBuffer, key]); | ||
} | ||
else if (isBufferKeyPrefix) { | ||
// @ts-expect-error | ||
return Buffer.concat([options.keyPrefix, Buffer.from(String(key))]); | ||
} | ||
return options.keyPrefix + key; | ||
}); | ||
} | ||
@@ -50,0 +68,0 @@ if (options.readOnly) { |
@@ -66,3 +66,2 @@ "use strict"; | ||
Commander.prototype.call = generateFunction("call", "utf8"); | ||
// @ts-expect-error | ||
Commander.prototype.callBuffer = generateFunction("callBuffer", null); | ||
@@ -69,0 +68,0 @@ // @ts-expect-error |
{ | ||
"name": "ioredis", | ||
"version": "5.0.0-beta.3", | ||
"version": "5.0.0-beta.4", | ||
"description": "A robust, performance-focused and full-featured Redis client for Node.js.", | ||
@@ -43,3 +43,3 @@ "main": "./built/index.js", | ||
"cluster-key-slot": "^1.1.0", | ||
"debug": "^4.3.3", | ||
"debug": "^4.3.4", | ||
"denque": "^2.0.1", | ||
@@ -53,3 +53,3 @@ "lodash.defaults": "^4.2.0", | ||
"devDependencies": { | ||
"@ioredis/interface-generator": "^1.1.0", | ||
"@ioredis/interface-generator": "^1.2.0", | ||
"@semantic-release/changelog": "^6.0.1", | ||
@@ -56,0 +56,0 @@ "@semantic-release/commit-analyzer": "^9.0.2", |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
670981
14781
Updateddebug@^4.3.4