Skip to content

Releases: unjs/ofetch

v1.5.1

01 Nov 08:47
@pi0 pi0
d61b2fc

Choose a tag to compare

compare changes

🩹 Fixes

  • Normalize options.headers (again) after onRequest hook (#524)

❤️ Contributors

v2.0.0-alpha.3

28 Oct 11:48
@pi0 pi0

Choose a tag to compare

v2.0.0-alpha.3 Pre-release
Pre-release

compare changes

📦 Build

v2.0.0-alpha.2

28 Oct 11:40
@pi0 pi0

Choose a tag to compare

v2.0.0-alpha.2 Pre-release
Pre-release

compare changes

📦 Build

v2 alpha

28 Oct 11:33
@pi0 pi0

Choose a tag to compare

v2 alpha Pre-release
Pre-release

compare changes

🧹 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

⚠️ 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

v1.5.0

28 Oct 10:43
@pi0 pi0

Choose a tag to compare

compare changes

🚀 Enhancements

  • Serialize with URLSearchParams for application/x-www-form-urlencoded content type header (#482)
  • Auto detect text/event-stream as stream response type (#486)

🩹 Fixes

  • Mark FormData & URLSearchParams as non-serializable for bun compatibility (#483)

💅 Refactors

  • Deprecate params in favor of query (#511)

📖 Documentation

  • readme: Use ProxyAgent in example (#465)
  • Fix typo (#472)
  • Add retryStatusCodes option to auto retry example (#480)
  • Guide on augmenting FetchOptions (#487)
  • Replace ProxyAgent with Agent in self-signed certs example (#516)

❤️ Contributors

v1.4.1

08 Oct 15:50
@pi0 pi0

Choose a tag to compare

compare changes

🩹 Fixes

  • Remove undefined method and query/params from fetch options for older chrome compat (#451)
  • Use response._bodyInit as fallback for react-native and qq (#398)

✅ Tests

❤️ Contributors

v1.4.0

20 Sep 18:27
@pi0 pi0

Choose a tag to compare

compare changes

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 retryDelay with 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.headers and options.query (#436)

🩹 Fixes

  • Export types from node export condition (#407)
  • Use the wrapper to allow patching global fetch (#377)

📖 Documentation

  • Add docs for using undici dispatcher (#389)

🌊 Types

  • Add agent and dispatcher options (node-specific) (#308)

✅ Tests

  • Add additional tests for hook errors (7ff4d11)

❤️ Contributors

v1.3.4

21 Mar 12:49
@pi0 pi0

Choose a tag to compare

compare changes

🩹 Fixes

  • Clear abort timeout after response was received (#369)

Types

  • Export all types (#280)
  • Expose GlobalOptions type (#307)

💅 Refactors

  • Remove extra line (#374)

📖 Documentation

  • Add initial examples (#288)

📦 Build

  • Add top-level react-native field (03680dd)

❤️ Contributors

v1.3.3

25 Aug 09:29
@pi0 pi0

Choose a tag to compare

compare changes

🩹 Fixes

  • Augment FetchError type to include IFetchError (#279)

❤️ Contributors

v1.3.2

23 Aug 18:56
@pi0 pi0

Choose a tag to compare

compare changes

🩹 Fixes

  • Hide getters from console and pass cause (905244a)

❤️ Contributors

  • Pooya Parsa (@pi0)