redis-clustr
Advanced tools
Comparing version 1.4.3 to 1.5.0
{ | ||
"name": "redis-clustr", | ||
"version": "1.4.3", | ||
"version": "1.5.0", | ||
"description": "Redis cluster client", | ||
@@ -28,8 +28,6 @@ "main": "src/RedisClustr.js", | ||
"dependencies": { | ||
"cluster-key-slot": "^1.0.5", | ||
"double-ended-queue": "^2.1.0-0", | ||
"redis": "~2.5.0" | ||
"redis": "^2.6.0" | ||
}, | ||
"optionalDependencies": { | ||
"hiredis": "^0.4.0" | ||
}, | ||
"devDependencies": { | ||
@@ -36,0 +34,0 @@ "js-beautify": "^1.5.10", |
'use strict'; | ||
var setupCommands = require('./setupCommands'); | ||
var crc = require('./crc16-xmodem'); | ||
var calculateSlot = require('cluster-key-slot'); | ||
var redis = require('redis'); | ||
@@ -278,17 +278,3 @@ var RedisBatch = require('./RedisBatch'); | ||
// support for hash tags to keep keys on the same slot | ||
// http://redis.io/topics/cluster-spec#keys-hash-tags | ||
var openKey = key.indexOf('{'); | ||
if (openKey !== -1) { | ||
var tmpKey = key.substring(openKey + 1); | ||
var closeKey = tmpKey.indexOf('}'); | ||
// } in key and it's not {} | ||
if (closeKey > 0) { | ||
key = tmpKey.substring(0, closeKey); | ||
} | ||
} | ||
var slot = crc(key) % 16384; | ||
var slot = calculateSlot(key); | ||
var clients = self.slots[slot]; | ||
@@ -295,0 +281,0 @@ |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
54295
12
1905
+ Addedcluster-key-slot@^1.0.5
+ Addedcluster-key-slot@1.1.2(transitive)
+ Addedredis@2.8.0(transitive)
+ Addedredis-parser@2.6.0(transitive)
- Removedbindings@1.5.0(transitive)
- Removedfile-uri-to-path@1.0.0(transitive)
- Removedhiredis@0.4.1(transitive)
- Removednan@2.20.0(transitive)
- Removedredis@2.5.3(transitive)
- Removedredis-parser@1.3.0(transitive)
Updatedredis@^2.6.0