fetch-har 8.0.0 → 8.0.3
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 +41 -0
- package/dist/index.js +2 -1
- package/package.json +4 -4
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,44 @@
|
|
|
1
|
+
## <small>8.0.3 (2022-06-28)</small>
|
|
2
|
+
|
|
3
|
+
* ci: pin ci to node 18.0 ([6ce62ac](https://github.com/readmeio/fetch-har/commit/6ce62ac))
|
|
4
|
+
* ci: pin to node 18.1 because 18.2 has broken cookie header support ([05748b4](https://github.com/readmeio/fetch-har/commit/05748b4))
|
|
5
|
+
* ci: running ci tests on the latest node 18 again ([0465075](https://github.com/readmeio/fetch-har/commit/0465075))
|
|
6
|
+
* build: 8.0.2 release ([491eedf](https://github.com/readmeio/fetch-har/commit/491eedf))
|
|
7
|
+
* chore(deps-dev): bump @jsdevtools/karma-config from 3.1.7 to 3.2.0 (#281) ([291f16d](https://github.com/readmeio/fetch-har/commit/291f16d)), closes [#281](https://github.com/readmeio/fetch-har/issues/281)
|
|
8
|
+
* chore(deps-dev): bump @readme/eslint-config from 8.7.3 to 8.8.0 (#285) ([47a83be](https://github.com/readmeio/fetch-har/commit/47a83be)), closes [#285](https://github.com/readmeio/fetch-har/issues/285)
|
|
9
|
+
* chore(deps-dev): bump @types/node from 17.0.30 to 17.0.38 (#275) ([9ad835a](https://github.com/readmeio/fetch-har/commit/9ad835a)), closes [#275](https://github.com/readmeio/fetch-har/issues/275)
|
|
10
|
+
* chore(deps-dev): bump eslint from 8.14.0 to 8.16.0 (#279) ([e78536f](https://github.com/readmeio/fetch-har/commit/e78536f)), closes [#279](https://github.com/readmeio/fetch-har/issues/279)
|
|
11
|
+
* chore(deps-dev): bump mocha from 9.2.2 to 10.0.0 (#277) ([62cc6b6](https://github.com/readmeio/fetch-har/commit/62cc6b6)), closes [#277](https://github.com/readmeio/fetch-har/issues/277)
|
|
12
|
+
* chore(deps-dev): bump ts-node from 10.7.0 to 10.8.1 (#286) ([fe87394](https://github.com/readmeio/fetch-har/commit/fe87394)), closes [#286](https://github.com/readmeio/fetch-har/issues/286)
|
|
13
|
+
* chore(deps-dev): bump typescript from 4.6.4 to 4.7.4 (#287) ([a9e5b29](https://github.com/readmeio/fetch-har/commit/a9e5b29)), closes [#287](https://github.com/readmeio/fetch-har/issues/287)
|
|
14
|
+
* chore(deps-dev): bump undici from 5.0.0 to 5.5.1 (#284) ([6e013e2](https://github.com/readmeio/fetch-har/commit/6e013e2)), closes [#284](https://github.com/readmeio/fetch-har/issues/284)
|
|
15
|
+
* chore(deps): bump actions/cache from 3.0.2 to 3.0.3 (#274) ([17071a2](https://github.com/readmeio/fetch-har/commit/17071a2)), closes [#274](https://github.com/readmeio/fetch-har/issues/274)
|
|
16
|
+
* 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)
|
|
17
|
+
* 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)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
## <small>8.0.2 (2022-05-20)</small>
|
|
22
|
+
|
|
23
|
+
* 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)
|
|
24
|
+
* 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)
|
|
25
|
+
* ci: pin ci to node 18.0 ([6ce62ac](https://github.com/readmeio/fetch-har/commit/6ce62ac))
|
|
26
|
+
* ci: pin to node 18.1 because 18.2 has broken cookie header support ([05748b4](https://github.com/readmeio/fetch-har/commit/05748b4))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
## <small>8.0.1 (2022-05-03)</small>
|
|
31
|
+
|
|
32
|
+
* fix: making har-format types a regular dep ([93dcb7d](https://github.com/readmeio/fetch-har/commit/93dcb7d))
|
|
33
|
+
* chore: don't remove a `@types/` directory that we aren't using ([c915fae](https://github.com/readmeio/fetch-har/commit/c915fae))
|
|
34
|
+
* chore(deps-dev): bump @types/node from 17.0.29 to 17.0.30 (#269) ([e6f62f3](https://github.com/readmeio/fetch-har/commit/e6f62f3)), closes [#269](https://github.com/readmeio/fetch-har/issues/269)
|
|
35
|
+
* chore(deps-dev): bump ts-loader from 7.0.5 to 9.3.0 (#268) ([34877c5](https://github.com/readmeio/fetch-har/commit/34877c5)), closes [#268](https://github.com/readmeio/fetch-har/issues/268)
|
|
36
|
+
* chore(deps-dev): bump typescript from 4.6.3 to 4.6.4 (#267) ([826dcac](https://github.com/readmeio/fetch-har/commit/826dcac)), closes [#267](https://github.com/readmeio/fetch-har/issues/267)
|
|
37
|
+
* chore(deps): bump actions/cache from 3.0.1 to 3.0.2 (#270) ([55e45a6](https://github.com/readmeio/fetch-har/commit/55e45a6)), closes [#270](https://github.com/readmeio/fetch-har/issues/270)
|
|
38
|
+
* chore(deps): bump github/codeql-action from 1 to 2 (#271) ([e29ddce](https://github.com/readmeio/fetch-har/commit/e29ddce)), closes [#271](https://github.com/readmeio/fetch-har/issues/271)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
1
42
|
## 8.0.0 (2022-04-28)
|
|
2
43
|
|
|
3
44
|
> **BREAKING CHANGE**
|
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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fetch-har",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
4
4
|
"description": "Make a fetch request from a HAR definition",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"homepage": "https://github.com/readmeio/fetch-har#readme",
|
|
32
32
|
"dependencies": {
|
|
33
|
+
"@types/har-format": "^1.2.8",
|
|
33
34
|
"parse-data-url": "^4.0.1",
|
|
34
35
|
"readable-stream": "^3.6.0"
|
|
35
36
|
},
|
|
@@ -41,7 +42,6 @@
|
|
|
41
42
|
"@jsdevtools/karma-config": "^3.1.7",
|
|
42
43
|
"@readme/eslint-config": "^8.7.3",
|
|
43
44
|
"@types/chai": "^4.3.1",
|
|
44
|
-
"@types/har-format": "^1.2.8",
|
|
45
45
|
"@types/mocha": "^9.1.1",
|
|
46
46
|
"@types/node": "^17.0.29",
|
|
47
47
|
"@types/parse-data-url": "^3.0.0",
|
|
@@ -54,12 +54,12 @@
|
|
|
54
54
|
"formdata-node": "^4.3.2",
|
|
55
55
|
"har-examples": "^3.1.1",
|
|
56
56
|
"isomorphic-fetch": "^3.0.0",
|
|
57
|
-
"mocha": "^
|
|
57
|
+
"mocha": "^10.0.0",
|
|
58
58
|
"nock": "^13.2.4",
|
|
59
59
|
"node-fetch": "^2.6.0",
|
|
60
60
|
"nyc": "^15.1.0",
|
|
61
61
|
"prettier": "^2.6.2",
|
|
62
|
-
"ts-loader": "^
|
|
62
|
+
"ts-loader": "^9.3.0",
|
|
63
63
|
"ts-node": "^10.7.0",
|
|
64
64
|
"typescript": "^4.6.3",
|
|
65
65
|
"undici": "^5.0.0"
|
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) {
|