Skip to content

v0.2.9

Choose a tag to compare

@addon-owner addon-owner released this 18 Aug 20:08
· 319 commits to main since this release

🚀 adnbn v0.2.9 Release

Compare: v0.2.8...v0.2.9


🚀 Highlights

  • 🧼 Validation stack cleanup: replaced validator with zod across validation logic; streamlined types and added tests for meta plugins.
  • 🧭 Offscreen lifecycle: ProxyOffscreen now uses a singleton (getInstance) and improved creation/teardown logic to avoid duplicate offscreen documents.
  • 💬 Messaging: message handler flow now supports null responses in addition to undefined and async results.

✅ Fixes

  • 💬 Message handling: allow handlers to intentionally return null as a valid response value; continues to handle promises and undefined as 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/react and @types/react-dom to 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 validator coming from this package transitively, install it in your app, or migrate validation to zod.
  • No changes needed for messaging API usage; just note that null may 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 !== undefined are treated as valid; null is now a valid explicit response value.