File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import crypto from 'node:crypto'
77import { fileURLToPath } from 'node:url'
88import type { ServerOptions as HttpsServerOptions } from 'node:https'
99import { builtinModules } from 'node:module'
10- import { promises as dns , getDefaultResultOrder } from 'node:dns'
10+ import { promises as dns } from 'node:dns'
1111import { performance } from 'node:perf_hooks'
1212import type { AddressInfo , Server } from 'node:net'
1313import fsp from 'node:fs/promises'
@@ -925,7 +925,10 @@ export function unique<T>(arr: T[]): T[] {
925925export function getLocalhostAddressIfDiffersFromDNS ( ) :
926926 | Promise < string | undefined >
927927 | undefined {
928- if ( getDefaultResultOrder ( ) === 'verbatim' ) {
928+ // dns.getDefaultResultOrder is not available in bun 1.3.11 and deno 2.7.11
929+ // while this is a bug in bun and deno, since this function is commonly called,
930+ // we give a workaround specially until the API is supported in a few versions
931+ if ( dns . getDefaultResultOrder && dns . getDefaultResultOrder ( ) === 'verbatim' ) {
929932 return undefined
930933 }
931934 return Promise . all ( [
You can’t perform that action at this time.
0 commit comments