Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fetch-har

Package Overview
Dependencies
Maintainers
11
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fetch-har - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

22

CHANGELOG.md

@@ -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 @@

9

index.js

@@ -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",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc