Skip to content

Releases: exogen/node-fetch-har

v1.0.1

03 Oct 02:53
Compare
Choose a tag to compare

Bug Fix

  • Socket event listeners (lookup, connect, secureConnect) are now attached with once and explicitly removed on request finish. This fixes listeners from sticking around on sockets that end up being reused (for example, with agentkeepalive’s socket pooling.

v1.0.0

09 Jul 04:27
Compare
Choose a tag to compare
  • No changes from the latest Release Candidate. This library has been deemed stable after several weeks of testing in staging and production environments.

v1.0.0-rc.3

06 Jul 10:33
Compare
Choose a tag to compare

Enhancement

  • Set the _resourceType field to fetch so that requests are categorized under XHR/Fetch in common HAR viewers (like Chrome or Firefox’s Network tab).

Internal

  • Use URL.createObjectURL to generate the HAR download link in the Next.js demo. This is preferable because it allows the data to be of any size.

v1.0.0-rc.2

15 Jun 20:36
Compare
Choose a tag to compare
v1.0.0-rc.2 Pre-release
Pre-release

New Feature

  • Custom agents! If you pass a custom agent to fetch (as supported by node-fetch) it will be instrumented with HAR tracking behavior. This allows you to use helpers like agentkeepalive.

    If you are using the custom agent outside of withHar contexts as well, this instrumentation should have no adverse effects and will be disabled unless invoked by withHar specifically (since it adds a special header).

Enhancements

  • If not using a custom agent (see above), the HAR tracking agent instances created by withHar are now shared globally, instead of created for each withHar instance.

v1.0.0-rc.1

12 Jun 16:07
Compare
Choose a tag to compare
v1.0.0-rc.1 Pre-release
Pre-release

Enhancement

  • Gracefully handle bogus Set-Cookie response headers instead of throwing an error. The header will still appear in headers, but no cookies will be added from it.

v0.9.0

12 Jun 05:36
Compare
Choose a tag to compare

New Feature

  • Support for the ssl timing when the socket emits a secureConnect event.

v0.8.0

12 Jun 04:46
Compare
Choose a tag to compare

New Feature

  • The blocked, dns, and connect timings are now recorded.

v0.7.0

12 Jun 02:33
Compare
Choose a tag to compare

New Feature

  • Support for compression savings info via the compression field.

Enhancement

  • Sizes are now calculated with Buffer.byteLength instead of string length where possible.
  • Use high resolution timestamps via process.hrtime.
  • More accurately determine the send duration by listening for the ClientRequest’s finish event. In practice, most of this time is actually going to be attributable to DNS/connect/SSL/etc. but it’s better than nothing for now.

v0.6.0

11 Jun 04:46
Compare
Choose a tag to compare

New Feature

  • Support for redirects. When Fetch is configured to transparently follow redirects (the default), multiple HAR entries will be emitted. See the Redirects section of the README.
  • Support for request body info. See the Request Body section of the README.

v0.5.0

09 Jun 20:25
Compare
Choose a tag to compare

Bug Fix

  • Fix an issue on some versions of node-fetch where the constructor of the returned response is not Response, but rather a different Body class that does not set the same properties. This caused our cloned response instance to not have a headers property. Now, we check the input Fetch instance for a Response property (like node-fetch does) or try to get it from global (like isomorphic-fetch does) before falling back to response.constructor. To fully override the class (for more complicated scenarios), use the new Response option to withHar.

Internal

  • Add real tests using Jest. All of node-fetch, isomorphic-fetch, and isomorphic-unfetch are tested. Even though they all use node-fetch, isomorphic-fetch uses an old version, and we may need to test additional integration points (like what properties exist on the default export).