Skip to content

Commit ccd3b74

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 <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Anto Aravinth <[email protected]> Reviewed-By: Yongsheng Zhang <[email protected]> Reviewed-By: James M Snell <[email protected]> Signed-off-by: Beth Griggs <[email protected]>
1 parent 687348a commit ccd3b74

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

Diff for: 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

Diff for: 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
}

Diff for: 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)