06:53
<Iliasbhal>
👋 Hello team! I wrote another polyfill for this feature. It works a bit differently that the current one, it works only by intrumenting the Promise object. check it out: https://github.com/iliasbhal/simple-async-context. It satifies the test suite in the repo + some extra tests that I added. Let me know what you think ;)
07:15
<Iliasbhal>

Turns out, they work kind of similary. Few differences here and there:

  • On the strategy used to store data in the context.
    simple-async-context let the garbage collectore reclaim memory (hopefully 😆), it won't programmaticaly delete stored data.
  • simple-async-context will polyfill timers as well.
  • The way it instruments Promise is slightly different.
07:40
<Iliasbhal>
Note: We don't programaticaly delete Variable data because otherwise we won't be able access the context from a running timer.