Skip to content

Commit e49844e

Browse files
committedApr 17, 2023
deps: minipass-fetch@3.0.2
1 parent 357cc29 commit e49844e

File tree

6 files changed

+40
-8
lines changed

6 files changed

+40
-8
lines changed
 

‎node_modules/minipass-fetch/lib/index.js

+14-2
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,20 @@ const fetch = async (url, opts) => {
143143
const location = headers.get('Location')
144144

145145
// HTTP fetch step 5.3
146-
const locationURL = location === null ? null
147-
: (new URL(location, request.url)).toString()
146+
let locationURL = null
147+
try {
148+
locationURL = location === null ? null : new URL(location, request.url).toString()
149+
} catch {
150+
// error here can only be invalid URL in Location: header
151+
// do not throw when options.redirect == manual
152+
// let the user extract the errorneous redirect URL
153+
if (request.redirect !== 'manual') {
154+
/* eslint-disable-next-line max-len */
155+
reject(new FetchError(`uri requested responds with an invalid redirect URL: ${location}`, 'invalid-redirect'))
156+
finalize()
157+
return
158+
}
159+
}
148160

149161
// HTTP fetch step 5.5
150162
if (request.redirect === 'error') {

‎node_modules/minipass-fetch/lib/request.js

+1
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ class Request extends Body {
265265
secureProtocol,
266266
servername,
267267
sessionIdContext,
268+
timeout: request.timeout,
268269
}
269270
}
270271
}

‎node_modules/minipass-fetch/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "minipass-fetch",
3-
"version": "3.0.1",
3+
"version": "3.0.2",
44
"description": "An implementation of window.fetch in Node.js using Minipass streams",
55
"license": "MIT",
66
"main": "lib/index.js",
@@ -24,7 +24,7 @@
2424
},
2525
"devDependencies": {
2626
"@npmcli/eslint-config": "^4.0.0",
27-
"@npmcli/template-oss": "4.10.0",
27+
"@npmcli/template-oss": "4.13.0",
2828
"@ungap/url-search-params": "^0.2.2",
2929
"abort-controller": "^3.0.0",
3030
"abortcontroller-polyfill": "~1.7.3",
@@ -63,6 +63,7 @@
6363
"author": "GitHub Inc.",
6464
"templateOSS": {
6565
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
66-
"version": "4.10.0"
66+
"version": "4.13.0",
67+
"publish": "true"
6768
}
6869
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Names sorted by how much code was originally theirs.
2+
Isaac Z. Schlueter <i@izs.me>
3+
Meryn Stol <merynstol@gmail.com>
4+
Robert Kowalski <rok@kowalski.gd>

‎node_modules/tuf-js/dist/utils/url.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"use strict";
2+
Object.defineProperty(exports, "__esModule", { value: true });
3+
exports.join = void 0;
4+
const url_1 = require("url");
5+
function join(base, path) {
6+
return new url_1.URL(ensureTrailingSlash(base) + removeLeadingSlash(path)).toString();
7+
}
8+
exports.join = join;
9+
function ensureTrailingSlash(path) {
10+
return path.endsWith('/') ? path : path + '/';
11+
}
12+
function removeLeadingSlash(path) {
13+
return path.startsWith('/') ? path.slice(1) : path;
14+
}

‎package-lock.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -8581,9 +8581,9 @@
85818581
}
85828582
},
85838583
"node_modules/minipass-fetch": {
8584-
"version": "3.0.1",
8585-
"resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.1.tgz",
8586-
"integrity": "sha512-t9/wowtf7DYkwz8cfMSt0rMwiyNIBXf5CKZ3S5ZMqRqMYT0oLTp0x1WorMI9WTwvaPg21r1JbFxJMum8JrLGfw==",
8584+
"version": "3.0.2",
8585+
"resolved": "https://registry.npmjs.org/minipass-fetch/-/minipass-fetch-3.0.2.tgz",
8586+
"integrity": "sha512-/ZpF1CQaWYqjbhfFgKNt3azxztEpc/JUPuMkqOgrnMQqcU8CbE409AUdJYTIWryl3PP5CBaTJZT71N49MXP/YA==",
85878587
"inBundle": true,
85888588
"dependencies": {
85898589
"minipass": "^4.0.0",

0 commit comments

Comments
 (0)
Please sign in to comment.