NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1675 most downloaded on npm
A window.fetch polyfill.
Last release 3 years ago
no release in 18 months
Ships unpredictably
gaps range from 9 days to 2.4 years
Nearly every release is documented
notes for 51 of 51 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
51 releases · first in 2015
3.6.20 (2023-12-13) Bug Fixes Response.error().ok === false
One column per quarter.
Fix - File fetching broken since commit 0c1d2b9 by @mercpls in #1375
Revert "Resolves #928 " by @JakeChampion in #1366
20 July 2023
#928Resolves #928 by @JakeChampion in #1364
18 July 2023
#928fix #997 by @JakeChampion in #1363
18 July 2023
#997Fix #1076 by @JakeChampion in #1362
18 July 2023
#1076respect charset within readBlobAsText by @JakeChampion in #1361
Full Changelog: v3.6.12...v3.6.13
fix: Headers only accepts array which have nested array of length 2 by @JakeChampion in #1360
Full Changelog: v3.6.11...v3.6.12
18 July 2023
#1235Define Body.arrayBuffer even if support.blob is false by @JakeChampion in #1359
Full Changelog: v3.6.10...v3.6.11
18 July 2023
#992use global Headers if they exist by @JakeChampion in https://github.com/JakeChampion/fetch/pull/1358
Full Changelog: https://github.com/JakeChampion/fetch/compare/v3.6.9...v3.6.10
fix: when no body supplied, do not set bodyUsed to true by @JakeChampion in https://github.com/JakeChampion/fetch/pull/1357
Full Changelog: https://github.com/JakeChampion/fetch/compare/v3.6.8...v3.6.9
18 July 2023
7d92dffvalidate status is in range by @JakeChampion in https://github.com/JakeChampion/fetch/pull/1356
Full Changelog: https://github.com/JakeChampion/fetch/compare/v3.6.7...v3.6.8
dont use github eslint `408d3b6`
fix: ignore not throw on invalid response headers by @pke in https://github.com/JakeChampion/fetch/pull/950
Full Changelog: https://github.com/JakeChampion/fetch/compare/v3.6.5...v3.6.6
Update caniuse link to use HTTPS and new pattern by @Schweinepriester in https://github.com/JakeChampion/fetch/pull/1087
Full Changelog: https://github.com/JakeChampion/fetch/compare/v3.6.4...v3.6.5
always set a signal on Request by @romainmenke in https://github.com/JakeChampion/fetch/pull/1003
Full Changelog: https://github.com/JakeChampion/fetch/compare/v3.6.3...v3.6.4
Compatible global equals to the false by @cn-coderl in https://github.com/JakeChampion/fetch/pull/967
Full Changelog: https://github.com/JakeChampion/fetch/compare/v3.6.2...v3.6.3
Revert "Represent non-stringified JSON request body as an [object Object] string" `e42f201`
27 February 2021
e42f201Fixes a bug in v3.6.0 where the syntax used was not ES3 as it has used const
Bug fixes:
constBoth were fixed in https://github.com/github/fetch/pull/914
Improve error message if a header contains an invalid character -- https://github.com/github/fetch/pull/880 Thank you for the contribution @CarmeloPat
Bug fixes:
Improve error message if a header contains an invalid character -- https://github.com/github/fetch/pull/880 Thank you for the contribution @CarmeloPatti
Make Response.statusText be an empty string if set to undefined and be 'null' if set to null -- https://github.com/github/fetch/pull/897 Thank you for the contribution @tkrotoff
Represent non-stringified JSON request body as an [object Object] string -- https://github.com/github/fetch/pull/881 Thank you for the contribution @kettanaito
Added a work-around for projects which use core-js -- https://github.com/github/fetch/issues/748
Added a work-around for projects which use core-js -- https://github.com/github/fetch/issues/748
Republishing to ensure the dist/fetch.umd.js is up-to-date
Republishing to ensure the dist/fetch.umd.js is up-to-date
Use globalThis as the global object if it exists #822
Use globalThis as the global object if it exists #822
7 August 2020
96c2651rename variable to no longer shadow over function of same name `c5db762`
Updated documentation for AbortController to recommend a polyfill which is spec-compliant and fully synchronous. -- https://github.com/github/fetch/pu
Features:
Bug fixes:
Fixed the "self is not defined" error that was reported for NodeJS applications - https://github.com/github/fetch/pull/794
Reverted the DOMException handling refactor as the original code fixed issues in old Android browsers - https://github.com/github/fetch/pull/797
Response.arrayBuffer() now always resolve with a ArrayBuffer as per the specification. -- https://github.com/github/fetch/pull/816
Request and Response can now only be called via new (as constructors) as per the specification. -- https://github.com/github/fetch/pull/796
Headers which are passed as a Headers object no longer have their names normalised as per the specification -- https://github.com/github/fetch/pull/798
Refactor:
this to stop warnings being emitted from Rollup. -- https://github.com/github/fetch/pull/8154 August 2020
ArrayBuffer #801this to stop rollup warning #802#800#780new 5ef028db65ed6037b55c2Add support for no-cache and no-store - https://github.com/github/fetch/pull/795
Features:
Bug fixes:
new - https://github.com/github/fetch/pull/796Refactor:
9 July 2020
#724this if self is not defined #657global which is either self or this a0783a5a0dcd85this correct when using rollup 6e9fc0e-- check if Content-Type header exists prior to examining the value #792
Bug fix
-- check if Content-Type header exists prior to examining the value #792
Added documentation on features of fetch which are not polyfilled. -- https://github.com/github/fetch/pull/734
Documentation:
fetch which are not polyfilled. -- https://github.com/github/fetch/pull/734Bug fixes:
Empty header names used to not throw an error which was not compliant with the specification. They now throw a TypeError, the same as Chrome, Firefox and Safari do. -- https://github.com/github/fetch/pull/684
Changed the default status text of a response to align with the specification, the default is now an empty string. -- https://github.com/github/fetch/pull/698
We now allow exclamation mark as valid header character to align with the specification -- https://github.com/github/fetch/pull/745
We no longer convert application/octet-stream responses into Blobs if the browser supports ArrayBuffers -- https://github.com/github/fetch/pull/752
Added compatibility for fetch-mock -- https://github.com/github/fetch/pull/736
Making a fetch request with an empty string for the url no longer throws a DOMException error in Internet Explorer -- https://github.com/github/fetch/pull/619
Fixed another Internet Explorer bug to make sure all resolved fetch promises will trigger their promise chains -- https://github.com/github/fetch/pull/575
check if Content-Type header exists prior to examining the value `#792`
8 July 2020
#792#793#575#619#745#752#736#698#734#684#618#6619a0bce27f030fa1821b747 September 2018
#654#651#652#649credentials default value to same-origin #640#626#592#616#2#1#569#5760a57487fetch.js to be a clean module file 8aec47cb539589The whatwg-fetch package is now a module with exports. The following methods/classes are available:
The whatwg-fetch package is now a module with exports. The following methods/classes are available:
fetchHeadersRequestResponseDOMExceptionAll exports except for DOMException represent the polyfill implementations, not the native variants if they are available.
This library still automatically acts like a polyfill if native window.fetch is unavailable; there is currently no way to use it as a ponyfill.
Change credentials default value omit → same-origin to match the updated spec.
fetch() and new Request() now accept the signal parameter to accept an AbortSignal.
Join multiple header values with ,<space> instead of , to match other browsers.
Convert any Request/Response unsupported body type to a string to match the spec.
Flow type definitions are now included in the package.
Support obs-fold as delimiter when parsing raw headers
Support obs-fold as delimiter when parsing raw headers
Ensure cookies aren't sent if credentials: omit
Allow status: undefined in Response
29 March 2018
#604#553#534credentials: omit #526#492#496#469#49154dc3f80ecdd407831671Accept Array argument in Headers constructor
Treat any non-Request arg to new Request() as string url
new Request() as string urlFix reading ArrayBuffer into string on older browsers
Android 4.0 compatibility:
arrayBuffer() if Blob is also supportedThis changes the behavior of Headers regarding handling of headers with multiple values. Most notably, it removes the Headers.getAll() method. This di
This changes the behavior of Headers regarding handling of headers with multiple values. Most notably, it removes the Headers.getAll() method. This diverges from the native implementations of Chrome and Firefox, since those vendors implement an earlier, now outdated version of the spec. The polyfill now acts more similar to Microsoft Edge implementation.
Consider this Headers object:
var h = new Headers()
h.append('accept', 'text/html')
h.append('accept', 'text/plain')
h.append('content-type', 'application/json')
Before:
h.get('accept') returned text/htmlh.getAll('accept') returned an array of valuesh.forEach (and other iterables) did distinct iterations for each
value of the same headerNow:
h.get('accept') returns text/html,text/plainh.getAll() is no moreh.forEach() (and other iterables) now only do one iteration for each unique header name, regardless of whether it had multiple valuesThis is in accordance with Section 3.1.2 of the spec, "combine" concept.
Fix reading ArrayBuffer into string on older browsers
Android 4.0 compatibility:
arrayBuffer() if Blob is also supported1st argument to Request constructor must be string or Request
Spec compatibility:
fetch()arrayBuffer(), text(), or blob() methodsOther fixes:
read* method14 November 2016
#430#428#427#408#403#384#354#331read* method #353#376#350#308 #335#422#411#416#415#393#401ba7ffda9a04a06blob()/text() 9a703ba28 April 2016
#317#287mocha-phantomjs-core and system PhantomJS #314#306#272xhr.getAllResponseHeaders() being null #289#304#295#282#270#294a1b7674d77810aedb7c73Reject promise on request timeout
URLSearchParams request bodyHeaders iterable methods: keys, values, and entriesReject promise on request timeout
xhr.getAllResponseHeaders() being nullMake fetch add a Content-Type header based on the type of the body
Content-Type header based on the type of the bodyself isn't definedAllow making a POST request with an ArrayBuffer body
Fix handling non-String Headers names and values
fetch(request, options) invocation style with existing Request objectrequest.clone() methodresponse.clone() methodResponse.error() methodResponse.redirect(url, status) method12 October 2015
version property from bower.json #159#219#212#217#216#213#195#179#156#174fetch caveats #164#158#209 #185#205Request.clone() and Response.clone() methods 46705f7Request.clone() fd362dd184b647Invoke forEach callback with value, key, and Headers object.
forEach callback with value, key, and Headers object.thisArg forEach parameter.Fix "Error: INVALID_STATE_ERR: DOM Exception 11".
> 4 May 2015 - Fetch 0.8.1 `09c316d` - Ignore script/ dir `2e39db1`
Add a convenience ok getter on Response
ok getter on Response4 May 2015
#136#120#107#102#101#99ok getter on Response #82#85#84#8147fc7d529cc5dcba1214aFix up body consuming on request
24 January 2015
#78#77#67#74#71#70fbfa9e35ce5677614b2aaCheck for xhr.response only when supported.
X-Request-URL on CORS requestsUse xhr.responseType = 'blob' to preserve binary data.
xhr.responseType = 'blob' to preserve binary data.Expose Headers, Request and Response to window
X-Request-URL support12 January 2015
#57#62#56#59#55#54#53#51ecd8600cbd6c668a4b620Your coding agent can read these notes before it upgrades. Set up the MCP server →