fetch-har
Advanced tools
Comparing version 6.0.0 to 6.0.1
@@ -0,1 +1,23 @@ | ||
## <small>6.0.1 (2022-01-26)</small> | ||
* fix: regression in query parameter handling (#242) ([6c6a147](https://github.com/readmeio/fetch-har/commit/6c6a147)), closes [#242](https://github.com/readmeio/fetch-har/issues/242) | ||
## <small>6.0.0 (2022-01-25)</small> | ||
> **BREAKING CHANGE** | ||
> | ||
> With this release we no longer support the [form-data](https://npm.im/form-data) package as it's handling of `multipart/form-data` is non-compliant with the browser `FormData` API. Please use [formdata-node](https://npm.im/formdata-node) or [formdata-polyfill](https://npm.im/formdata-polyfill) instead. | ||
> | ||
> Additionally the optional `userAgent` option has been reworked into a new options object that also supports a new `files` mapping array for augmenting binaries or file uploads within a HAR with a file buffers or the `File` API. See the readme for documentation. | ||
* fix: handling of multipart/form-data requests and how we interact with FormData ([#237](https://github.com/readmeio/fetch-har/pull/237)) | ||
* chore(deps-dev): bumping node-fetch ([#240]((https://github.com/readmeio/fetch-har/pull/240)) | ||
* fix: improper handling of query strings ([#239](https://github.com/readmeio/fetch-har/pull/239)) | ||
* feat: extending the new files option to allow overriding raw binary payloads ([#238](https://github.com/readmeio/fetch-har/pull/238)) | ||
## <small>5.0.5 (2022-01-03)</small> | ||
@@ -2,0 +24,0 @@ |
@@ -289,10 +289,13 @@ const { Readable } = require('readable-stream'); | ||
// We automaticaly assume that the HAR that we have already has query parameters encoded within it so we do **not** | ||
// use the `URLSearchParams` API here for composing the query string. | ||
if ('queryString' in request && request.queryString.length) { | ||
const queryParams = new URL(url).searchParams; | ||
const urlObj = new URL(url); | ||
const queryParams = Array.from(urlObj.searchParams).map(([k, v]) => `${k}=${v}`); | ||
request.queryString.forEach(q => { | ||
queryParams.append(q.name, q.value); | ||
queryParams.push(`${q.name}=${q.value}`); | ||
}); | ||
querystring = queryParams.toString(); | ||
querystring = queryParams.join('&'); | ||
} | ||
@@ -299,0 +302,0 @@ |
{ | ||
"name": "fetch-har", | ||
"version": "6.0.0", | ||
"version": "6.0.1", | ||
"description": "Make a fetch request from a HAR definition", | ||
@@ -47,3 +47,3 @@ "main": "index.js", | ||
"formdata-node": "^4.3.2", | ||
"har-examples": "^3.0.0", | ||
"har-examples": "^3.1.0", | ||
"isomorphic-fetch": "^3.0.0", | ||
@@ -50,0 +50,0 @@ "mocha": "^9.1.4", |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
68699
317
1