Skip to content

Commit 85ce8ef

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]>
1 parent 69bf5b7 commit 85ce8ef

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
@@ -3679,7 +3679,7 @@ this API: [`fs.write(fd, string...)`][].
36793679

36803680
## fs Promises API
36813681

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

lib/fs.js

+2-5
Original file line numberDiff line numberDiff line change
@@ -1839,13 +1839,10 @@ Object.defineProperties(fs, {
18391839
},
18401840
promises: {
18411841
configurable: true,
1842-
enumerable: false,
1842+
enumerable: true,
18431843
get() {
1844-
if (promises === null) {
1844+
if (promises === null)
18451845
promises = require('internal/fs/promises');
1846-
process.emitWarning('The fs.promises API is experimental',
1847-
'ExperimentalWarning');
1848-
}
18491846
return promises;
18501847
}
18511848
}

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)