Skip to content

Commit a36a0fd

Browse files
committed
fs: deprecate never throw behaviour in fs.existsSync
1 parent 1dac9d2 commit a36a0fd

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

doc/api/deprecations.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3786,6 +3786,19 @@ Type: Documentation-only
37863786
Passing non-supported argument types is deprecated and, instead of returning `false`,
37873787
will throw an error in a future version.
37883788

3789+
### DEP0187: `fs.existsSync` never throw on invalid arguments
3790+
3791+
<!-- YAML
3792+
changes:
3793+
- version: REPLACEME
3794+
pr-url: https://github.com/nodejs/node/pull/55753
3795+
description: Runtime deprecation.
3796+
-->
3797+
3798+
Type: Runtime
3799+
3800+
Returning false on validation errors is deprecated.
3801+
37893802
[NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf
37903803
[RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3
37913804
[RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4

lib/fs.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ const {
151151
validateString,
152152
kValidateObjectAllowNullable,
153153
} = require('internal/validators');
154+
const { deprecate } = require('internal/util');
154155

155156
const permission = require('internal/process/permission');
156157

0 commit comments

Comments
 (0)