summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive')
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/History.md9
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/README.md4
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js12
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js46
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json20
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md25
-rw-r--r--deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/package.json12
7 files changed, 48 insertions, 80 deletions
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/History.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/History.md
index b37e513885..e62374ef13 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/History.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/History.md
@@ -1,13 +1,4 @@
-3.4.0 / 2018-02-27
-==================
-
-**features**
- * [[`bc7cadb`](http://github.com/node-modules/agentkeepalive/commit/bc7cadb30ecd2071e2b341ac53ae1a2b8155c43d)] - feat: use socket custom freeSocketKeepAliveTimeout first (#59) (fengmk2 <<fengmk2@gmail.com>>)
-
-**others**
- * [[`138eda8`](http://github.com/node-modules/agentkeepalive/commit/138eda81e10b632aaa87bea0cb66d8667124c4e8)] - doc: fix `keepAliveMsecs` params description (#55) (Hongcai Deng <<admin@dhchouse.com>>)
-
3.3.0 / 2017-06-20
==================
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/README.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/README.md
index ce067f10c7..c8d8d2f3be 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/README.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/README.md
@@ -44,8 +44,8 @@ $ npm install agentkeepalive --save
Can have the following fields:
* `keepAlive` {Boolean} Keep sockets around in a pool to be used by
other requests in the future. Default = `true`.
- * `keepAliveMsecs` {Number} When using the keepAlive option, specifies the initial delay
- for TCP Keep-Alive packets. Ignored when the keepAlive option is false or undefined. Defaults to 1000.
+ * `keepAliveMsecs` {Number} When using HTTP KeepAlive, how often
+ to send TCP KeepAlive packets over sockets being kept alive.
Default = `1000`. Only relevant if `keepAlive` is set to `true`.
* `freeSocketKeepAliveTimeout`: {Number} Sets the free socket to timeout
after `freeSocketKeepAliveTimeout` milliseconds of inactivity on the free socket.
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js
index 604a884fd4..57723d9c98 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/lib/_http_agent.js
@@ -119,10 +119,7 @@ function Agent(options) {
socket.once('error', freeSocketErrorListener);
}
// set free keepalive timer
- // try to use socket custom freeSocketKeepAliveTimeout first
- const freeSocketKeepAliveTimeout = socket.freeSocketKeepAliveTimeout || self.freeSocketKeepAliveTimeout;
- socket.setTimeout(freeSocketKeepAliveTimeout);
- debug(`push to free socket queue and wait for ${freeSocketKeepAliveTimeout}ms`);
+ socket.setTimeout(self.freeSocketKeepAliveTimeout);
// [patch end]
}
} else {
@@ -182,14 +179,13 @@ function handleSocketCreation(req) {
}
// [patch end]
-Agent.prototype.addRequest = function addRequest(req, options, port/*legacy*/,
- localAddress/*legacy*/) {
+Agent.prototype.addRequest = function addRequest(req, options) {
// Legacy API: addRequest(req, host, port, localAddress)
if (typeof options === 'string') {
options = {
host: options,
- port,
- localAddress
+ port: arguments[2],
+ localAddress: arguments[3]
};
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js
index 72297501f9..6a522b16b3 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/index.js
@@ -6,7 +6,6 @@ var s = 1000;
var m = s * 60;
var h = m * 60;
var d = h * 24;
-var w = d * 7;
var y = d * 365.25;
/**
@@ -50,7 +49,7 @@ function parse(str) {
if (str.length > 100) {
return;
}
- var match = /^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
+ var match = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(
str
);
if (!match) {
@@ -65,10 +64,6 @@ function parse(str) {
case 'yr':
case 'y':
return n * y;
- case 'weeks':
- case 'week':
- case 'w':
- return n * w;
case 'days':
case 'day':
case 'd':
@@ -111,17 +106,16 @@ function parse(str) {
*/
function fmtShort(ms) {
- var msAbs = Math.abs(ms);
- if (msAbs >= d) {
+ if (ms >= d) {
return Math.round(ms / d) + 'd';
}
- if (msAbs >= h) {
+ if (ms >= h) {
return Math.round(ms / h) + 'h';
}
- if (msAbs >= m) {
+ if (ms >= m) {
return Math.round(ms / m) + 'm';
}
- if (msAbs >= s) {
+ if (ms >= s) {
return Math.round(ms / s) + 's';
}
return ms + 'ms';
@@ -136,27 +130,23 @@ function fmtShort(ms) {
*/
function fmtLong(ms) {
- var msAbs = Math.abs(ms);
- if (msAbs >= d) {
- return plural(ms, msAbs, d, 'day');
- }
- if (msAbs >= h) {
- return plural(ms, msAbs, h, 'hour');
- }
- if (msAbs >= m) {
- return plural(ms, msAbs, m, 'minute');
- }
- if (msAbs >= s) {
- return plural(ms, msAbs, s, 'second');
- }
- return ms + ' ms';
+ return plural(ms, d, 'day') ||
+ plural(ms, h, 'hour') ||
+ plural(ms, m, 'minute') ||
+ plural(ms, s, 'second') ||
+ ms + ' ms';
}
/**
* Pluralization helper.
*/
-function plural(ms, msAbs, n, name) {
- var isPlural = msAbs >= n * 1.5;
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
+function plural(ms, n, name) {
+ if (ms < n) {
+ return;
+ }
+ if (ms < n * 1.5) {
+ return Math.floor(ms / n) + ' ' + name;
+ }
+ return Math.ceil(ms / n) + ' ' + name + 's';
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json
index 550a885cd6..5bf17fa25e 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/package.json
@@ -1,8 +1,8 @@
{
"_from": "ms@^2.0.0",
- "_id": "ms@2.1.1",
+ "_id": "ms@2.0.0",
"_inBundle": false,
- "_integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==",
+ "_integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=",
"_location": "/pacote/make-fetch-happen/agentkeepalive/humanize-ms/ms",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/make-fetch-happen/agentkeepalive/humanize-ms"
],
- "_resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz",
- "_shasum": "30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a",
+ "_resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
+ "_shasum": "5608aeadfc00be6c2901df5f9861788de0d597c8",
"_spec": "ms@^2.0.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms",
"bugs": {
@@ -27,13 +27,13 @@
},
"bundleDependencies": false,
"deprecated": false,
- "description": "Tiny millisecond conversion utility",
+ "description": "Tiny milisecond conversion utility",
"devDependencies": {
- "eslint": "4.12.1",
+ "eslint": "3.19.0",
"expect.js": "0.3.1",
- "husky": "0.14.3",
- "lint-staged": "5.0.0",
- "mocha": "4.0.1"
+ "husky": "0.13.3",
+ "lint-staged": "3.4.1",
+ "mocha": "3.4.1"
},
"eslintConfig": {
"extends": "eslint:recommended",
@@ -65,5 +65,5 @@
"precommit": "lint-staged",
"test": "mocha tests.js"
},
- "version": "2.1.1"
+ "version": "2.0.0"
}
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md
index bb767293ac..84a9974ccc 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/node_modules/humanize-ms/node_modules/ms/readme.md
@@ -17,44 +17,35 @@ ms('1m') // 60000
ms('5s') // 5000
ms('1y') // 31557600000
ms('100') // 100
-ms('-3 days') // -259200000
-ms('-1h') // -3600000
-ms('-200') // -200
```
-### Convert from Milliseconds
+### Convert from milliseconds
```js
ms(60000) // "1m"
ms(2 * 60000) // "2m"
-ms(-3 * 60000) // "-3m"
ms(ms('10 hours')) // "10h"
```
-### Time Format Written-Out
+### Time format written-out
```js
ms(60000, { long: true }) // "1 minute"
ms(2 * 60000, { long: true }) // "2 minutes"
-ms(-3 * 60000, { long: true }) // "-3 minutes"
ms(ms('10 hours'), { long: true }) // "10 hours"
```
## Features
-- Works both in [Node.js](https://nodejs.org) and in the browser
-- If a number is supplied to `ms`, a string with a unit is returned
-- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
-- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
+- Works both in [node](https://nodejs.org) and in the browser.
+- If a number is supplied to `ms`, a string with a unit is returned.
+- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`).
+- If you pass a string with a number and a valid unit, the number of equivalent ms is returned.
-## Related Packages
-
-- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
-
-## Caught a Bug?
+## Caught a bug?
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
2. Link the package to the global module directory: `npm link`
-3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
+3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, node will now use your clone of ms!
As always, you can run the tests using: `npm test`
diff --git a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/package.json b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/package.json
index cfae50952e..a9f0b55de0 100644
--- a/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/package.json
+++ b/deps/npm/node_modules/pacote/node_modules/make-fetch-happen/node_modules/agentkeepalive/package.json
@@ -1,8 +1,8 @@
{
"_from": "agentkeepalive@^3.3.0",
- "_id": "agentkeepalive@3.4.0",
+ "_id": "agentkeepalive@3.3.0",
"_inBundle": false,
- "_integrity": "sha512-RypT3apziwtLsJTtab5kzqADuzWaYVqFPQo7X8QSYuteaw9GGNPsB5fTy8BVcCVish3cD9yLroR7oUVlZybhpQ==",
+ "_integrity": "sha512-9yhcpXti2ZQE7bxuCsjjWNIZoQOd9sZ1ZBovHG0YeCRohFv73SLvcm73PC9T3olM4GyozaQb+4MGdQpcD8m7NQ==",
"_location": "/pacote/make-fetch-happen/agentkeepalive",
"_phantomChildren": {},
"_requested": {
@@ -18,8 +18,8 @@
"_requiredBy": [
"/pacote/make-fetch-happen"
],
- "_resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.4.0.tgz",
- "_shasum": "92487926ec1a93100a89a8a46a6b2d82513543ce",
+ "_resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-3.3.0.tgz",
+ "_shasum": "6d5de5829afd3be2712201a39275fd11c651857c",
"_spec": "agentkeepalive@^3.3.0",
"_where": "/Users/zkat/Documents/code/npm/node_modules/pacote/node_modules/make-fetch-happen",
"author": {
@@ -33,7 +33,7 @@
},
"bundleDependencies": false,
"ci": {
- "version": "4.3.2, 4, 6, 8, 9"
+ "version": "4.3.2, 4, 6, 7, 8"
},
"dependencies": {
"humanize-ms": "^1.2.1"
@@ -78,5 +78,5 @@
"lint": "eslint lib test index.js",
"test": "egg-bin test"
},
- "version": "3.4.0"
+ "version": "3.3.0"
}