Skip to content

Commit

Permalink
Upgrade node-fetch to 2.6.7
Browse files Browse the repository at this point in the history
(cherry picked from commit 028b4a4)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
EvanHahn-Signal and dependabot[bot] committed Feb 12, 2022
1 parent f2ccbf1 commit 6afe126
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 15 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"mkdirp": "0.5.2",
"moment": "2.29.1",
"mustache": "2.3.0",
"node-fetch": "2.6.1",
"node-fetch": "2.6.7",
"node-forge": "0.10.0",
"normalize-path": "3.0.0",
"p-map": "2.1.0",
Expand Down
37 changes: 23 additions & 14 deletions patches/node-fetch+2.6.1.patch → patches/node-fetch+2.6.7.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/node_modules/node-fetch/lib/index.es.js b/node_modules/node-fetch/lib/index.es.js
index 61906c9..f09f5bd 100644
index 4852f7c..ae9611f 100644
--- a/node_modules/node-fetch/lib/index.es.js
+++ b/node_modules/node-fetch/lib/index.es.js
@@ -1231,6 +1231,9 @@ class Request {
@@ -1253,6 +1253,9 @@ class Request {
this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
this.counter = init.counter || input.counter || 0;
this.agent = init.agent || input.agent;
Expand All @@ -12,7 +12,7 @@ index 61906c9..f09f5bd 100644
}

get method() {
@@ -1350,7 +1353,7 @@ function getNodeRequestOptions(request) {
@@ -1372,7 +1375,7 @@ function getNodeRequestOptions(request) {
method: request.method,
headers: exportNodeCompatibleHeaders(headers),
agent
Expand All @@ -21,7 +21,7 @@ index 61906c9..f09f5bd 100644
}

/**
@@ -1514,7 +1517,8 @@ function fetch(url, opts) {
@@ -1556,7 +1559,8 @@ function fetch(url, opts) {
body: request.body,
signal: request.signal,
timeout: request.timeout,
Expand All @@ -30,12 +30,12 @@ index 61906c9..f09f5bd 100644
+ ca: request.ca,
};

// HTTP-redirect fetch step 9
if (!isDomainOrSubdomain(request.url, locationURL)) {
diff --git a/node_modules/node-fetch/lib/index.js b/node_modules/node-fetch/lib/index.js
index 4b241bf..23fa901 100644
index e5b04f1..ed8d34a 100644
--- a/node_modules/node-fetch/lib/index.js
+++ b/node_modules/node-fetch/lib/index.js
@@ -1235,6 +1235,9 @@ class Request {
@@ -1257,6 +1257,9 @@ class Request {
this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
this.counter = init.counter || input.counter || 0;
this.agent = init.agent || input.agent;
Expand All @@ -45,7 +45,7 @@ index 4b241bf..23fa901 100644
}

get method() {
@@ -1354,7 +1357,7 @@ function getNodeRequestOptions(request) {
@@ -1376,7 +1379,7 @@ function getNodeRequestOptions(request) {
method: request.method,
headers: exportNodeCompatibleHeaders(headers),
agent
Expand All @@ -54,7 +54,7 @@ index 4b241bf..23fa901 100644
}

/**
@@ -1518,7 +1521,8 @@ function fetch(url, opts) {
@@ -1560,7 +1563,8 @@ function fetch(url, opts) {
body: request.body,
signal: request.signal,
timeout: request.timeout,
Expand All @@ -63,12 +63,12 @@ index 4b241bf..23fa901 100644
+ ca: request.ca,
};

// HTTP-redirect fetch step 9
if (!isDomainOrSubdomain(request.url, locationURL)) {
diff --git a/node_modules/node-fetch/lib/index.mjs b/node_modules/node-fetch/lib/index.mjs
index ecf59af..b723a5c 100644
index 49ee05e..bc639aa 100644
--- a/node_modules/node-fetch/lib/index.mjs
+++ b/node_modules/node-fetch/lib/index.mjs
@@ -1229,6 +1229,9 @@ class Request {
@@ -1251,6 +1251,9 @@ class Request {
this.compress = init.compress !== undefined ? init.compress : input.compress !== undefined ? input.compress : true;
this.counter = init.counter || input.counter || 0;
this.agent = init.agent || input.agent;
Expand All @@ -78,7 +78,16 @@ index ecf59af..b723a5c 100644
}

get method() {
@@ -1512,7 +1515,8 @@ function fetch(url, opts) {
@@ -1370,7 +1373,7 @@ function getNodeRequestOptions(request) {
method: request.method,
headers: exportNodeCompatibleHeaders(headers),
agent
- });
+ }, request.ca ? { ca: request.ca } : {});
}

/**
@@ -1554,7 +1557,8 @@ function fetch(url, opts) {
body: request.body,
signal: request.signal,
timeout: request.timeout,
Expand All @@ -87,4 +96,4 @@ index ecf59af..b723a5c 100644
+ ca: request.ca,
};

// HTTP-redirect fetch step 9
if (!isDomainOrSubdomain(request.url, locationURL)) {
25 changes: 25 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -10336,6 +10336,13 @@ node-fetch@2.6.1, node-fetch@^2.6.0:
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052"
integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==

node-fetch@2.6.7:
version "2.6.7"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.7.tgz#24de9fba827e3b4ae44dc8b20256a379160052ad"
integrity sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==
dependencies:
whatwg-url "^5.0.0"

node-fetch@^1.0.1:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
Expand Down Expand Up @@ -14451,6 +14458,11 @@ tough-cookie@~2.5.0:
psl "^1.1.28"
punycode "^2.1.1"

tr46@~0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
integrity sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=

trim-newlines@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/trim-newlines/-/trim-newlines-3.0.1.tgz#260a5d962d8b752425b32f3a7db0dcacd176c144"
Expand Down Expand Up @@ -14981,6 +14993,11 @@ wbuf@^1.1.0, wbuf@^1.7.3:
dependencies:
minimalistic-assert "^1.0.0"

webidl-conversions@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-3.0.1.tgz#24534275e2a7bc6be7bc86611cc16ae0a5654871"
integrity sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=

webpack-cli@4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/webpack-cli/-/webpack-cli-4.6.0.tgz#27ae86bfaec0cf393fcfd58abdc5a229ad32fd16"
Expand Down Expand Up @@ -15179,6 +15196,14 @@ whatwg-fetch@>=0.10.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84"

whatwg-url@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/whatwg-url/-/whatwg-url-5.0.0.tgz#966454e8765462e37644d3626f6742ce8b70965d"
integrity sha1-lmRU6HZUYuN2RNNib2dCzotwll0=
dependencies:
tr46 "~0.0.3"
webidl-conversions "^3.0.0"

which-boxed-primitive@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6"
Expand Down

0 comments on commit 6afe126

Please sign in to comment.