Comparing version 4.0.3 to 4.1.0
@@ -0,1 +1,10 @@ | ||
### 4.1.0 | ||
* use lower of later timeouts - **[@dbushong](https://github.com/dbushong)** [#109](https://github.com/groupon/gofer/pull/109) | ||
- [`7ce205e`](https://github.com/groupon/gofer/commit/7ce205e6ceead372270c920be019e7c1b1ce9d56) **feat:** use lower of later timeouts | ||
- [`a887e66`](https://github.com/groupon/gofer/commit/a887e66cbbe3c2cb9c2faef92e0a68b023f4bce0) **chore:** upgrade linting | ||
- [`92ad166`](https://github.com/groupon/gofer/commit/92ad166e2c48d66af0df6170f17f83c4bb8bbfeb) **refactor:** make lint happy | ||
- [`caea42d`](https://github.com/groupon/gofer/commit/caea42d2cce29ac8396c06308d27ac5c99fdcc96) **fix:** correct FetchResponse type | ||
### 4.0.3 | ||
@@ -2,0 +11,0 @@ |
@@ -36,2 +36,3 @@ /* | ||
/* eslint-env browser */ | ||
/* eslint-disable node/no-unsupported-features/node-builtins */ | ||
@@ -38,0 +39,0 @@ const StatusCodeError = require('./errors').StatusCodeError; |
@@ -145,5 +145,13 @@ /* | ||
function minTimeoutOf(options, higher, lower) { | ||
const [higherVal, lowerVal] = [options[higher], options[lower]]; | ||
if (higherVal < lowerVal) { | ||
debug('%s (%d) < %s (%d); lowering %s', higher, higherVal, lower, lowerVal); | ||
options[lower] = higherVal; | ||
} | ||
} | ||
function requestFunc(options, resolve, reject) { | ||
const host = options.host; | ||
const setHost = options.setHost; | ||
options = { ...options }; | ||
const { host, setHost } = options; | ||
const fullUrl = buildFullUrl(options); | ||
@@ -153,2 +161,7 @@ options.setHost = false; | ||
minTimeoutOf(options, 'timeout', 'connectTimeout'); | ||
if (options.completionTimeout) { | ||
minTimeoutOf(options, 'completionTimeout', 'timeout'); | ||
} | ||
let reqObj = null; | ||
@@ -155,0 +168,0 @@ let resObj = null; |
import { SecureContext } from 'tls'; | ||
import { ServerResponse } from 'http'; | ||
import { IncomingMessage } from 'http'; | ||
@@ -11,3 +11,3 @@ type BodyMethods = { | ||
type FetchResponse = Promise<ServerResponse & BodyMethods> & BodyMethods; | ||
type FetchResponse = Promise<IncomingMessage & BodyMethods> & BodyMethods; | ||
@@ -14,0 +14,0 @@ declare class Gofer { |
{ | ||
"name": "gofer", | ||
"version": "4.0.3", | ||
"version": "4.1.0", | ||
"description": "A general purpose service client library", | ||
@@ -31,3 +31,3 @@ "license": "BSD-3-Clause", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=8.3.0" | ||
}, | ||
@@ -51,7 +51,7 @@ "nlm": { | ||
"assertive": "^2.1.0", | ||
"eslint": "^6.2.1", | ||
"eslint-config-groupon": "^7.2.0", | ||
"eslint": "^6.6.0", | ||
"eslint-config-groupon": "^8.0.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-mocha": "^6.1.0", | ||
"eslint-plugin-node": "^9.1.0", | ||
"eslint-plugin-node": "^10.0.0", | ||
"eslint-plugin-prettier": "^3.1.0", | ||
@@ -58,0 +58,0 @@ "form-data": "^1.0.0-rc4", |
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
75000
1344