-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs: deprecate never throw behaviour in fs.existsSync #55753
base: main
Are you sure you want to change the base?
fs: deprecate never throw behaviour in fs.existsSync #55753
Conversation
lib/fs.js
Outdated
@@ -286,6 +286,7 @@ function existsSync(path) { | |||
try { | |||
path = getValidatedPath(path); | |||
} catch { | |||
util.deprecate(() => {}, 'never throw on invalid arguments for fs.existsSync is deprecated', 'DEP0186'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that this is not a documentation-only deprecation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, I think this Runtime, isn't it?
ac72356
to
c3d38fb
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #55753 +/- ##
=======================================
Coverage 88.40% 88.40%
=======================================
Files 654 654
Lines 187747 187747
Branches 36127 36118 -9
=======================================
+ Hits 165972 165977 +5
- Misses 15009 15014 +5
+ Partials 6766 6756 -10
|
description: Runtime deprecation. | ||
--> | ||
|
||
Type: Runtime |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should first land it as doc-only
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I open a different PR for that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can, we'll need two PRs anyway, you can either keep this one for the runtime and open a new one for the doc-only, or convert this one to be doc-only and open another one for the runtime deprecation later.
Co-authored-by: Antoine du Hamel <[email protected]>
This PR attempts to deprecate the behaviour of returning false on argument validation in
fs.existsSync
cc @joyeecheung @BridgeAR