diff --git a/doc/api/deprecations.md b/doc/api/deprecations.md index 6e4cfc9e0ada78..1de6fdf8ddb0d4 100644 --- a/doc/api/deprecations.md +++ b/doc/api/deprecations.md @@ -3779,6 +3779,9 @@ changes: - version: REPLACEME pr-url: https://github.com/nodejs/node/pull/55753 description: Runtime deprecation. + - version: REPLACEME + pr-url: https://github.com/nodejs/node/pull/55892 + description: Documentation-only. --> Type: Runtime diff --git a/lib/fs.js b/lib/fs.js index e96d351bfe8ae4..eb6ca101243be7 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -286,7 +286,10 @@ function existsSync(path) { try { path = getValidatedPath(path); } catch { - deprecate(() => {}, 'Passing invalid argument types to fs.existsSync is deprecated', 'DEP0187'); + if (!deprecationWarningEmitted) { + process.emitWarning('Passing invalid argument types to fs.existsSync is deprecated', 'DeprecationWarning', 'DEP0187'); + deprecationWarningEmitted = true; + } return false; }