Skip to content

Releases: BetterTyped/hyper-fetch

hyper-fetch-v5.2.0

23 Jun 10:14
217f216

Choose a tag to compare

5.2.0 (2023-06-23)

Features

  • 🎸 Added possibility to toggle mock for all client reqs (b99b8c0)

hyper-fetch-v5.1.2

20 Jun 08:31
0da32c3

Choose a tag to compare

5.1.2 (2023-06-20)

Bug Fixes

  • 🐛 Backend adapter fix (2ae142e)
  • 🐛 moved http addition to adapter.server from bindings (07bbb01)

hyper-fetch-v5.1.1

16 Jun 17:07

Choose a tag to compare

5.1.1 (2023-06-16)

Bug Fixes

  • 🐛 Fixed hook id matching (636ba6b)
  • 🐛 Fixed useListener dependencies (d298ec0)
  • 🐛 useCache lifecycle listeners (12f6a04)

hyper-fetch-v5.1.0

14 Jun 17:24

Choose a tag to compare

5.1.0 (2023-06-14)

Features

  • 🎸 Added mocker toggling (ff1b5c7)

hyper-fetch-v5.0.2

12 Jun 10:10
74c2fec

Choose a tag to compare

5.0.2 (2023-06-12)

Bug Fixes

  • 🐛 Added missing __key (734a3d7)
  • 🐛 Fix initial data types (2b8e52c)
  • 🐛 React types and utils fixes (08b00ea)
  • 🐛 Removed admin adapters from hyper-fetch/firebase package (2d85525)
  • 🐛 Separate firebase admin adapter to a separate subpackage (ed5eb0a)

hyper-fetch-v5.0.1

08 Jun 15:36

Choose a tag to compare

5.0.1 (2023-06-08)

Bug Fixes

  • 🐛 Fix React18 double fetching (ffb569f)

hyper-fetch-v5.0.0

08 Jun 10:58
3ac67eb

Choose a tag to compare

5.0.0 (2023-06-08)

⚔️ New Realtime Connectors

  • Added new realtime connectors with the following features:
    • Ability to directly change cache by update or set methods
    • Easier way to invalidate cache from listeners

🧨 Firebase, Graphql, Axios adapters

  • Added adapters for Firebase, GraphQL, and Axios with the following capabilities:
    • Firebase: Admin, Firestore, and Realtime adapters for both node and browser
    • GraphQL: Simple GraphQL adapter with tags parsing, compatible with both node and browser
    • Axios: Supercharged Axios adapter for both node and browser

🪄 Sockets Improvements

  • Implemented major improvements to sockets with the following enhancements:
    • Added adapter bindings to simplyfy adapter creation process
    • Introduced parameters support for both listeners and emitters
    • Improved types to indicate the state of instances
    • Split the default adapter into WebSocket and SSE adapters
    • Listeners now consume options object
    • Emitters now consume options object
    • Possibility to set onData hook to listeners
    • New interface for handling websockets acknowledgements

Other changes:

  • 👾 ”Revalidate” names changed into “invalidate” for core and “refetch” for react
  • 🗯️ Added setEndpointMapper for client to allow parsing graphql DocumentNodes
  • 🏋🏻‍♂️ Method setAdapter can return new Client instance now and inherit it’s types
  • 🪢 Emitter acknowledge event now pass parameters as single object

Bug Fixes

  • 🐛 Constraints fix for firestore browser adapter (2b1aaa5)
  • 🐛 Fixed internal issues with endpoint prop change (78ba22d)
  • 🐛 Fixed setAdapter types (5c363f1)
  • 🐛 onlyOnce option marked optional, remove unsub from extra (2beb2a7)
  • 🐛 Types fixes (e4fb176)

Features

  • 🎸 Added Cache update method, provided callbacks to setter (89d8227)
  • 🎸 Added EndpointMapper and parsing gql Document (ae3e566)
  • 🎸 Added firebase sockets error handling (98271c8)
  • 🎸 Added GraphQl adapter (59413bb)
  • 🎸 Added query constraints typecheck (a21aa84)
  • 🎸 Added socket bindings defaults (724bf5d)
  • 🎸 Added SocketAdapter type, extra type and fixes (efe3b15)
  • 🎸 Adjusted the structure and naming (ad88ae6)
  • 🎸 Adjustments to the bindings and types (cf2983f)
  • 🎸 Axios adapter (3b81cdd)
  • 🎸 Axios adapter draft (37904cc)
  • 🎸 Changed revalidation into refetch/invalidate (b192ef6)
  • 🎸 Changed revalidation into refetch/invalidate (a01fdb7)
  • 🎸 Created realtime sockets adapter (1550791)
  • 🎸 Firebase adapter config setup (cf2e674)
  • 🎸 Firebase realtime sockets admin adapter (54b325f)
  • 🎸 Firestore Sockets Admin (1ec5a95)
  • 🎸 Improved createRequest types (163d65a)
  • 🎸 Improved Firebase adapters (00f17bb)
  • 🎸 Listener and Emitter API changes (770859b)
  • 🎸 Mocker improvements (1165675)
  • 🎸 mocker totalUploaded, totalDownloaded (e3a2be4)
  • 🎸 Socket command instances name changed to endpoint (b6616c6)
  • 🎸 Structure improvements (60716c3)

BREAKING CHANGES

  • 🧨 'name' property in sockets instances of Emitter or Listener is no longer
    valid and it is changed to 'endpoint' instead
  • 🧨 Listener and Emitter API changes
  • 🧨 Renamed hooks interfaces elements

hyper-fetch-v4.0.2

25 May 14:15

Choose a tag to compare

4.0.2 (2023-05-25)

Bug Fixes

  • 🐛 Response for callbacks (c3e2c45)

hyper-fetch-v4.0.1

24 May 07:58

Choose a tag to compare

4.0.1 (2023-05-24)

Bug Fixes

  • 🐛 Fixes adapter payload processing (8453bba), closes #51

hyper-fetch-v4.0.0

19 May 11:23
e266e90

Choose a tag to compare

4.0.0 (2023-05-19)

Highlights

✨ New response interface

We have changed the structure of our response interface. Instead of an array, it now returns an object. The interface also provides additional data objects with adapter-specific data. By default, it gives you response headers.

🔮 Improved adapters

We have improved our adapters. The new interface allows for much greater configuration and extensibility. Now you can easily attach any library with any protocol you want. This comes with a next-level TypeScript interface that controls type safety.

🎭 Mocker

Create your own responses with full support for functionalities like success/error responses, request sequences, upload/download progress, response time, and more.

💎 Request Mappers

Modify, map, or validate requests before sending them to the server.

🚀 Response Mappers

Modify, map, or validate responses from the server.

Other changes:

  • 📡 Key mappers - In Hyper Fetch, everything is grouped by keys. Now you can provide global key generation strategies to make this process fully custom.
  • 🎡 Flattened cache of response object - This allows for better and easier interactions with the cache.
  • 🗺️ Added TSD TypeScript tests - We locked crucial TypeScript rules and made a solid foundation for testing our TypeScript.
  • 🪴 Added isSuccess value - This property on the response tells us whether our request was successful.
  • 🏵️ Adapters new generic types - We can set custom types for request methods, options, query parameters, and additional data passed with the response.
  • 🎸 Stringify Query Params - We added parsing of dates and nested objects in query params.
  • 🐛 Tons of bug fixes and tests - We had to improve many parts of the system to make it faster, better, and more customizable. We fixed many TypeScript issues and locked crucial parts with TypeScript tests. FormData fixes on the node adapter.

Bug Fixes

  • 🐛 Added setting cache onError, calling unsub each test (4a72bd7)
  • 🐛 Env fixes and promise handling improvements (0487b19)
  • 🐛 fix: Fixed ClientInstance type and adapterBindings types (c1b9a0c)
  • 🐛 Fixed typeof this -> this in Cache generic (0f0c273)
  • 🐛 Fixed types issues (0a90619)
  • 🐛 missing queryParams in ExtractUnionAdapter (54d43b5)
  • 🐛 Object parsing in query params (42520e3)
  • 🐛 Options for onValue may be undefined (94e9ea6)
  • 🐛 TS fix (a962653)
  • 🐛 ts fixes (7e1ff4c)
  • 🐛 TS quickfix (ec9d1ee)

Features

  • 🎸 AdapterType is now a generic (14e1166)
  • 🎸 Added adapter union extraction (6a5b8cf)
  • 🎸 Added all firestore methods (base version) (c35efbf)
  • 🎸 Added groupByChangeType option for firestore onSnapshot (5b7cf8e)
  • 🎸 Added Key mapper (ba9c066)
  • 🎸 Added merge option for setDoc (78b7d96)
  • 🎸 Added onlyOnce option for onValue method (d5e99ed)
  • 🎸 Added request mocker PoC (51f3036)
  • 🎸 Added response Headers to the additional data (762b343)
  • 🎸 Cache data structure reworked (0c16fd1)
  • 🎸 Dispatcher storage update and new request methods (4eb1723)
  • 🎸 firebase realtime/firestore web/admin works (d6969dd)
  • 🎸 Firestore query constraints are working correctly (13530fd)
  • 🎸 Handle Methods type from Adapter generic (ce0fa8f)
  • 🎸 Handled emptyResource status for firebase (d84b018)
  • 🎸 Improved namings (57e4285)
  • 🎸 isSuccess param is now available in the response (c5aafc0)
  • 🎸 mocker improvement - additionalData mock, string status (bf5d75e)
  • 🎸 Response mapper adjustments (bab277f)
  • 🎸 Response mapper adjustments (c45b3ae)
  • 🎸 Setup (8e0a8f3)
  • 🎸 Typescript improvements (8956ca2)
  • 🎸 Working request lifecycle for firebase (9005a47)

BREAKING CHANGES

  • 🧨 Dispatcher storage is now storing Request instead of jsons, we changed
    the way our hooks interact with bindings and adapter
  • 🧨 Client now accepts AdapterType instead of AdapterOptionsType as a second
    generic.