@whatwg-node/fetch 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const handleFileRequest = require("./handle-file-request");
|
|
2
2
|
|
|
3
3
|
module.exports = function createNodePonyfill(opts = {}) {
|
|
4
|
+
|
|
4
5
|
const ponyfills = {};
|
|
5
6
|
|
|
6
7
|
if (!opts.useNodeFetch) {
|
|
@@ -227,7 +228,7 @@ module.exports = function createNodePonyfill(opts = {}) {
|
|
|
227
228
|
if (globalThis.Headers) {
|
|
228
229
|
Object.defineProperty(globalThis.Headers, Symbol.hasInstance, {
|
|
229
230
|
value(obj) {
|
|
230
|
-
return obj.get && obj.set && obj.delete && obj.has && obj.append;
|
|
231
|
+
return obj && obj.get && obj.set && obj.delete && obj.has && obj.append;
|
|
231
232
|
},
|
|
232
233
|
configurable: true,
|
|
233
234
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@whatwg-node/fetch",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Cross Platform Smart Fetch Ponyfill",
|
|
5
5
|
"author": "Arda TANRIKULU <ardatanrikulu@gmail.com>",
|
|
6
6
|
"repository": {
|
|
@@ -25,7 +25,6 @@
|
|
|
25
25
|
"form-data-encoder": "^1.7.1",
|
|
26
26
|
"formdata-node": "^4.3.1",
|
|
27
27
|
"node-fetch": "^2.6.7",
|
|
28
|
-
"undici": "^5.8.0",
|
|
29
28
|
"web-streams-polyfill": "^3.2.0"
|
|
30
29
|
},
|
|
31
30
|
"publishConfig": {
|