From 039cd00a9acfacd3a5a304be09bf17debd54aaaf Mon Sep 17 00:00:00 2001 From: shisama Date: Tue, 21 Apr 2020 04:46:26 +0900 Subject: [PATCH] dns: add dns/promises alias PR-URL: https://github.com/nodejs/node/pull/32953 Reviewed-By: Anna Henningsen Reviewed-By: Colin Ihrig Reviewed-By: Ruben Bridgewater --- doc/api/dns.md | 2 +- lib/dns/promises.js | 5 +++ node.gyp | 1 + test/es-module/test-esm-dns-promises.mjs | 14 ++++++++ test/parallel/test-dns-promises-exists.js | 6 ++++ .../test-dns-setservers-type-check.js | 33 +++++++++++++++++++ 6 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 lib/dns/promises.js create mode 100644 test/es-module/test-esm-dns-promises.mjs create mode 100644 test/parallel/test-dns-promises-exists.js diff --git a/doc/api/dns.md b/doc/api/dns.md index 030bb7674b0..f6b8dbd3c0e 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -611,7 +611,7 @@ earlier ones time out or result in some other error. The `dns.promises` API provides an alternative set of asynchronous DNS methods that return `Promise` objects rather than using callbacks. The API is accessible -via `require('dns').promises`. +via `require('dns').promises` or `require('dns/promises')`. ### Class: `dnsPromises.Resolver`