Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

levee

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

levee - npm Package Compare versions

Comparing version 1.4.0 to 1.5.0-alpha.1

7

CHANGELOG.md

@@ -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.

9

lib/breaker.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc