Skip to content

Commit 3e386a7

Browse files
addaleaxBethGriggs
authored andcommitted
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: #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>
1 parent ecac654 commit 3e386a7

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

doc/api/fs.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3686,7 +3686,7 @@ this API: [`fs.write(fd, string...)`][].
36863686

36873687
## fs Promises API
36883688

3689-
> Stability: 1 - Experimental
3689+
> Stability: 2 - Stable
36903690
36913691
The `fs.promises` API provides an alternative set of asynchronous file system
36923692
methods that return `Promise` objects rather than using callbacks. The

lib/fs.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -1894,13 +1894,10 @@ Object.defineProperties(fs, {
18941894
},
18951895
promises: {
18961896
configurable: true,
1897-
enumerable: false,
1897+
enumerable: true,
18981898
get() {
1899-
if (promises === null) {
1899+
if (promises === null)
19001900
promises = require('internal/fs/promises');
1901-
process.emitWarning('The fs.promises API is experimental',
1902-
'ExperimentalWarning');
1903-
}
19041901
return promises;
19051902
}
19061903
}

test/parallel/test-fs-promises.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,8 @@ function nextdir() {
4040
return `test${++dirc}`;
4141
}
4242

43-
// fs.promises should not be enumerable as long as it causes a warning to be
44-
// emitted.
45-
assert.strictEqual(Object.keys(fs).includes('promises'), false);
43+
// fs.promises should not enumerable.
44+
assert.strictEqual(Object.keys(fs).includes('promises'), true);
4645

4746
{
4847
access(__filename, 'r')

0 commit comments

Comments
 (0)