Releases: unjs/ofetch
Releases · unjs/ofetch
v1.5.1
v2.0.0-alpha.3
v2.0.0-alpha.2
v2 alpha
🧹 Highlights
- 🌐 ESM-only + Native Web APIs
- 📦 Zero deps (3 → 0)
- 📉 Install: 900 KB → 28 KB
- ⚡️Bundle: 17.4 KB (6.5 KB gz) → 6.3 KB (2.4 KB gz)
🚀 Enhancements
- Support custom AbortSignal with timeout (#508)
💅 Refactors
- More strict types (413397a)
- Remove dependency on node-fetch-native (#518)
- Inline url utils (#440)
- Use native JSON.parse (#520)
📦 Build
⚠️ ESM-only dist (#519)
✅ Tests
- Upgrade to h3 v2 (7afa20a)
⚠️ Breaking Changes
⚠️ Support custom AbortSignal with timeout (#508)⚠️ Remove dependency on node-fetch-native (#518)⚠️ Inline url utils (#440)⚠️ Use native JSON.parse (#520)⚠️ ESM-only dist (#519)
❤️ Contributors
- Pooya Parsa (@pi0)
- Johann Schopplich (@johannschopplich)
- Robin (@OrbisK)
v1.5.0
🚀 Enhancements
- Serialize with
URLSearchParamsforapplication/x-www-form-urlencodedcontent type header (#482) - Auto detect
text/event-streamasstreamresponse type (#486)
🩹 Fixes
- Mark
FormData&URLSearchParamsas non-serializable for bun compatibility (#483)
💅 Refactors
- Deprecate
paramsin favor ofquery(#511)
📖 Documentation
- readme: Use
ProxyAgentin example (#465) - Fix typo (#472)
- Add
retryStatusCodesoption to auto retry example (#480) - Guide on augmenting
FetchOptions(#487) - Replace ProxyAgent with Agent in self-signed certs example (#516)
❤️ Contributors
v1.4.1
🩹 Fixes
- Remove undefined
methodandquery/paramsfrom fetch options for older chrome compat (#451) - Use
response._bodyInitas fallback for react-native and qq (#398)
✅ Tests
- Fix typo (#448)
❤️ Contributors
- Joshua Sosso (@joshmossas)
- Pooya Parsa (@pi0)
- @beer (@iiio2)
- Cooper Roper [email protected]
v1.4.0
Important
In the interceptors, the ctx.options.headers is now always normalized to Headers.
This is not a breaking change as ofetch >=1.4 will narrow 3 possibilities of HeadersInit to be always normalized Headers.
If you were previously not handling the Headers case and implicitly depending on input, you need to update the logic.
🚀 Enhancements
- Support
retryDelaywith callback function (#372) - Add better message and code for timeout error (#351)
- Allow custom global options for
$fetch.create(#401) - Support interceptors arrays (#353)
- Always clone and normalize
options.headersandoptions.query(#436)
🩹 Fixes
- Export types from
nodeexport condition (#407) - Use the wrapper to allow patching global
fetch(#377)
📖 Documentation
- Add docs for using undici dispatcher (#389)
🌊 Types
- Add
agentanddispatcheroptions (node-specific) (#308)
✅ Tests
- Add additional tests for hook errors (7ff4d11)
❤️ Contributors
- Pooya Parsa (@pi0)
- Antoine Rey [email protected]
- Cafu Chino [email protected]
- Marco Solazzi [email protected]
- @beer (@iiio2)
- Daniel Roe (@danielroe)
- Arlo [email protected]
- Alexander Topalo [email protected]
- Sam Blowes [email protected]
- Kongmoumou (@kongmoumou)
v1.3.4
🩹 Fixes
- Clear abort timeout after response was received (#369)
Types
💅 Refactors
- Remove extra line (#374)
📖 Documentation
- Add initial examples (#288)
📦 Build
- Add top-level
react-nativefield (03680dd)
❤️ Contributors
- Pooya Parsa (@pi0)
- Alex Liu (@Mini-ghost)
- Danila Rodichkin (@daniluk4000)
- Maxime Pauvert (@maximepvrt)
- Estéban (@Barbapapazes)
- Saman [email protected]
v1.3.3
🩹 Fixes
- Augment
FetchErrortype to includeIFetchError(#279)
❤️ Contributors
- Johann Schopplich (@johannschopplich)