unjs / unenv

🕊️ Convert javaScript code to be runtime agnostic
MIT License
358 stars 19 forks source link

feat: implement basic `node:async_hooks` #98

Closed pi0 closed 1 year ago

pi0 commented 1 year ago

This PR implements a sync polyfill for Node.js async_hooks.

Async context tracking is impossible with userland. We might only find a better integration with unxtx transform steps to improve it.

Hopefuly once tc39 proposal is in place we might also integrate with V8 API when possible.