Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-03-11 13:19:47 +0300
committerBeth Griggs <Bethany.Griggs@uk.ibm.com>2019-04-10 17:30:25 +0300
commitccd3b74696f79e3ffd76556d95089add187fdb0a (patch)
tree24fa09c17e79c237595ab9bb0c109270fbd07587
parent687348ad1d7b7852841d26c74e3f7e9bef4340f0 (diff)
fs: remove experimental warning for fs.promises
This has been warning for long enough, without any API changes in the last few months. PR-URL: https://github.com/nodejs/node/pull/26581 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Signed-off-by: Beth Griggs <Bethany.Griggs@uk.ibm.com>
-rw-r--r--doc/api/fs.md2
-rw-r--r--lib/fs.js7
-rw-r--r--test/parallel/test-fs-promises.js5
3 files changed, 5 insertions, 9 deletions
diff --git a/doc/api/fs.md b/doc/api/fs.md
index e65f6c7d4d2..ec6d931e140 100644
--- a/doc/api/fs.md
+++ b/doc/api/fs.md
@@ -3686,7 +3686,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/lib/fs.js b/lib/fs.js
index e5abc59b591..3a299145ff5 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -1894,13 +1894,10 @@ Object.defineProperties(fs, {
},
promises: {
configurable: true,
- enumerable: false,
+ enumerable: true,
get() {
- if (promises === null) {
+ if (promises === null)
promises = require('internal/fs/promises');
- process.emitWarning('The fs.promises API is experimental',
- 'ExperimentalWarning');
- }
return promises;
}
}
diff --git a/test/parallel/test-fs-promises.js b/test/parallel/test-fs-promises.js
index 97b5f8326e6..cdafc11e21a 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')