Releases: exogen/node-fetch-har
Releases · exogen/node-fetch-har
v1.0.1
Bug Fix
- Socket event listeners (
lookup,connect,secureConnect) are now attached withonceand explicitly removed on requestfinish. This fixes listeners from sticking around on sockets that end up being reused (for example, with agentkeepalive’s socket pooling.
v1.0.0
v1.0.0-rc.3
Enhancement
- Set the
_resourceTypefield tofetchso that requests are categorized under XHR/Fetch in common HAR viewers (like Chrome or Firefox’s Network tab).
Internal
- Use
URL.createObjectURLto 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
New Feature
-
Custom agents! If you pass a custom
agenttofetch(as supported bynode-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
withHarcontexts as well, this instrumentation should have no adverse effects and will be disabled unless invoked bywithHarspecifically (since it adds a special header).
Enhancements
- If not using a custom agent (see above), the HAR tracking agent instances created by
withHarare now shared globally, instead of created for eachwithHarinstance.
v1.0.0-rc.1
Enhancement
- Gracefully handle bogus
Set-Cookieresponse headers instead of throwing an error. The header will still appear inheaders, but nocookieswill be added from it.
v0.9.0
v0.8.0
v0.7.0
New Feature
- Support for compression savings info via the
compressionfield.
Enhancement
- Sizes are now calculated with
Buffer.byteLengthinstead of stringlengthwhere possible. - Use high resolution timestamps via
process.hrtime. - More accurately determine the
sendduration by listening for the ClientRequest’sfinishevent. 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
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
Bug Fix
- Fix an issue on some versions of
node-fetchwhere the constructor of the returnedresponseis notResponse, but rather a differentBodyclass that does not set the same properties. This caused our cloned response instance to not have aheadersproperty. Now, we check the input Fetch instance for aResponseproperty (likenode-fetchdoes) or try to get it fromglobal(likeisomorphic-fetchdoes) before falling back toresponse.constructor. To fully override the class (for more complicated scenarios), use the newResponseoption towithHar.
Internal
- Add real tests using Jest. All of
node-fetch,isomorphic-fetch, andisomorphic-unfetchare tested. Even though they all usenode-fetch,isomorphic-fetchuses an old version, and we may need to test additional integration points (like what properties exist on the default export).