Skip to content

Releases: sindresorhus/ky

v0.14.0

09 Sep 16:38
Compare
Choose a tag to compare
  • Add beforeRetry hook (#159) 4eb3677
  • Allow returning Response from a beforeRequest hook (#172) 59d36ac
  • Move globals to getters to allow them to be mocked (#153) ac07244

v0.13.0...v0.14.0

v0.13.0

03 Sep 17:51
Compare
Choose a tag to compare

Breaking

  • Pass input & options arguments to beforeRequest & afterResponse hooks (#163) 9181aa2
 await ky('…', {
 	hooks: {
 		beforeRequest: [
-			options => {}
+			(input, options) => {}
 		]
 		afterResponse: [
-			response => {}
+			(input, options, response) => {}
 		]
 	}
 });

Enhancements

  • Make the retry option more powerful (#110) d4ddb7a
    You can now control which HTTP methods and status codes that should cause a retry.
  • Simplify the Options TypeScript type (#165) bfdc9b5
    This should make it easier to wrap Ky when using TypeScript.

v0.12.0...v0.13.0

v0.12.0

12 Aug 21:04
Compare
Choose a tag to compare

v0.11.2...v0.12.0

v0.11.2

26 Jul 23:58
Compare
Choose a tag to compare
  • Fix timeout regression that caused Node.js to not terminate (#145) 30450d8

v0.11.1...v0.11.2

v0.11.1

07 Jun 07:26
Compare
Choose a tag to compare
  • Fix TypeScript 3.5 compatibility 93d2faf

v0.11.0...v0.11.1

v0.11.0

10 May 15:35
Compare
Choose a tag to compare

Breaking (possibly):

Enhancements:

Fixes:

  • Fix ky.extend() not inheriting its parent and add ky.create() (#128) 0a6beb1

v0.10.0...v0.11.0

v0.10.0

19 Apr 04:11
Compare
Choose a tag to compare

Breaking (for TypeScript users only):

  • Don't export the Ky TypeScript namespace 7114ba3

Enhancements:

  • Set accept header for Ky shortcut methods (#118) afc18ea
  • Make it possible to install Ky in Node.js 8 even though it's not support (This is to re-enable Node.js 8 support in ky-universal) fcffa18

Fixes:

  • Fix regression for environments without AbortController, for example, React Native (#125) a012fd3

v0.9.1...v0.10.0

v0.9.1

09 Apr 19:07
Compare
Choose a tag to compare
  • Fix problem with debugging timed-out requests (#122) ed17c9a
  • Fix TypeScript types to allow hooks to return a Promise (#123) bc6aa04
  • Fix TypeScript Error types (#113) 8d295b0

v0.9.0...v0.9.1

v0.9.0

22 Feb 04:35
Compare
Choose a tag to compare
  • Fix afterResponse hook & retry not being called (#95) cd33a63
  • Improve TypeScript types for get and head methods (#87) 66ea8a7

v0.8.0...v0.9.0

v0.8.0

09 Feb 04:00
Compare
Choose a tag to compare
  • Make the .json() method generic (#98) ce12902
  • Actually cancel the request after the timeout (#27) 8f17a13

v0.7.1...v0.8.0