From 8d1835e9223081a6e249fabfb489ea77a075afc9 Mon Sep 17 00:00:00 2001 From: Mathias Klippinge Date: Thu, 12 Sep 2024 17:28:48 +0200 Subject: [PATCH] Prepare release 2.44.0 (#560) --- .changeset/sharp-vans-approve.md | 25 ------------------------- CHANGELOG.md | 26 ++++++++++++++++++++++++++ package.json | 2 +- src/version.ts | 2 +- 4 files changed, 28 insertions(+), 27 deletions(-) delete mode 100644 .changeset/sharp-vans-approve.md diff --git a/.changeset/sharp-vans-approve.md b/.changeset/sharp-vans-approve.md deleted file mode 100644 index f641bb10..00000000 --- a/.changeset/sharp-vans-approve.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -'mappersmith': minor ---- - -# Add support for abort signals - -The [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) interface represents a signal object that allows you to communicate with an asynchronous operation (such as a fetch request) and abort it if required via an AbortController object. All gateway APIs (Fetch, HTTP and XHR) support this interface via the `signal` parameter: - -```javascript -const abortController = new AbortController() -// Start a long running task... -client.Bitcoin.mine({ signal: abortController.signal }) -// This takes too long, abort! -abortController.abort() -``` - -# Minor type fixes - -The return value of some functions on `Request` have been updated to highlight that they might return undefined: - -- `Request#body()` -- `Request#auth()` -- `Request#timeout()` - -The reasoning behind this change is that if you didn't pass them (and no middleware set them) they might simply be undefined. So the types were simply wrong before. If you experience a "breaking change" due to this change, then it means you have a potential bug that you didn't properly handle before. diff --git a/CHANGELOG.md b/CHANGELOG.md index 4853e2d6..afd39fba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,31 @@ # Changelog +## 2.44.0 + +### Minor Changes + +- 3a3c092: # Add support for abort signals + + The [AbortSignal](https://developer.mozilla.org/en-US/docs/Web/API/AbortSignal) interface represents a signal object that allows you to communicate with an asynchronous operation (such as a fetch request) and abort it if required via an AbortController object. All gateway APIs (Fetch, HTTP and XHR) support this interface via the `signal` parameter: + + ```javascript + const abortController = new AbortController() + // Start a long running task... + client.Bitcoin.mine({ signal: abortController.signal }) + // This takes too long, abort! + abortController.abort() + ``` + + # Minor type fixes + + The return value of some functions on `Request` have been updated to highlight that they might return undefined: + + - `Request#body()` + - `Request#auth()` + - `Request#timeout()` + + The reasoning behind this change is that if you didn't pass them (and no middleware set them) they might simply be undefined. So the types were simply wrong before. If you experience a "breaking change" due to this change, then it means you have a potential bug that you didn't properly handle before. + ## 2.43.4 ### Patch Changes diff --git a/package.json b/package.json index 375357e8..96faabc6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mappersmith", - "version": "2.43.4", + "version": "2.44.0", "description": "It is a lightweight rest client for node.js and the browser", "author": "Tulio Ornelas ", "contributors": [ diff --git a/src/version.ts b/src/version.ts index fd8e0dac..ca4eb46a 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const version = '2.43.4' +export const version = '2.44.0'