From 952ae65f9f8d442006b6b8f519a7fd169ab5431e Mon Sep 17 00:00:00 2001 From: Adam Jones Date: Sat, 3 Feb 2024 12:26:23 +0000 Subject: [PATCH 1/3] doc: fix dns.lookup family 0 and all description Fixes #51482 --- doc/api/dns.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/doc/api/dns.md b/doc/api/dns.md index d2a97581154f9c..591356f5a915cc 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -210,8 +210,9 @@ changes: * `family` {integer|string} The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons,`'IPv4'` and `'IPv6'` are interpreted as `4` and `6` respectively. The value `0` indicates that either an IPv4 or IPv6 - address is returned. If the value `0` is used with `{ all: true } (see below)`, - both IPv4 and IPv6 addresses are returned. **Default:** `0`. + address is returned. If the value `0` is used with `{ all: true }` (see below), + either one of or both IPv4 and IPv6 addresses are returned, depending on the + system's DNS resolver. **Default:** `0`. * `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple flags may be passed by bitwise `OR`ing their values. * `all` {boolean} When `true`, the callback returns all resolved addresses in @@ -988,8 +989,9 @@ changes: * `options` {integer | Object} * `family` {integer} The record family. Must be `4`, `6`, or `0`. The value `0` indicates that either an IPv4 or IPv6 address is returned. If the - value `0` is used with `{ all: true }` (see below), both IPv4 and IPv6 - addresses are returned. **Default:** `0`. + value `0` is used with `{ all: true }` (see below), either one of or both + IPv4 and IPv6 addresses are returned, depending on the system's DNS + resolver. **Default:** `0`. * `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple flags may be passed by bitwise `OR`ing their values. * `all` {boolean} When `true`, the `Promise` is resolved with all addresses in From b1464a3aa676863d83d75116b6fa8f209eaf43fe Mon Sep 17 00:00:00 2001 From: Adam Jones Date: Sat, 3 Feb 2024 12:41:32 +0000 Subject: [PATCH 2/3] Fix other mentions --- doc/api/dns.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/api/dns.md b/doc/api/dns.md index 591356f5a915cc..cdc402a836ab9f 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -241,8 +241,8 @@ changes: Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or AAAA (IPv6) record. All `option` properties are optional. If `options` is an -integer, then it must be `4` or `6` – if `options` is `0` or not provided, then -IPv4 and IPv6 addresses are both returned if found. +integer, then it must be `4` or `6` – if `options` is not provided, then +either IPv4 or IPv6 addresses, or both, are returned if found. With the `all` option set to `true`, the arguments for `callback` change to `(err, addresses)`, with `addresses` being an array of objects with the @@ -1015,8 +1015,8 @@ changes: Resolves a host name (e.g. `'nodejs.org'`) into the first found A (IPv4) or AAAA (IPv6) record. All `option` properties are optional. If `options` is an -integer, then it must be `4` or `6` – if `options` is not provided, then IPv4 -and IPv6 addresses are both returned if found. +integer, then it must be `4` or `6` – if `options` is not provided, then +either IPv4 or IPv6 addresses, or both, are returned if found. With the `all` option set to `true`, the `Promise` is resolved with `addresses` being an array of objects with the properties `address` and `family`. From 8d845742a40e64a9900b6828f0500b1f503ed20f Mon Sep 17 00:00:00 2001 From: Adam Jones Date: Mon, 5 Feb 2024 19:05:49 +0000 Subject: [PATCH 3/3] Fix wrapping line length --- doc/api/dns.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/api/dns.md b/doc/api/dns.md index cdc402a836ab9f..128780ce26daa0 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -210,9 +210,9 @@ changes: * `family` {integer|string} The record family. Must be `4`, `6`, or `0`. For backward compatibility reasons,`'IPv4'` and `'IPv6'` are interpreted as `4` and `6` respectively. The value `0` indicates that either an IPv4 or IPv6 - address is returned. If the value `0` is used with `{ all: true }` (see below), - either one of or both IPv4 and IPv6 addresses are returned, depending on the - system's DNS resolver. **Default:** `0`. + address is returned. If the value `0` is used with `{ all: true }` (see + below), either one of or both IPv4 and IPv6 addresses are returned, + depending on the system's DNS resolver. **Default:** `0`. * `hints` {number} One or more [supported `getaddrinfo` flags][]. Multiple flags may be passed by bitwise `OR`ing their values. * `all` {boolean} When `true`, the callback returns all resolved addresses in