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

restify-clients

Package Overview
Dependencies
Maintainers
7
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restify-clients - npm Package Compare versions

Comparing version 2.6.7 to 2.6.8

4

CHANGELOG.md

@@ -0,1 +1,5 @@

<a name="2.6.8"></a>
### 2.6.8 (2019-12-09)
<a name="2.6.7"></a>

@@ -2,0 +6,0 @@ ### 2.6.7 (2019-07-28)

19

lib/HttpClient.js

@@ -192,3 +192,3 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved.

*/
var emitAfter = once.strict(function _emitAfter(_req, _res, _err) {
var emitAfter = once(function _emitAfter(_req, _res, _err) {
assert.optionalObject(_err, '_err');

@@ -223,3 +223,3 @@ assert.object(_req, '_req');

*/
var emitResult = once.strict(function _emitResult(_err, _req, _res) {
var emitResult = once(function _emitResult(_err, _req, _res) {
assert.optionalObject(_err, '_err');

@@ -422,8 +422,15 @@ assert.object(_req, '_req');

// not propagated via the callback, but instead propagated via the
// 'result' event. check the cbCalled flag to ensure we don't double
// call the callback. while this could be handled by once, this is more
// explicit and easier to reason about.
// 'result' event. In this scenario, cb's invocation here will no-op.
cb(realErr, req);
process.nextTick(function () {
// 'error' emitted after 'response' or 'end' on IncomingMessage is
// a known surprising to consumers scenario, and so is disregarded
// by wrapping both emitResult & emitAfter w/once() for 2 reasons:
// 1. The legacy implementation here did not propagate it.
// 2. In the future, core likely won't for the same reason:
// https://github.com/nodejs/node/issues/27916
// https://github.com/nodejs/node/pull/29197
// https://github.com/nodejs/node/pull/20077
// https://github.com/nodejs/node/pull/28683
emitResult(realErr, req, null);

@@ -903,3 +910,3 @@ emitAfter(req, null, realErr);

/* eslint-disable no-param-reassign */
cb = once.strict(cb);
cb = once(cb);
/* eslint-enable no-param-reassign */

@@ -906,0 +913,0 @@

{
"name": "restify-clients",
"version": "2.6.7",
"version": "2.6.8",
"main": "lib/index.js",

@@ -5,0 +5,0 @@ "description": "HttpClient, StringClient, and JsonClient extracted from restify",

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