Repository navigation
Releases: brainylab/fwrp
Releases · brainylab/fwrp
Release list
v2.0.3
Patch Changes
5e6e0a8Thanks @andrefelipeschulle! - Add ParseError handling for invalid JSON responses
v2.0.2
Patch Changes
c83007aThanks @andrefelipeschulle! - add support do transform in line
v2.0.1
Patch Changes
-
f8dec20Thanks @andrefelipeschulle! - fix ci -
ab982a5Thanks @andrefelipeschulle! - refactor: fix performance and security
v2.0.0
Major Changes
-
fb77e91Thanks @andrefelipeschulle! - Movetransformfrom the request config into a chained.transform()method.BREAKING CHANGE: the
transformoption was removed from the config object of
get,post,put,patch,delete,headandfetch. It is now a chained
method on the returned request, which enables full type inference of the
transformed data (the raw type comes fromget<T>()and the result is merged
with the transform's return type).Additional improvements:
- Support for multiple chained transforms, applied in sequence (each receives
the previous result). - A transform that returns
undefined/voidnow keeps the original data,
so it can be used for side-effects (logging, telemetry) without dropping the payload.
Migration:
// Before (v1) fwrp.get<User>("/users/1", { transform: (data) => ({ ...data, label: data.name }), }); // After (v2) fwrp .get<User>("/users/1") .transform((data) => ({ ...data, label: data.name }));
- Support for multiple chained transforms, applied in sequence (each receives
v1.7.0
Minor Changes
c50f2deThanks @andrefelipeschulle! - only ESM in project
v1.6.1
Patch Changes
a765ec0Thanks @andrefelipeschulle! - format all files with biome
v1.5.1
Patch Changes
91470c5Thanks @andrefelipeschulle! - refactor: update error handling in Fwrp class and hooks
v1.5.0
Minor Changes
cf47d64Thanks @andrefelipeschulle! - refactor: simplify instance creation and improve error handling
v1.4.2
Patch Changes
121fb34Thanks @andrefelipeschulle! - fix bocy in fetch method
v1.4.1
Patch Changes
a95ccb9Thanks @andrefelipeschulle! - refactor: substituir método 'request' por 'fetch' e aprimorar a classe CreateURL