From aa2ac1981a7548ce642ddf3f3fb54e7b6b1cb228 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Mon, 11 Mar 2019 12:49:59 -0400 Subject: [PATCH 1/3] dns: remove dns.promises experimental warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/26592 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Michaël Zasso --- lib/dns.js | 2 -- test/parallel/test-dns-lookup.js | 2 -- 2 files changed, 4 deletions(-) diff --git a/lib/dns.js b/lib/dns.js index 952ef39006c8e4..be52d545a0c873 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -321,8 +321,6 @@ Object.defineProperties(module.exports, { if (promises === null) { promises = require('internal/dns/promises'); promises.setServers = defaultResolverSetServers; - process.emitWarning('The dns.promises API is experimental', - 'ExperimentalWarning'); } return promises; } diff --git a/test/parallel/test-dns-lookup.js b/test/parallel/test-dns-lookup.js index 951e7e17a98b82..4fdfa1f4c22712 100644 --- a/test/parallel/test-dns-lookup.js +++ b/test/parallel/test-dns-lookup.js @@ -27,8 +27,6 @@ common.expectWarning({ 'internal/test/binding': [ 'These APIs are for internal testing only. Do not use them.' ], - // For dns.promises. - 'ExperimentalWarning': 'The dns.promises API is experimental', // For calling `dns.lookup` with falsy `hostname`. 'DeprecationWarning': { DEP0118: 'The provided hostname "false" is not a valid ' + From 61e4d89098e63c1dad0b2de7beeed1277abf5af3 Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 27 Mar 2019 13:21:25 -0400 Subject: [PATCH 2/3] dns: make dns.promises enumerable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/26592 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Michaël Zasso --- lib/dns.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dns.js b/lib/dns.js index be52d545a0c873..df19807d60206d 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -316,7 +316,7 @@ bindDefaultResolver(module.exports, getDefaultResolver()); Object.defineProperties(module.exports, { promises: { configurable: true, - enumerable: false, + enumerable: true, get() { if (promises === null) { promises = require('internal/dns/promises'); From d8c2803dcf9a614dc4c627891e877fa24aa08b1a Mon Sep 17 00:00:00 2001 From: cjihrig Date: Wed, 27 Mar 2019 13:23:27 -0400 Subject: [PATCH 3/3] doc: move dns.promises to stable status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/26592 Reviewed-By: Anna Henningsen Reviewed-By: James M Snell Reviewed-By: Matteo Collina Reviewed-By: Michaël Zasso --- doc/api/dns.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/dns.md b/doc/api/dns.md index b405dd1078c784..1dc4f50ef668d2 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -588,7 +588,7 @@ earlier ones time out or result in some other error. ## DNS Promises API -> Stability: 1 - Experimental +> Stability: 2 - Stable The `dns.promises` API provides an alternative set of asynchronous DNS methods that return `Promise` objects rather than using callbacks. The API is accessible