Comparing version 1.4.0 to 1.5.0-alpha.1
@@ -0,1 +1,8 @@ | ||
## v1.5.0-alpha.1 | ||
- Allow Levee to pass the return variable of the executed function to the circuit callback on timeout | ||
- Update to hoek@^6: #19 | ||
- Update all out of date dependencies via greenkeeper update: #28 | ||
- Pass return object of executed function to circuit callback: #25 | ||
## v1.4.0 | ||
@@ -2,0 +9,0 @@ - Added a new option for stats `maxSamples` which restricts sample length. |
@@ -65,3 +65,3 @@ 'use strict'; | ||
Breaker.prototype._run = function _run(/*args...n, callback*/) { | ||
var args, callback, self, start, timer, execute; | ||
var args, callback, self, start, timer, execute, context; | ||
@@ -96,5 +96,8 @@ this.emit('execute'); | ||
error.code = 'ETIMEDOUT'; | ||
if (context){ | ||
error.context = context; | ||
} | ||
timer = undefined; | ||
self._pendingClose = false; | ||
self.emit('timeout'); | ||
self.emit('timeout', error); | ||
self._onFailure(); | ||
@@ -128,3 +131,3 @@ callback(error); | ||
execute = Zalgo.contain(this._impl.execute, this._impl); | ||
execute.apply(null, args); | ||
context = execute.apply(null, args); | ||
}; | ||
@@ -131,0 +134,0 @@ |
@@ -6,3 +6,3 @@ 'use strict'; | ||
return function zalgo() { | ||
var callback, sync; | ||
var callback, sync, rcontext; | ||
@@ -29,5 +29,6 @@ function __container__() { | ||
sync = true; | ||
fn.apply(context || this, arguments); | ||
rcontext = fn.apply(context || this, arguments); | ||
sync = false; | ||
return rcontext; | ||
}; | ||
}; |
{ | ||
"name": "levee", | ||
"version": "1.4.0", | ||
"version": "1.5.0-alpha.1", | ||
"description": "A circuitbreaker implementation for Node.js", | ||
@@ -23,10 +23,10 @@ "main": "index.js", | ||
"devDependencies": { | ||
"eslint": "^0.7.4", | ||
"istanbul": "^0.3.0", | ||
"tape": "^2.14.1", | ||
"wreck": "^3.0.0" | ||
"eslint": "^6.1.0", | ||
"istanbul": "^0.4.5", | ||
"tape": "^4.11.0", | ||
"wreck": "^14.2.0" | ||
}, | ||
"dependencies": { | ||
"CBuffer": "^2.0.0", | ||
"hoek": "^2.4.1" | ||
"hoek": "^6.1.3" | ||
}, | ||
@@ -33,0 +33,0 @@ "repository": { |
@@ -8,3 +8,3 @@ Levee | ||
[![Build Status](https://travis-ci.org/krakenjs/levee.svg)](https://travis-ci.org/krakenjs/levee) | ||
[![Build Status](https://travis-ci.org/krakenjs/levee.svg)](https://travis-ci.org/krakenjs/levee) [![Greenkeeper badge](https://badges.greenkeeper.io/krakenjs/levee.svg)](https://greenkeeper.io/) | ||
@@ -11,0 +11,0 @@ #### Basic Usage |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
16610
269
0
1
+ Addedhoek@6.1.3(transitive)
- Removedhoek@2.16.3(transitive)
Updatedhoek@^6.1.3