@vercel/node
Advanced tools
Comparing version 1.6.2-canary.0 to 1.6.2-canary.1
@@ -121,5 +121,5 @@ "use strict"; | ||
} | ||
const opts = { hostname: '127.0.0.1', port, path, method, headers }; | ||
// eslint-disable-next-line consistent-return | ||
return new Promise((resolve, reject) => { | ||
const opts = { hostname: '127.0.0.1', port, path, method }; | ||
const req = http_1.request(opts, res => { | ||
@@ -154,2 +154,15 @@ const response = res; | ||
}); | ||
for (const [name, value] of Object.entries(headers)) { | ||
if (value === undefined) { | ||
console.error('Skipping HTTP request header %j because value is undefined', name); | ||
continue; | ||
} | ||
try { | ||
req.setHeader(name, value); | ||
} | ||
catch (err) { | ||
console.error('Skipping HTTP request header: %j', `${name}: ${value}`); | ||
console.error(err.message); | ||
} | ||
} | ||
if (body) | ||
@@ -156,0 +169,0 @@ req.write(body); |
{ | ||
"name": "@vercel/node", | ||
"version": "1.6.2-canary.0", | ||
"version": "1.6.2-canary.1", | ||
"license": "MIT", | ||
@@ -40,7 +40,7 @@ "main": "./dist/index", | ||
"etag": "1.8.1", | ||
"mkdirp-promise": "5.0.1", | ||
"node-fetch": "2.6.0", | ||
"source-map-support": "0.5.12", | ||
"test-listen": "1.1.0" | ||
}, | ||
"gitHead": "f61b36495c4c1573ede1835645e43aee0b2cd588" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
0
84664
4
2945006
17
13