Skip to content

Releases: unjs/ofetch

v1.4.1

08 Oct 15:50
@pi0 pi0
Compare
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
Compare
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
Compare
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
Compare
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
Compare
Choose a tag to compare

compare changes

🩹 Fixes

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

❤️ Contributors

  • Pooya Parsa (@pi0)

v1.3.1

23 Aug 18:18
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🏡 Chore

❤️ Contributors

  • Pooya Parsa (@pi0)

v1.3.0

23 Aug 18:15
@pi0 pi0
Compare
Choose a tag to compare

compare changes

🚀 Enhancements

  • Support customizable retryStatusCodes (#109)
  • Add options field and improve the formatting of errors (#270)
  • Automatically enable duplex to stream request body (#275)

🩹 Fixes

  • Avoid binding .native to $fetch (#272)
  • Skip reading the body with 204 responses and HEAD requests (#171, #84)
  • Improve response body check for node 16 compatibility (64d3aed)
  • Avoid serializing buffer body (#273)
  • Move body handling out of request block (15a28fb)

💅 Refactors

  • Remove unused response?: boolean option (#223)
  • Pass all fetch context to the error (b70e6b0)
  • error: Factory pattern for getters (6139785)

📖 Documentation

  • Improve explanation about body option (#276)

❤️ Contributors

  • Pooya Parsa (@pi0)
  • Nozomu Ikuta
  • Daniil Bezuglov

v1.2.1

22 Aug 17:57
@pi0 pi0
Compare
Choose a tag to compare

compare changes

📦 Build

  • Add missing node export condition (4081170)

🏡 Chore

✅ Tests

  • Speedup with background close (567fb35)

❤️ Contributors

  • Pooya Parsa (@pi0)

v1.2.0

22 Aug 13:15
@pi0 pi0
98396ec
Compare
Choose a tag to compare

compare changes

🚀 Enhancements

  • Support retryDelay (#262)
  • Support timeout and AbortController (#268)

🩹 Fixes

  • Always uppercase method option (#259)
  • pkg: Fix ts type resolution for /node subpath (#256)
  • Make all createFetch options optional (#266)

📖 Documentation

❤️ Contributors

v1.1.1

20 Jun 22:00
@pi0 pi0
6ff4da7
Compare
Choose a tag to compare

compare changes

🏡 Chore

  • Update destr to v2

❤️ Contributors

  • Pooya Parsa (@pi0)