exp-fetch
Advanced tools
Comparing version
@@ -18,3 +18,6 @@ "use strict"; | ||
const currentAppConfig = require("./lib/currentAppConfig"); | ||
const path = require("path"); | ||
const expFetchConfig = require(path.join(__dirname, "package.json")); | ||
module.exports = buildFetch; | ||
@@ -275,2 +278,7 @@ module.exports.initLRUCache = initCache; | ||
if (!headers["User-Agent"]) { | ||
const { name, version } = currentAppConfig || expFetchConfig; | ||
headers["User-Agent"] = `${name}/${version}`; | ||
} | ||
if (resultCallback) { | ||
@@ -277,0 +285,0 @@ performRequest(url, headers, explicitTimeout, method, optionalBody, 0, resultCallback, onRequestInit); |
{ | ||
"name": "exp-fetch", | ||
"version": "5.3.3", | ||
"version": "5.4.0", | ||
"description": "A small pluggable fetch lib", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
25347
1.08%421
1.45%2
100%