Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Antoine du Hamel <[email protected]>
  • Loading branch information
Ceres6 and aduh95 authored Nov 27, 2024
1 parent e3b9537 commit 8e29103
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions doc/api/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {

Check failure on line 289 in lib/fs.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

'deprecationWarningEmitted' is not defined
process.emitWarning('Passing invalid argument types to fs.existsSync is deprecated', 'DeprecationWarning', 'DEP0187');

Check failure on line 290 in lib/fs.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

This line has a length of 124. Maximum allowed is 120
deprecationWarningEmitted = true;

Check failure on line 291 in lib/fs.js

View workflow job for this annotation

GitHub Actions / lint-js-and-md

'deprecationWarningEmitted' is not defined
}
return false;
}

Expand Down

0 comments on commit 8e29103

Please sign in to comment.