Skip to content

Releases: MattCCC/fetchff

v.1.2.8

21 Feb 18:53
Compare
Choose a tag to compare

Fixed:

  • Main entry point should point to the browser script

v.1.2.6

21 Feb 18:24
Compare
Choose a tag to compare

Features:

  • Updated Axios to newest version 0.26.0

Fixes:

  • [typescript] fix typing issue in onError method supplied class

v1.2.5

12 Aug 20:10
Compare
Choose a tag to compare

Features:

  • Per request on error callback (onError() as 3rd argument)

v1.2.4

10 Aug 16:46
Compare
Choose a tag to compare

Bug fixes:

  • Rollup build failure if production node env flag is not set

v1.2.3

03 Aug 19:19
Compare
Choose a tag to compare

Bug fixes:

  • Fixed tests

v1.2.2

03 Aug 19:15
Compare
Choose a tag to compare

NEW FEATURES:

  • Feature: Support for all axios compatible methods

Bug fixes:

  • Uppercase methods specified in config weren't working

Other improvements:

  • Improved readme

v1.2.1

29 May 21:10
Compare
Choose a tag to compare

NEW FEATURES:

  • Feature: Automatic request cancellation - the handler will automatically create a new cancel token each time a request is called and cancel the previous one
  • Feature: New setting defaultResponse (default: null); it's global and per endpoint
  • Feature: New setting cancellable (boolean; default: false); it's global and per endpoint
  • Feature: New setting rejectCancelled (boolean; default: false); it's per endpoint only
  • Feature: New strategy: "defaultResponse"
  • Feature: Specify settings directly in apiEndpoints
  • Feature: Error handling strategy can be applied per request

POSSIBLY BREAKING:

  • Renamed: "httpRequestErrorService" in createApiFetcher() is now called "onError".
  • Deprecated: "throwError" setting. It will fallback to "reject" which is in fact the same
  • Deprecated: Node 10 support (minimum required is 12 now)
  • Bundle: Only esm + prod ready cjs will be shipped via npm

Bug fixes:

  • Fix: throwError strategy wasn't processing globally set error handler

Other improvements:

  • Misc: improved readme + examples of error handling and TypeScript interfaces
  • Dependencies: 1 less dependency (smaller bundle)
  • Bundle: Significant decrease of bundle size (343kb to 88kb). Minified prod file is only around 9kb now.

Please check revamped readme for more information.

v1.1.1

14 May 16:03
Compare
Choose a tag to compare
  • fix: API types file isn't available in dist/ directory

v1.1.0

14 May 15:38
Compare
Choose a tag to compare
  • Feature: Introduce flattenResponse config option
  • Feature: Allow to pass Axios Config when creating new instance of API handler - this way you can specify e.g. global headers for your requests
  • Feature: Improved TypeScript support by adding Endpoints and Endpoint interfaces
  • Feature: Added possibility to pass Axios compatible config when calling particular endpoints (as 3rd argument)
  • Fixed: config passed to handler was not always respected
  • Misc: Better testing coverage
  • Misc: Updated Readme + fixed some typos

v1.0.3

14 Feb 15:17
Compare
Choose a tag to compare
  • Feature: Added responsible defaults for the API handler
  • Feature: Improve TS compatibility
  • Feature: Add HEAD and PATCH support
  • Fixed: Prevent handler from running for non-existent endpoints
  • Misc: Improved Readme
  • Misc: List of features in Readme
  • Build: Adjust package limits
  • Build: Unit tests for request handler
  • Build: Fix request handler import path for tests