Comparing version 1.5.10 to 1.5.11
@@ -5,2 +5,6 @@ ## Changelog | ||
### v1.5.11 - July 7, 2015 | ||
* Allow omitting callback in `exec`. | ||
### v1.5.10 - July 6, 2015 | ||
@@ -7,0 +11,0 @@ |
@@ -54,3 +54,3 @@ 'use strict'; | ||
Commander.prototype.call = Commander.prototype.call = generateFunction('utf8'); | ||
Commander.prototype.call = generateFunction('utf8'); | ||
Commander.prototype.callBuffer = generateFunction(null); | ||
@@ -57,0 +57,0 @@ Commander.prototype.send_command = Commander.prototype.call; |
@@ -150,2 +150,3 @@ 'use strict'; | ||
var _this = this; | ||
command.promise.then(function (result) { | ||
@@ -152,0 +153,0 @@ _this.fillResult([null, result], position); |
@@ -54,10 +54,9 @@ 'use strict'; | ||
redis.exec = function (callback) { | ||
var wrapper = function (err, results) { | ||
return exec.call(this).then(function (results) { | ||
if (Array.isArray(results)) { | ||
results = utils.wrapMultiResult(results); | ||
} | ||
callback(err, results); | ||
}; | ||
exec.call(this, wrapper); | ||
return results; | ||
}).nodeify(callback); | ||
}; | ||
}; |
{ | ||
"name": "ioredis", | ||
"version": "1.5.10", | ||
"version": "1.5.11", | ||
"description": "A delightful, performance-focused Redis client for Node and io.js", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -92,2 +92,22 @@ 'use strict'; | ||
}); | ||
describe('exec', function () { | ||
it('should group results', function (done) { | ||
var redis = new Redis(); | ||
redis.multi({ pipeline: false }); | ||
redis.set('foo', 'bar'); | ||
redis.get('foo'); | ||
redis.exec().then(function (res) { | ||
done(); | ||
}); | ||
}); | ||
it('should allow omitting callback', function (done) { | ||
var redis = new Redis(); | ||
redis.exec().catch(function (err) { | ||
expect(err.message).to.eql('ERR EXEC without MULTI'); | ||
done(); | ||
}); | ||
}); | ||
}); | ||
}); |
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
279246
7365