Releases: MattCCC/fetchff
Releases · MattCCC/fetchff
v2.2.0
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
v2.1.0
v2.0.0
Breaking changes:
- Updated minimum Node.js version requirement to 18.
- Endpoint interface order change: from
Endpoint<QueryParams, UrlParams, ResponseData>
toEndpoint<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
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
Full Changelog: v1.4.2...v1.5.0
v1.4.2
v1.4.1
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 setstrategy: 'silent'
param in yourcreateApiFetcher
function if you want previous behavior - change of setting name from
apiEndpoints
toendpoints
- Supported Node 16+ (dropped support for 12 and 14)
esm
,iife
andcjs
builds indist/
have different filenames after new build process changes- Typings are loaded from a single index.d.ts file from the
dist/
directory