diff --git a/patches/node-fetch+2.6.0.patch b/patches/node-fetch+2.6.0.patch index 992c4d337..2b85e14b2 100644 --- a/patches/node-fetch+2.6.0.patch +++ b/patches/node-fetch+2.6.0.patch @@ -1,36 +1,42 @@ diff --git a/node_modules/node-fetch/lib/index.es.js b/node_modules/node-fetch/lib/index.es.js -index 37d022c..d3199df 100644 +index 37d022c..22bc369 100644 --- a/node_modules/node-fetch/lib/index.es.js +++ b/node_modules/node-fetch/lib/index.es.js -@@ -1398,6 +1398,7 @@ function fetch(url, opts) { +@@ -1398,6 +1398,9 @@ function fetch(url, opts) { // build request object const request = new Request(url, opts); const options = getNodeRequestOptions(request); -+ options.ca = opts.ca; ++ if (opts && opts.ca) { ++ options.ca = opts.ca; ++ } const send = (options.protocol === 'https:' ? https : http).request; const signal = request.signal; diff --git a/node_modules/node-fetch/lib/index.js b/node_modules/node-fetch/lib/index.js -index daa44bc..9edbbd3 100644 +index daa44bc..4aae236 100644 --- a/node_modules/node-fetch/lib/index.js +++ b/node_modules/node-fetch/lib/index.js -@@ -1402,6 +1402,7 @@ function fetch(url, opts) { +@@ -1402,6 +1402,9 @@ function fetch(url, opts) { // build request object const request = new Request(url, opts); const options = getNodeRequestOptions(request); -+ options.ca = opts.ca; ++ if (opts && opts.ca) { ++ options.ca = opts.ca; ++ } const send = (options.protocol === 'https:' ? https : http).request; const signal = request.signal; diff --git a/node_modules/node-fetch/lib/index.mjs b/node_modules/node-fetch/lib/index.mjs -index e571ea6..67399a0 100644 +index e571ea6..7a50519 100644 --- a/node_modules/node-fetch/lib/index.mjs +++ b/node_modules/node-fetch/lib/index.mjs -@@ -1396,6 +1396,7 @@ function fetch(url, opts) { +@@ -1396,6 +1396,9 @@ function fetch(url, opts) { // build request object const request = new Request(url, opts); const options = getNodeRequestOptions(request); -+ options.ca = opts.ca; ++ if (opts && opts.ca) { ++ options.ca = opts.ca; ++ } const send = (options.protocol === 'https:' ? https : http).request; const signal = request.signal;