diff --git a/changelog.md b/changelog.md index 93a4246..b8901dc 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,11 @@ # Changelog +## 2025-12-04 - 3.2.2 - fix(typedrequest) +Add skipHooks flag to TypedRequest to optionally suppress global hooks for internal requests + +- Introduce public skipHooks boolean on TypedRequest (default false) with documentation comment explaining it should be used for internal/logging requests to prevent infinite loops. +- Guard calls to global hooks (onOutgoingRequest and onIncomingResponse) in TypedRequest.fire() so hooks are not invoked when skipHooks is true. + ## 2025-12-04 - 3.2.1 - fix(typedrouter) Use globalThis-backed globalHooks for TypedRouter to enable cross-bundle sharing; fix merging and clearing of global hooks. diff --git a/ts/00_commitinfo_data.ts b/ts/00_commitinfo_data.ts index 3d8d396..a8763ad 100644 --- a/ts/00_commitinfo_data.ts +++ b/ts/00_commitinfo_data.ts @@ -3,6 +3,6 @@ */ export const commitinfo = { name: '@api.global/typedrequest', - version: '3.2.1', + version: '3.2.2', description: 'A TypeScript library for making typed requests towards APIs, including facilities for handling requests, routing, and virtual stream handling.' } diff --git a/ts/classes.typedrequest.ts b/ts/classes.typedrequest.ts index 7c132c2..a31beee 100644 --- a/ts/classes.typedrequest.ts +++ b/ts/classes.typedrequest.ts @@ -33,6 +33,12 @@ export class TypedRequest