Skip to content

Releases: developit/unfetch

isomorphic-4.0.2

03 Jan 02:30
Compare
Choose a tag to compare

Full Changelog: isomorphic-4.0.1...isomorphic-4.0.2

5.0.0

31 Dec 04:24
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 4.2.0...5.0.0

isomorphic-4.0.1

31 Dec 04:23
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: isomorphic-3.1.0...isomorphic-4.0.1

4.2.0

29 Sep 17:58
8160c81
Compare
Choose a tag to compare
  • 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 to fetch() (#141, thanks @Edorka for the tip!)

Please make sure to also update to [email protected], which includes a security fix for node-fetch. (thanks @sakito21)

4.1.0

03 Mar 23:18
Compare
Choose a tag to compare

4.0.1

17 Sep 22:14
Compare
Choose a tag to compare

Quick publishing fix.

4.0.0

17 Sep 18:44
Compare
Choose a tag to compare

πŸ¦„ 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 returns window.fetch when it exists. For that, use unfetch/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

17 Sep 22:12
Compare
Choose a tag to compare

3.1.1

30 Jul 18:37
Compare
Choose a tag to compare

3.1.0

20 Jul 02:54
Compare
Choose a tag to compare

Also released: [email protected] - 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