summaryrefslogtreecommitdiff
path: root/doc/api/deprecations.md
diff options
context:
space:
mode:
authorOuyang Yadong <oyydoibh@gmail.com>2018-09-30 18:17:36 +0800
committerAnna Henningsen <anna@addaleax.net>2018-10-04 14:51:02 -0700
commit26af72899417525dd32372d63c07ee5aa1ab6c5c (patch)
tree0effe53f03127f80998733507adb88fdf8399f4b /doc/api/deprecations.md
parent6f7fd7f9bc743f7244f820a1b7be1e01562c96fd (diff)
downloadandroid-node-v8-26af72899417525dd32372d63c07ee5aa1ab6c5c.tar.gz
android-node-v8-26af72899417525dd32372d63c07ee5aa1ab6c5c.tar.bz2
android-node-v8-26af72899417525dd32372d63c07ee5aa1ab6c5c.zip
dns: deprecate passing falsy hostname to dns.lookup
We can `dns.lookup` a falsy `hostname` like `dns.lookup(false)` for the reason of backwards compatibility long before(see #13119 for detail). This behavior is undocumented and seems useless in real world apps. We could also make invalid `hostname` throw in the future and the change might be semver-major. Fixes: https://github.com/nodejs/node/issues/13119 PR-URL: https://github.com/nodejs/node/pull/23173 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Diffstat (limited to 'doc/api/deprecations.md')
-rw-r--r--doc/api/deprecations.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md
index dc12efb906..ca23a4fa32 100644
--- a/doc/api/deprecations.md
+++ b/doc/api/deprecations.md
@@ -2214,6 +2214,22 @@ the `_handle` property of the `Cipher`, `Decipher`, `DiffieHellman`,
Using the `_handle` property to access the native object is deprecated because
improper use of the native object can lead to crashing the application.
+<a id="DEP0118"></a>
+### DEP0118: dns.lookup() support for a falsy hostname
+<!-- YAML
+changes:
+ - version: REPLACEME
+ pr-url: https://github.com/nodejs/node/pull/23173
+ description: Runtime deprecation.
+-->
+
+Type: Runtime
+
+Previous versions of Node.js supported `dns.lookup()` with a falsy hostname
+like `dns.lookup(false)` due to backward compatibility.
+This behavior is undocumented and is thought to be unused in real world apps.
+It will become an error in future versions of Node.js.
+
[`--pending-deprecation`]: cli.html#cli_pending_deprecation
[`Buffer.allocUnsafeSlow(size)`]: buffer.html#buffer_class_method_buffer_allocunsafeslow_size
[`Buffer.from(array)`]: buffer.html#buffer_class_method_buffer_from_array