@modern-js/create-request 2.67.11 → 2.68.1

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.
@@ -40,6 +40,9 @@ const handleRes = async (res) => {
40
40
  if (contentType === null || contentType === void 0 ? void 0 : contentType.includes("application/octet-stream")) {
41
41
  return res.arrayBuffer();
42
42
  }
43
+ if (contentType === null || contentType === void 0 ? void 0 : contentType.includes("image/png")) {
44
+ return res;
45
+ }
43
46
  return res.text();
44
47
  };
45
48
  // Annotate the CommonJS export names for ESM import in node:
@@ -46,6 +46,12 @@ var handleRes = function() {
46
46
  res.arrayBuffer()
47
47
  ];
48
48
  }
49
+ if (contentType === null || contentType === void 0 ? void 0 : contentType.includes("image/png")) {
50
+ return [
51
+ 2,
52
+ res
53
+ ];
54
+ }
49
55
  return [
50
56
  2,
51
57
  res.text()
@@ -17,6 +17,9 @@ const handleRes = async (res) => {
17
17
  if (contentType === null || contentType === void 0 ? void 0 : contentType.includes("application/octet-stream")) {
18
18
  return res.arrayBuffer();
19
19
  }
20
+ if (contentType === null || contentType === void 0 ? void 0 : contentType.includes("image/png")) {
21
+ return res;
22
+ }
20
23
  return res.text();
21
24
  };
22
25
  export {
package/package.json CHANGED
@@ -15,7 +15,7 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.67.11",
18
+ "version": "2.68.1",
19
19
  "jsnext:source": "./src/node.ts",
20
20
  "types": "./dist/types/browser.d.ts",
21
21
  "main": "./dist/cjs/node.js",
@@ -72,11 +72,11 @@
72
72
  "dependencies": {
73
73
  "@swc/helpers": "^0.5.17",
74
74
  "encoding": "^0.1.13",
75
- "node-fetch": "^2.6.1",
76
- "path-to-regexp": "^6.2.0",
77
- "query-string": "^7.1.1",
78
- "@modern-js/runtime-utils": "2.67.11",
79
- "@modern-js/utils": "2.67.11"
75
+ "node-fetch": "^2.7.0",
76
+ "path-to-regexp": "^6.3.0",
77
+ "query-string": "^7.1.3",
78
+ "@modern-js/utils": "2.68.1",
79
+ "@modern-js/runtime-utils": "2.68.1"
80
80
  },
81
81
  "devDependencies": {
82
82
  "@types/jest": "^29",
@@ -86,9 +86,9 @@
86
86
  "jest": "^29",
87
87
  "nock": "^13.5.6",
88
88
  "typescript": "^5",
89
- "@modern-js/types": "2.67.11",
89
+ "@scripts/build": "2.66.0",
90
90
  "@scripts/jest-config": "2.66.0",
91
- "@scripts/build": "2.66.0"
91
+ "@modern-js/types": "2.68.1"
92
92
  },
93
93
  "sideEffects": false,
94
94
  "publishConfig": {