diff options
author | Yoshiya Hinosawa <stibium121@gmail.com> | 2024-10-30 02:41:16 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-29 18:41:16 +0100 |
commit | a69224ea5bd02f08108aac867c492754095f2d34 (patch) | |
tree | 253aad351353b0ff8f3e3fb57785a8de41aadcdf /ext/node/polyfills/internal | |
parent | 51978a76540cac72dd35528dd023c3fc6d5eeca6 (diff) |
Revert "fix(ext/node): fix dns.lookup result ordering (#26264)" (#26621)
This reverts commit d59599fc187c559ee231882773e1c5a2b932fc3d.
Closes #26588
Diffstat (limited to 'ext/node/polyfills/internal')
-rw-r--r-- | ext/node/polyfills/internal/dns/utils.ts | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/node/polyfills/internal/dns/utils.ts b/ext/node/polyfills/internal/dns/utils.ts index 1e0c3d9ed..226fce93d 100644 --- a/ext/node/polyfills/internal/dns/utils.ts +++ b/ext/node/polyfills/internal/dns/utils.ts @@ -416,10 +416,20 @@ export function emitInvalidHostnameWarning(hostname: string) { ); } -let dnsOrder = getOptionValue("--dns-result-order") || "verbatim"; +let dnsOrder = getOptionValue("--dns-result-order") || "ipv4first"; export function getDefaultVerbatim() { - return dnsOrder !== "ipv4first"; + switch (dnsOrder) { + case "verbatim": { + return true; + } + case "ipv4first": { + return false; + } + default: { + return false; + } + } } /** |