unjs / unenv

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

refactor(node/process): align implementation and cleanup #187

Closed pi0 closed 1 month ago

pi0 commented 1 month ago

followup on #185

When enabled type checks found several issues in implementation.

This PR also cleans up by splitting timer and env related logic to sub-modules.

Fallback for nextTick (without queueMicrotask support) had been simplified to remove old dependencies and at minimum assume setTimeout/clearTimeout)

jculvey commented 1 month ago

@pi0 let me know if there's anything I can help with here!