Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornlf <quitlahok@gmail.com>2022-03-24 20:06:47 +0300
committerLuke Karrys <luke@lukekarrys.com>2022-03-28 23:18:40 +0300
commitc33b5331120d8304e0f090ceda55e19cc6f451f4 (patch)
tree28c8a7ab5b80ffb0bad2ffb323d48d682261d9e6 /node_modules
parentfeb4446d50a7b6a61e44a92b78e1e1af2d89a725 (diff)
deps: minipass-fetch@2.1.0
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/minipass-fetch/lib/body.js6
-rw-r--r--node_modules/minipass-fetch/lib/index.js5
-rw-r--r--node_modules/minipass-fetch/package.json26
3 files changed, 21 insertions, 16 deletions
diff --git a/node_modules/minipass-fetch/lib/body.js b/node_modules/minipass-fetch/lib/body.js
index 2b8e3bd2f..c7ffa5bab 100644
--- a/node_modules/minipass-fetch/lib/body.js
+++ b/node_modules/minipass-fetch/lib/body.js
@@ -127,8 +127,10 @@ class Body {
: this.size ? new MinipassSized({ size: this.size })
: new Minipass()
- // allow timeout on slow response body
- const resTimeout = this.timeout ? setTimeout(() => {
+ // allow timeout on slow response body, but only if the stream is still writable. this
+ // makes the timeout center on the socket stream from lib/index.js rather than the
+ // intermediary minipass stream we create to receive the data
+ const resTimeout = this.timeout && stream.writable ? setTimeout(() => {
stream.emit('error', new FetchError(
`Response timeout while trying to fetch ${
this.url} (over ${this.timeout}ms)`, 'body-timeout'))
diff --git a/node_modules/minipass-fetch/lib/index.js b/node_modules/minipass-fetch/lib/index.js
index 22257a417..b1878ac0c 100644
--- a/node_modules/minipass-fetch/lib/index.js
+++ b/node_modules/minipass-fetch/lib/index.js
@@ -255,8 +255,8 @@ const fetch = async (url, opts) => {
size: request.size,
timeout: request.timeout,
counter: request.counter,
- trailer: new Promise(resolve =>
- res.on('end', () => resolve(createHeadersLenient(res.trailers)))),
+ trailer: new Promise(resolveTrailer =>
+ res.on('end', () => resolveTrailer(createHeadersLenient(res.trailers)))),
}
// HTTP-network fetch step 12.1.1.3
@@ -362,3 +362,4 @@ fetch.Headers = Headers
fetch.Request = Request
fetch.Response = Response
fetch.FetchError = FetchError
+fetch.AbortError = AbortError
diff --git a/node_modules/minipass-fetch/package.json b/node_modules/minipass-fetch/package.json
index 68e1ce134..1f663b924 100644
--- a/node_modules/minipass-fetch/package.json
+++ b/node_modules/minipass-fetch/package.json
@@ -1,6 +1,6 @@
{
"name": "minipass-fetch",
- "version": "2.0.3",
+ "version": "2.1.0",
"description": "An implementation of window.fetch in Node.js using Minipass streams",
"license": "MIT",
"main": "lib/index.js",
@@ -10,19 +10,20 @@
"preversion": "npm test",
"postversion": "npm publish",
"postpublish": "git push origin --follow-tags",
- "lint": "eslint '**/*.js'",
- "postlint": "npm-template-check",
- "template-copy": "npm-template-copy --force",
+ "lint": "eslint \"**/*.js\"",
+ "postlint": "template-oss-check",
"lintfix": "npm run lint -- --fix",
"prepublishOnly": "git push origin --follow-tags",
- "posttest": "npm run lint"
+ "posttest": "npm run lint",
+ "template-oss-apply": "template-oss-apply --force"
},
"tap": {
"coverage-map": "map.js",
"check-coverage": true
},
"devDependencies": {
- "@npmcli/template-oss": "^2.9.2",
+ "@npmcli/eslint-config": "^3.0.1",
+ "@npmcli/template-oss": "3.1.2",
"@ungap/url-search-params": "^0.2.2",
"abort-controller": "^3.0.0",
"abortcontroller-polyfill": "~1.7.3",
@@ -30,7 +31,7 @@
"nock": "^13.2.4",
"parted": "^0.1.1",
"string-to-arraybuffer": "^1.0.2",
- "tap": "^15.1.6"
+ "tap": "^16.0.0"
},
"dependencies": {
"minipass": "^3.1.6",
@@ -42,7 +43,7 @@
},
"repository": {
"type": "git",
- "url": "git+https://github.com/npm/minipass-fetch.git"
+ "url": "https://github.com/npm/minipass-fetch.git"
},
"keywords": [
"fetch",
@@ -51,14 +52,15 @@
"window.fetch"
],
"files": [
- "bin",
- "lib"
+ "bin/",
+ "lib/"
],
"engines": {
- "node": "^12.13.0 || ^14.15.0 || >=16"
+ "node": "^12.13.0 || ^14.15.0 || >=16.0.0"
},
"author": "GitHub Inc.",
"templateOSS": {
- "version": "2.9.2"
+ "//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
+ "version": "3.1.2"
}
}