From 69041eba941bfbca2d1136307bc6865fe86fcb5c Mon Sep 17 00:00:00 2001 From: shisama Date: Tue, 21 Apr 2020 04:46:26 +0900 Subject: [PATCH 1/3] dns: Add dns/promises alias --- doc/api/dns.md | 2 +- lib/dns/promises.js | 3 +++ node.gyp | 1 + test/es-module/test-esm-dns-promises.mjs | 14 ++++++++++++++ test/parallel/test-dns-promises-exists.js | 6 ++++++ 5 files changed, 25 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 030bb7674b0cca..f6b8dbd3c0e96e 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`