Releases: BetterTyped/hyper-fetch
hyper-fetch-v7.0.2
hyper-fetch-v7.0.1
hyper-fetch-v7.0.0
HyperFetch v7.0.0 Release Notes (2025-06-25)
This is a major release that brings a completely revamped developer experience, a new plugin system, and a host of other
improvements and breaking changes. The entire library has been modernized to provide a more robust and flexible
data-fetching solution.
✨ Highlights
🚀 Hyper Flow: The New DevTools
We are thrilled to introduce Hyper Flow, a brand-new, standalone Electron application that provides a powerful and
intuitive UI for debugging and visualizing your HyperFetch requests.
- Real-time Monitoring: See all your requests, cache, and queue state in real-time.
- Detailed Request Inspection: Dive deep into individual requests to see their data, headers, and timings.
- Cache and Queue Management: Inspect and manage your cached data and request queues.
- Data Visualization: Visualize your data flows and understand how your app interacts with your APIs.
- And much more...
🔌 New Plugin System
HyperFetch now has a powerful plugin system that allows you to extend its functionality. The first official plugin is
@hyper-fetch/plugin-devtools
, which connects your application to the new Hyper Flow DevTools.
ESLint Plugin
A new ESLint plugin (@hyper-fetch/eslint-plugin-hyper-fetch
) is now available to help you enforce best practices and
avoid common pitfalls when using HyperFetch.
🧪 Testing Module
The new @hyper-fetch/testing
module makes it easier than ever to test your data-fetching logic. It provides
out-of-the-box mocking for:
- HTTP requests
- GraphQL queries and mutations
- Server-Sent Events (SSE)
- WebSockets
💥 Breaking Changes
This release introduces several breaking changes. Please review them carefully before upgrading.
Core (@hyper-fetch/core
)
- Client and Request Creation:
- The
new Client()
constructor is deprecated. Use the newcreateClient()
function instead. - Use the new
client.createRequest()
method to build your requests. This new method provides improved type inference
and a more fluent API.
- The
- TypeScript Strict Mode: The library now fully supports TypeScript's
strict
mode. This may cause type errors in
your existing codebase if you are not using strict mode. - Immer Integration: We now use Immer for immutable state management. This should be a transparent change for most
users, but it's a significant internal update. - Cache and Dispatcher: The caching and request dispatching systems have been heavily refactored for better
performance and reliability. cacheTime
andstaleTime
: We've introducedcacheTime
andstaleTime
options for more granular control over
caching, similar to what you might know from other data-fetching libraries.- Default HTTP Adapter: The default HTTP adapter is now included in the
@hyper-fetch/core
package. You no longer
need to install a separate adapter for basic HTTP requests.
React (@hyper-fetch/react
)
- Hooks API: The React hooks (
useFetch
,useSubmit
, etc.) have been refactored. While the core functionality
remains the same, there might be subtle changes in behavior and return values. - Hydration: We've introduced new and improved APIs for server-side rendering (SSR) hydration.
Provider
: TheConfigProvider
has been renamed toHyperFetchProvider
for clarity.
Sockets (@hyper-fetch/sockets
)
- Adapters: The socket implementation has been completely rewritten. We now provide two separate adapters:
@hyper-fetch/socket-adapter-sse
for Server-Sent Events.@hyper-fetch/socket-adapter-ws
for WebSockets.
- Improved Error Handling: Error handling for socket connections has been significantly improved.
Adapters (@hyper-fetch/adapter-*
)
- All adapters (
axios
,firebase
,firebase-admin
,graphql
) have been updated to be compatible with the new core
changes. You will need to update them to their latest versions.
Build System
- We have dropped support for CommonJS (CJS). HyperFetch is now an ESM-only library. You will need to ensure your build
system is configured to handle ESM packages.
📦 New Packages
@hyper-fetch/hyper-flow
: The new DevTools application.@hyper-fetch/plugin-devtools
: The plugin to connect your app to Hyper Flow.@hyper-fetch/eslint-plugin-hyper-fetch
: The new ESLint plugin.@hyper-fetch/testing
: The new testing module.
Upgrading
To upgrade to v6.0.0, you will need to update all the HyperFetch packages you are using to their latest versions.
npm install @hyper-fetch/core@latest @hyper-fetch/react@latest ...
# or
yarn add @hyper-fetch/core@latest @hyper-fetch/react@latest ...
We recommend carefully reviewing the updated documentation and examples to understand how to adapt your code to the new
APIs.