From 5cad37619a46fd8ef642f0dfdf732374748abfe8 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 11 Mar 2019 10:19:47 +0000 Subject: [PATCH 1/3] fs: remove experimental warning for fs.promises This has been warning for long enough, without any API changes in the last few months. --- lib/fs.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/fs.js b/lib/fs.js index 206ab1fcfe669f..2b4db6f0e9f59f 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1932,11 +1932,8 @@ Object.defineProperties(fs, { configurable: true, enumerable: false, get() { - if (promises === null) { + if (promises === null) promises = require('internal/fs/promises'); - process.emitWarning('The fs.promises API is experimental', - 'ExperimentalWarning'); - } return promises; } } From 6956fa31d2b2ba1258c38dbd50a91a877cb40959 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 12 Mar 2019 11:04:54 +0000 Subject: [PATCH 2/3] fixup! fs: remove experimental warning for fs.promises --- lib/fs.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/fs.js b/lib/fs.js index 2b4db6f0e9f59f..b27b7f8916657a 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -1930,7 +1930,7 @@ Object.defineProperties(fs, { }, promises: { configurable: true, - enumerable: false, + enumerable: true, get() { if (promises === null) promises = require('internal/fs/promises'); From b9154d3a5172da819ebd9d9c3ef144d052ab6294 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Sat, 30 Mar 2019 22:34:49 +0100 Subject: [PATCH 3/3] fixup! fs: remove experimental warning for fs.promises --- doc/api/fs.md | 2 +- test/parallel/test-fs-promises.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/api/fs.md b/doc/api/fs.md index 9123048a3d929b..c96b2cf5c5f8f6 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -3699,7 +3699,7 @@ this API: [`fs.write(fd, string...)`][]. ## fs Promises API -> Stability: 1 - Experimental +> Stability: 2 - Stable The `fs.promises` API provides an alternative set of asynchronous file system methods that return `Promise` objects rather than using callbacks. The diff --git a/test/parallel/test-fs-promises.js b/test/parallel/test-fs-promises.js index c12b0135191821..b333801a8a03ee 100644 --- a/test/parallel/test-fs-promises.js +++ b/test/parallel/test-fs-promises.js @@ -40,9 +40,8 @@ function nextdir() { return `test${++dirc}`; } -// fs.promises should not be enumerable as long as it causes a warning to be -// emitted. -assert.strictEqual(Object.keys(fs).includes('promises'), false); +// fs.promises should not enumerable. +assert.strictEqual(Object.keys(fs).includes('promises'), true); { access(__filename, 'r')