unjs / unenv

๐Ÿ•Š๏ธ Convert javaScript code to be runtime agnostic
MIT License
342 stars 18 forks source link

feat(node:dns): polyfill `node:dns` module #196

Closed jculvey closed 1 month ago

jculvey commented 1 month ago

Replaces the current auto-mocking of 'dns' to support destructured ESM imports and allow for functional polyfill coverage in the future.

๐Ÿ”— Linked issue

โ“ Type of change

๐Ÿ“š Description

Adds a polyfill for the node:dns module.

Also moves the helpful notImplementedAsync helper to utils from fs so that it can be reused.

๐Ÿ“ Checklist

pi0 commented 1 month ago

Crazy idea: https://github.com/unjs/unenv/issues/198