Skip to content

Comments

feat(core): isolate proxies per Nexo instance#88

Merged
drusco merged 6 commits intonextfrom
develop
Jul 13, 2025
Merged

feat(core): isolate proxies per Nexo instance#88
drusco merged 6 commits intonextfrom
develop

Conversation

@drusco
Copy link
Owner

@drusco drusco commented Jul 13, 2025

BREAKING CHANGE:
Proxies and their metadata are now scoped per Nexo instance.

  • map.proxies and map.tracables now store nested Maps keyed by Nexo instance id.
  • Proxy traps (apply, get, set, etc.) have been refactored to resolve the proxy and wrapper using the instance-specific symbol.
  • Introduced resolveProxy() utility for consistent lookup and error handling across traps.
  • Proxy handlers are now generated using createHandlers(nexo.id) to ensure traps operate within the correct context.
  • ProxyWrapper now maintains a reference to its owning Nexo instance.

This change ensures that multiple Nexo instances can operate independently on the same targets without cross-contamination of proxy state or behavior.

Developers upgrading to this version should verify that all traps are created through createHandlers() using the correct Nexo instance, and that global access patterns to proxy maps are updated to support the per-instance structure.

@drusco drusco changed the title Develop feat(core): isolate proxies per Nexo instance Jul 13, 2025
@drusco drusco merged commit 583894f into next Jul 13, 2025
2 checks passed
@github-actions
Copy link
Contributor

🎉 This PR is included in version 2.0.0-next.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant