Releases: developit/unfetch
isomorphic-4.0.2
- Fix missing files in the isomorphic-unfetch@4.0.1 and 4.0.0 releases.
Full Changelog: isomorphic-4.0.1...isomorphic-4.0.2
5.0.0
What's Changed
- Add TypeScript definitions and export them @developit in #159
- Add Package Exports to both unfetch and isomorphic-unfetch
New Contributors
- @RishikeshDarandale made their first contribution to isomorphic-unfetch in #156
Full Changelog: 4.2.0...5.0.0
isomorphic-4.0.1
What's Changed
- update node-fetch to 3.x by @RishikeshDarandale in #156
- (in unfetch core) add TypeScript definitions by @developit in #159
New Contributors
- @RishikeshDarandale made their first contribution in #156
Full Changelog: isomorphic-3.1.0...isomorphic-4.0.1
4.2.0
- Fix unintentional use of arrow functions in some 4.1.0 builds (#138, thanks @simon04!)
- Fix usage in Web Workers (#109)
.json()
parse errors return a rejected Promise instead of throwing (#112, thanks @sunsean!)- Improved TypeScript typings (#117 & #121, thanks @Andarist & @0x80!)
- Add support for passing
URL
objects tofetch()
(#141, thanks @Edorka for the tip!)
Please make sure to also update to
isomorphic-unfetch@3.1.0
, which includes a security fix fornode-fetch
. (thanks @sakito21)
4.1.0
4.0.1
4.0.0
π¦ Small breaking change for awesome ponyness:
unfetch
is now a pure ponyfill.unfetch/polyfill
is now the polyfill version (even smaller than the ponyfill!)- All modules are shipped in all formats, and the polyfill is now < 500b.
- Also a little bugfix for IE11 (#85, thanks @khusa)
TL;DR:
require('unfetch')
no longer returnswindow.fetch
when it exists. For that, useunfetch/polyfill
.
This change makes unfetch lovely to use as a polyfill from HTML:
<script src="https://unpkg.com/unfetch/polyfill"></script>
<!-- that's it! -->
<script>foo = await fetch('/foo.json')</script>
Otherwise, if you're using Unfetch and bundling your code, continue as you were before:
if (!self.fetch) self.fetch = require('unfetch');
// or simply:
import 'unfetch/polyfill';
Important - the one thing to avoid:
Since unfetch is a proper ponyfill, it will now overwrite
fetch
even in supported browsers if you do the following// never do this! window.fetch = require('unfetch');
3.1.2
3.1.1
3.1.0
Also released:
isomorphic-unfetch@2.1.0
- now with node-fetch 2.x, TypeScript definitions and a readme.
- TypeScript definitions!
- Fixes a bug in response status code parsing
- Fixes XHR being potentially synchronous in really old browsers
- Fixes parsing of empty header values
- Serves up the umd bundle on unpkg.com