Skip to content

Commit bb6f944

Browse files
lholmquistMylesBorins
authored andcommittedNov 17, 2019
fs: add noop stub for FSWatcher.prototype.start
* Motivation: In a previous PR, #29905, I made this method a private method since it had no value to the user. There was discussion that maybe it should have been a runtime deprecation first, but was ultimatley decided that for this type of method, a noop stub was a better option. This Adds back in the method, but as a noop stub, while also keeping the real implementation private PR-URL: #30160 Reviewed-By: David Carlier <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]>
1 parent e51beef commit bb6f944

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎lib/internal/fs/watchers.js

+6
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@ FSWatcher.prototype[kFSWatchStart] = function(filename,
174174
}
175175
};
176176

177+
// To maximize backward-compatiblity for the end user,
178+
// a no-op stub method has been added instead of
179+
// totally removing FSWatcher.prototpye.start.
180+
// This should not be documented.
181+
FSWatcher.prototype.start = () => {};
182+
177183
// This method is a noop if the watcher has not been started or
178184
// has already been closed.
179185
FSWatcher.prototype.close = function() {

0 commit comments

Comments
 (0)
Please sign in to comment.