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

zombie

Package Overview
Dependencies
Maintainers
4
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zombie - npm Package Compare versions

Comparing version 5.0.7 to 5.0.8

5

CHANGELOG.md

@@ -0,1 +1,6 @@

## Version 5.0.8 2018-02-22
FIXED rerouting in Node 8
## Version 5.0.7 2017-06-26

@@ -2,0 +7,0 @@

2

lib/fetch.js

@@ -73,3 +73,3 @@ 'use strict';

}
} else if (typeof init === "object") _.each(init, function (value, name) {
} else if (typeof init === 'object') _.each(init, function (value, name) {
_this.append(name, value);

@@ -76,0 +76,0 @@ });

@@ -13,2 +13,4 @@ // Domain routing and port forwarding

var _Object$getOwnPropertySymbols = require('babel-runtime/core-js/object/get-own-property-symbols')['default'];
var _Object$assign = require('babel-runtime/core-js/object/assign')['default'];

@@ -71,24 +73,20 @@

Net.Socket.prototype.connect = function (options, callback) {
if (Array.isArray(options) && options.some(function (opts) {
return findTargetPort(opts.host, opts.port);
})) {
// we hackily update the array in place, because the array has already been extended with
// extra methods
options.forEach(function (opts, i) {
var port = findTargetPort(opts.host, opts.port);
if (port) options[i] = _Object$assign({}, opts, { host: 'localhost', port: port });
});
return connect.call(this, options, callback);
}
if (options && typeof options === 'object' && !Array.isArray(options)) {
var port = findTargetPort(options.host, options.port);
if (port) {
options = _Object$assign({}, options, { host: 'localhost', port: port });
return connect.call(this, options, callback);
}
}
return connect.apply(this, arguments);
var hasNormalizedArgs = _Object$getOwnPropertySymbols && _Object$getOwnPropertySymbols(options).length > 0;
var isNode8 = Array.isArray(options) && hasNormalizedArgs;
if (isNode8) {
var reroutedOptions = rerouteOptions(options[0]);
callback = options[1];
return connect.call(this, reroutedOptions, callback);
} else if (typeof options === 'object') {
var reroutedOptions = rerouteOptions(options);
return connect.call(this, reroutedOptions, callback);
} else return connect.apply(this, arguments);
};
}
function rerouteOptions(options) {
var port = findTargetPort(options.host, options.port);
if (port) return _Object$assign({}, options, { host: 'localhost', port: port });else return options;
}
// source - Hostname or host:port (default to port 80)

@@ -95,0 +93,0 @@ // target - Target port number

{
"name": "zombie",
"version": "5.0.7",
"version": "5.0.8",
"description": "Insanely fast, full-stack, headless browser testing using Node.js",

@@ -5,0 +5,0 @@ "homepage": "https://www.npmjs.com/package/zombie",

@@ -10,3 +10,3 @@ # Zombie.js

**Zombie 5.x** is tested to work with node.js 4 or later.
**Zombie 5.x** is tested to work with Node 4 or later.
If you need to use Node 0.12 or earlier, consider using Zombie 2.x.

@@ -13,0 +13,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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