fix(typedrouter): Use globalThis-backed globalHooks for TypedRouter to enable cross-bundle sharing; fix merging and clearing of global hooks.

This commit is contained in:
2025-12-04 22:15:26 +00:00
parent 5444e1be88
commit 2ff5602430
3 changed files with 23 additions and 5 deletions

View File

@@ -1,5 +1,12 @@
# Changelog
## 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.
- Replace static globalHooks field with getter/setter that stores hooks on globalThis so hooks are shared across bundles.
- Fix setGlobalHooks to merge new hooks with existing ones (avoiding accidental overwrite).
- Update clearGlobalHooks to clear the globalThis storage used for hooks.
## 2025-12-04 - 3.2.0 - feat(typedrouter)
Add request/response hooks and monitoring to TypedRouter; emit hooks from TypedRequest; improve VirtualStream encoding/decoding; re-export hook types