Releases: MattCCC/fetchff
Releases · MattCCC/fetchff
v.1.2.8
v.1.2.6
v1.2.5
v1.2.4
v1.2.3
v1.2.2
v1.2.1
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
v1.1.0
- 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
- 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