v0.2.9
🚀 adnbn v0.2.9 Release
Compare: v0.2.8...v0.2.9
🚀 Highlights
- 🧼 Validation stack cleanup: replaced
validatorwithzodacross validation logic; streamlined types and added tests for meta plugins. - 🧭 Offscreen lifecycle:
ProxyOffscreennow uses a singleton (getInstance) and improved creation/teardown logic to avoid duplicate offscreen documents. - 💬 Messaging: message handler flow now supports
nullresponses in addition toundefinedand async results.
✅ Fixes
- 💬 Message handling: allow handlers to intentionally return
nullas a valid response value; continues to handle promises andundefinedas before. - 🪟 Offscreen: prevent unnecessary offscreen re-creation; reuses the same offscreen page when URL hasn’t changed and closes stale instances when it has.
♻️ Refactors & Internals
- 🧩 Offscreen provider: introduced
ProxyOffscreen.getInstance(name, params)and internal state to track last offscreen URL. - 🧪 Tests: added tests for meta plugins and validation behavior following the move to
zod.
📦 Dependencies
- ➖ Removed:
validator - ➕ Validation: standardized on
zod - 🧰 Types (dev): added
@types/reactand@types/react-domto devDependencies (peers remain unchanged)
Note: Removal of validator is internal; if your project relied on it as a transitive dependency, add it directly to your app’s dependencies.
🔒 Breaking Changes
- None.
🗂️ Configuration Changes
- None in this release. No changes required to
adnbn.config.ts.
🧭 Migration Notes
- If your code or tests relied on
validatorcoming from this package transitively, install it in your app, or migrate validation tozod. - No changes needed for messaging API usage; just note that
nullmay be returned by handlers now if you choose to use it semantically. - No offscreen API changes; the singleton pattern is internal and improves stability.
📌 Context snippets (for reference)
- Offscreen singleton:
ProxyOffscreen.getInstance(name, params)caches and returns a single instance; avoids duplicate offscreen creation unless the URL changes.
- Message manager behavior:
- Responses where
result !== undefinedare treated as valid;nullis now a valid explicit response value.
- Responses where