From de04c51c0e26001f7732ea9028eb4ca1198b118c Mon Sep 17 00:00:00 2001
From: Stefano Magrassi <1291271+StefanoMagrassi@users.noreply.github.com>
Date: Tue, 17 Oct 2023 12:41:44 +0200
Subject: [PATCH] release version 5.2.0 (#748)
* bump version to 5.2.0
* fix docs
* update changelog
---
CHANGELOG.md | 6 ++++++
README.md | 5 +++--
docs/changelog.md | 6 ++++++
docs/index.md | 5 +++--
docs/modules/request.ts.md | 4 ++--
package-lock.json | 4 ++--
package.json | 2 +-
src/request.ts | 4 ++--
8 files changed, 25 insertions(+), 11 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 090a737..e7f40bf 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog
+## [5.2.0](https://github.com/contactlab/appy/releases/tag/5.2.0)
+
+**New Feature:**
+
+- Forward `RequestInfoInit` to `ResponseError` (#743)
+
## [5.1.0](https://github.com/contactlab/appy/releases/tag/5.1.0)
**New Feature:**
diff --git a/README.md b/README.md
index 29b3518..64352e2 100644
--- a/README.md
+++ b/README.md
@@ -50,12 +50,13 @@ type ReqInput = RequestInfo | RequestInfoInit;
type RequestInfoInit = [RequestInfo, RequestInit];
```
-`Resp` is an object that carries the original `Response` from a `fetch()` call and the actual retrieved `data` (of type `A`).
+`Resp` is an object that carries the original `Response` from a `fetch()` call, the actual retrieved `data` (of type `A`) and the request's input (optional).
```ts
interface Resp {
response: Response;
data: A;
+ input?: RequestInfoInit;
}
```
@@ -75,7 +76,7 @@ interface RequestError {
}
```
-`ResponseError` represents a response error. It carries the generated `Error` and the original `Response` object.
+`ResponseError` represents a response error. It carries the generated `Error`, the original `Response` object and the request's input (optional).
```ts
interface ResponseError {
diff --git a/docs/changelog.md b/docs/changelog.md
index de4f3e8..2452f34 100644
--- a/docs/changelog.md
+++ b/docs/changelog.md
@@ -5,6 +5,12 @@ nav_order: 2
# Changelog
+## [5.2.0](https://github.com/contactlab/appy/releases/tag/5.2.0)
+
+**New Feature:**
+
+- Forward `RequestInfoInit` to `ResponseError` (#743)
+
## [5.1.0](https://github.com/contactlab/appy/releases/tag/5.1.0)
**New Feature:**
diff --git a/docs/index.md b/docs/index.md
index e1d8769..6a59d4a 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -55,12 +55,13 @@ type ReqInput = RequestInfo | RequestInfoInit;
type RequestInfoInit = [RequestInfo, RequestInit];
```
-`Resp` is an object that carries the original `Response` from a `fetch()` call and the actual retrieved `data` (of type `A`).
+`Resp` is an object that carries the original `Response` from a `fetch()` call, the actual retrieved `data` (of type `A`) and the request's input (optional).
```ts
interface Resp {
response: Response;
data: A;
+ input?: RequestInfoInit;
}
```
@@ -80,7 +81,7 @@ interface RequestError {
}
```
-`ResponseError` represents a response error. It carries the generated `Error` and the original `Response` object.
+`ResponseError` represents a response error. It carries the generated `Error`, the original `Response` object and the request's input (optional).
```ts
interface ResponseError {
diff --git a/docs/modules/request.ts.md b/docs/modules/request.ts.md
index 73d6b54..f21ada2 100644
--- a/docs/modules/request.ts.md
+++ b/docs/modules/request.ts.md
@@ -68,7 +68,7 @@ Added in v4.0.0
## ResponseError (interface)
-`ResponseError` represents a response error. It carriess the generated `Error` and the original `Response` object.
+`ResponseError` represents a response error. It carriess the generated `Error`, the original `Response` object and the request's input (optional).
**Signature**
@@ -179,7 +179,7 @@ Added in v4.0.0
## Resp (interface)
-`Resp` is an object that carries the original `Response` from a `fetch()` call and the actual retrieved `data` (of type `A`).
+`Resp` is an object that carries the original `Response` from a `fetch()` call, the actual retrieved `data` (of type `A`) and the request's input (optional).
**Signature**
diff --git a/package-lock.json b/package-lock.json
index a752369..2551c1d 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "@contactlab/appy",
- "version": "5.1.0",
+ "version": "5.2.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@contactlab/appy",
- "version": "5.1.0",
+ "version": "5.2.0",
"hasInstallScript": true,
"license": "Apache-2.0",
"devDependencies": {
diff --git a/package.json b/package.json
index 4e13353..abf03d4 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "@contactlab/appy",
- "version": "5.1.0",
+ "version": "5.2.0",
"description": "A functional wrapper around Fetch API",
"main": "./index.js",
"module": "./_es6/index.js",
diff --git a/src/request.ts b/src/request.ts
index 8472143..97e06b5 100644
--- a/src/request.ts
+++ b/src/request.ts
@@ -49,7 +49,7 @@ export type RequestInfoInit = [RequestInfo, RequestInit];
export type Combinator = (req: Req) => Req;
/**
- * `Resp` is an object that carries the original `Response` from a `fetch()` call and the actual retrieved `data` (of type `A`).
+ * `Resp` is an object that carries the original `Response` from a `fetch()` call, the actual retrieved `data` (of type `A`) and the request's input (optional).
*
* @category Response
* @since 4.0.0
@@ -81,7 +81,7 @@ export interface RequestError {
}
/**
- * `ResponseError` represents a response error. It carriess the generated `Error` and the original `Response` object.
+ * `ResponseError` represents a response error. It carriess the generated `Error`, the original `Response` object and the request's input (optional).
*
* @category Error
* @since 4.0.0