@apollo/datasource-rest
Advanced tools
Comparing version 5.1.0 to 5.1.1
@@ -154,6 +154,3 @@ "use strict"; | ||
for (const [name, value] of Object.entries(headers)) { | ||
if (typeof value === 'string') { | ||
headerList.push([name, value]); | ||
} | ||
else if (value) { | ||
if (Array.isArray(value)) { | ||
for (const subValue of value) { | ||
@@ -163,2 +160,5 @@ headerList.push([name, subValue]); | ||
} | ||
else if (value) { | ||
headerList.push([name, value]); | ||
} | ||
} | ||
@@ -170,7 +170,7 @@ return headerList; | ||
for (const [name, value] of Object.entries(headers)) { | ||
if (typeof value === 'string') { | ||
headerRecord[name] = value; | ||
if (Array.isArray(value)) { | ||
headerRecord[name] = value.join(', '); | ||
} | ||
else if (value) { | ||
headerRecord[name] = value.join(', '); | ||
headerRecord[name] = value; | ||
} | ||
@@ -177,0 +177,0 @@ } |
{ | ||
"name": "@apollo/datasource-rest", | ||
"description": "REST DataSource for Apollo Server v4", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"author": "Apollo <packages@apollographql.com>", | ||
@@ -39,5 +39,5 @@ "license": "MIT", | ||
"@types/lodash.isplainobject": "4.0.7", | ||
"@types/node": "14.18.42", | ||
"@typescript-eslint/eslint-plugin": "5.59.0", | ||
"@typescript-eslint/parser": "5.59.0", | ||
"@types/node": "14.18.43", | ||
"@typescript-eslint/eslint-plugin": "5.59.1", | ||
"@typescript-eslint/parser": "5.59.1", | ||
"cspell": "6.31.1", | ||
@@ -49,3 +49,3 @@ "eslint": "8.39.0", | ||
"jest-junit": "16.0.0", | ||
"nock": "13.3.0", | ||
"nock": "13.3.1", | ||
"prettier": "2.8.8", | ||
@@ -52,0 +52,0 @@ "ts-jest": "29.1.0", |
@@ -334,8 +334,8 @@ import nodeFetch, { | ||
for (const [name, value] of Object.entries(headers)) { | ||
if (typeof value === 'string') { | ||
headerList.push([name, value]); | ||
} else if (value) { | ||
if (Array.isArray(value)) { | ||
for (const subValue of value) { | ||
headerList.push([name, subValue]); | ||
} | ||
} else if (value) { | ||
headerList.push([name, value]); | ||
} | ||
@@ -358,6 +358,6 @@ } | ||
for (const [name, value] of Object.entries(headers)) { | ||
if (typeof value === 'string') { | ||
if (Array.isArray(value)) { | ||
headerRecord[name] = value.join(', '); | ||
} else if (value) { | ||
headerRecord[name] = value; | ||
} else if (value) { | ||
headerRecord[name] = value.join(', '); | ||
} | ||
@@ -364,0 +364,0 @@ } |
Sorry, the diff of this file is not supported yet
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