unjs / unenv

🕊️ Convert javaScript code to be runtime agnostic
MIT License
342 stars 18 forks source link

feat(node:process): prefer `queueMicrotask` for `process.nextTick` polyfill #184

Closed pi0 closed 1 month ago

pi0 commented 1 month ago

Idea from #183 use queueMicrotask for approximate process.nextTick() in Node.js when available.

pi0 commented 1 month ago

Thanks for the suggestions. I'm not aware of any direct dependency on nextTick (it is mainly to keep polyfill compliant and new one is more) current behavior across the ecosystem but will monitor bug reports and revert if anything is reported.