@faasjs/request 0.0.3-beta.35 → 0.0.3-beta.37

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.
package/dist/index.js CHANGED
@@ -145,7 +145,7 @@ async function request(url, {
145
145
  response.body = data;
146
146
  if (response.body && response.headers["content-type"] && response.headers["content-type"].includes("application/json"))
147
147
  try {
148
- response.body = parse ? parse(response.body) : JSON.parse(response.body);
148
+ response.body = (parse || JSON.parse)(response.body);
149
149
  logger.debug("response.parse JSON");
150
150
  } catch (error) {
151
151
  console.warn("response plain body", response.body);
package/dist/index.mjs CHANGED
@@ -113,7 +113,7 @@ async function request(url, {
113
113
  response.body = data;
114
114
  if (response.body && response.headers["content-type"] && response.headers["content-type"].includes("application/json"))
115
115
  try {
116
- response.body = parse ? parse(response.body) : JSON.parse(response.body);
116
+ response.body = (parse || JSON.parse)(response.body);
117
117
  logger.debug("response.parse JSON");
118
118
  } catch (error) {
119
119
  console.warn("response plain body", response.body);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@faasjs/request",
3
- "version": "0.0.3-beta.35",
3
+ "version": "0.0.3-beta.37",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -22,7 +22,7 @@
22
22
  "dist"
23
23
  ],
24
24
  "dependencies": {
25
- "@faasjs/logger": "^0.0.3-beta.35"
25
+ "@faasjs/logger": "^0.0.3-beta.37"
26
26
  },
27
27
  "engines": {
28
28
  "npm": ">=8.0.0",