fetch-har 8.0.1 → 8.0.2
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/CHANGELOG.md +9 -0
- package/dist/index.js +2 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## <small>8.0.2 (2022-05-20)</small>
|
|
2
|
+
|
|
3
|
+
* fix: don't look for a length on `postData.text` if it's undefined (#272) ([cd70c2f](https://github.com/readmeio/fetch-har/commit/cd70c2f)), closes [#272](https://github.com/readmeio/fetch-har/issues/272)
|
|
4
|
+
* fix: pin to node 18.0 (#273) ([9ab5991](https://github.com/readmeio/fetch-har/commit/9ab5991)), closes [#273](https://github.com/readmeio/fetch-har/issues/273)
|
|
5
|
+
* ci: pin ci to node 18.0 ([6ce62ac](https://github.com/readmeio/fetch-har/commit/6ce62ac))
|
|
6
|
+
* ci: pin to node 18.1 because 18.2 has broken cookie header support ([05748b4](https://github.com/readmeio/fetch-har/commit/05748b4))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
1
10
|
## <small>8.0.1 (2022-05-03)</small>
|
|
2
11
|
|
|
3
12
|
* fix: making har-format types a regular dep ([93dcb7d](https://github.com/readmeio/fetch-har/commit/93dcb7d))
|
package/dist/index.js
CHANGED
|
@@ -83,6 +83,7 @@ function isFormData(value) {
|
|
|
83
83
|
isFunction(value[Symbol.iterator]));
|
|
84
84
|
}
|
|
85
85
|
function fetchHAR(har, opts) {
|
|
86
|
+
var _a;
|
|
86
87
|
if (opts === void 0) { opts = {}; }
|
|
87
88
|
if (!har)
|
|
88
89
|
throw new Error('Missing HAR definition');
|
|
@@ -247,7 +248,7 @@ function fetchHAR(har, opts) {
|
|
|
247
248
|
options.body = JSON.stringify(formBody_1);
|
|
248
249
|
}
|
|
249
250
|
}
|
|
250
|
-
else if (request.postData.text.length) {
|
|
251
|
+
else if ((_a = request.postData.text) === null || _a === void 0 ? void 0 : _a.length) {
|
|
251
252
|
// If we've got `files` map content present, and this post data content contains a valid data URL then we can
|
|
252
253
|
// substitute the payload with that file instead of the using data URL.
|
|
253
254
|
if (opts.files) {
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -290,7 +290,7 @@ export default function fetchHAR(har: Har, opts: FetchHAROptions = {}) {
|
|
|
290
290
|
|
|
291
291
|
options.body = JSON.stringify(formBody);
|
|
292
292
|
}
|
|
293
|
-
} else if (request.postData.text
|
|
293
|
+
} else if (request.postData.text?.length) {
|
|
294
294
|
// If we've got `files` map content present, and this post data content contains a valid data URL then we can
|
|
295
295
|
// substitute the payload with that file instead of the using data URL.
|
|
296
296
|
if (opts.files) {
|