Skip to content

Releases: MattCCC/fetchff

v2.2.0

25 Jul 23:50
Compare
Choose a tag to compare

What's Changed

  • feat: Add native fetch() support by @MattCCC in #35 - with support for all of the same APIs as in Axios (native fetch() will be used automatically if axios instance is not passed)
  • Added easy request cancellation support for native fetch() (cancellable flag)
  • Added timeout support for native fetch()
  • Automatically stringify POST request body when using native fetch()

Fixes:

  • if requestConfig.data or requestConfig.body are specified together with queryParams when making API call, the API Handler will determine and utilize them accordingly
  • added clarification in the readme file that by default responses aren't flatten meaning that the response is passed as is

Full Changelog: v2.1.1...v2.2.0

v2.1.1

24 Jul 22:32
Compare
Choose a tag to compare

What's Changed

  • fix: Improve typings by @MattCCC in #34
  • fix: global is undefined in browser context

Full Changelog: v2.0.0...v2.1.1

v2.1.0

24 Jul 21:09
Compare
Choose a tag to compare

Changes:

  • [feat] New typings for Endpoints List (as generic in createApiFetcher(); please check tests for examples)

v2.0.0

04 Jul 00:39
Compare
Choose a tag to compare

Breaking changes:

  • Updated minimum Node.js version requirement to 18.
  • Endpoint interface order change: from Endpoint<QueryParams, UrlParams, ResponseData> to Endpoint<ResponseData, QueryParams, UrlParams> - response data is first as that is the one defined most often.
  • Generic type added for the createApiFetcher() function, usage: createApiFetcher<EndpointsList>()

Changes:

  • [feat] Possibility to use generics in API calls, i.e. api.getMovies()
  • updated dependencies & scanning to latest versions
  • removed unused Prettier configuration.
  • fixed linter issues
  • updated README.md to reflect new interface examples and usage

What's Changed

Full Changelog: v1.5.0...v2.0.0

v1.5.0

02 Jul 14:32
Compare
Choose a tag to compare

Breaking changes:

  • axios instance required as a dependency now meaning axios needs to be installed & imported separately

Changes:

  • decreased bundle size (micro-library)

  • codebase refactor + prettyfied output

  • updated dependencies to the latest versions

  • Axios update by @MattCCC in #29

  • Readme update by @MattCCC in #28

Full Changelog: v1.4.2...v1.5.0

v1.4.2

01 Sep 11:54
Compare
Choose a tag to compare

Changes:

  • fixed dist/ build to align with 1.4.* versions

v1.4.1

31 Aug 10:23
Compare
Choose a tag to compare

Improvements:

  • React integration information in the readme
  • Dependencies updated to latest versions
  • Various readme updates
  • new build process
  • use newer axios API for cancellation

Breaking changes:

  • Use reject strategy as default one for all requests - please set strategy: 'silent' param in your createApiFetcher function if you want previous behavior
  • change of setting name from apiEndpoints to endpoints
  • Supported Node 16+ (dropped support for 12 and 14)
  • esm, iife and cjs builds in dist/ have different filenames after new build process changes
  • Typings are loaded from a single index.d.ts file from the dist/ directory

v.1.3.2

03 Mar 14:59
Compare
Choose a tag to compare

Improvements:

  • [typescript] Update to latest version
  • [dependencies] Update to latest versions

Fixes:

  • fast ESM imports should not break the builds

v.1.3.0

22 Feb 17:40
Compare
Choose a tag to compare

Improvements:

  • [typescript] Import all types from index file

v.1.2.9

21 Feb 19:25
Compare
Choose a tag to compare

Fixed:

  • [typescript] Improve compatibility of per entry-point config