BREAKING CHANGE(typedrouter): Introduce options object for TypedRouter.routeAndAddResponse (localRequest, skipHooks); add defaultRouteOptions and make hook calls respect skipHooks; bump package version to 3.2.3

This commit is contained in:
2025-12-04 23:52:18 +00:00
parent 472d009de1
commit 271f6bc0a3
4 changed files with 70 additions and 42 deletions

View File

@@ -1,5 +1,13 @@
# Changelog
## 2025-12-04 - 4.0.0 - BREAKING CHANGE(typedrouter)
Introduce options object for TypedRouter.routeAndAddResponse (localRequest, skipHooks); add defaultRouteOptions and make hook calls respect skipHooks; bump package version to 3.2.3
- Changed TypedRouter.routeAndAddResponse signature to accept an options object ({ localRequest?: boolean; skipHooks?: boolean }) instead of a boolean second argument — this is a breaking API change.
- Added TypedRouter.defaultRouteOptions with defaults { localRequest: false, skipHooks: false }.
- Routing now respects options.localRequest and options.skipHooks; hook calls (onIncomingRequest, onOutgoingResponse, onIncomingResponse) are skipped when skipHooks is true to avoid hook recursion or duplicate handling (useful for broadcast-received messages).
- Bumped package.json version to 3.2.3.
## 2025-12-04 - 3.2.2 - fix(typedrequest)
Add skipHooks flag to TypedRequest to optionally suppress global hooks for internal requests