summaryrefslogtreecommitdiff
path: root/lib/internal/fs/watchers.js
diff options
context:
space:
mode:
authorLucas Holmquist <lholmqui@redhat.com>2019-10-29 09:42:51 -0400
committerAnna Henningsen <anna@addaleax.net>2019-11-05 23:16:44 +0100
commitf04810531afba30c77163fe18f4d16c540d94eb9 (patch)
treecaa362885e4a4faa56ccde156b81aab475aaa3f9 /lib/internal/fs/watchers.js
parent973f324463a91721cc8a1158a5ab10ad0dd69019 (diff)
downloadandroid-node-v8-f04810531afba30c77163fe18f4d16c540d94eb9.tar.gz
android-node-v8-f04810531afba30c77163fe18f4d16c540d94eb9.tar.bz2
android-node-v8-f04810531afba30c77163fe18f4d16c540d94eb9.zip
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: https://github.com/nodejs/node/pull/30160 Reviewed-By: David Carlier <devnexen@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'lib/internal/fs/watchers.js')
-rw-r--r--lib/internal/fs/watchers.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js
index 4dfa83c3b2..c974f40aae 100644
--- a/lib/internal/fs/watchers.js
+++ b/lib/internal/fs/watchers.js
@@ -174,6 +174,12 @@ FSWatcher.prototype[kFSWatchStart] = function(filename,
}
};
+// To maximize backward-compatiblity for the end user,
+// a no-op stub method has been added instead of
+// totally removing FSWatcher.prototpye.start.
+// This should not be documented.
+FSWatcher.prototype.start = () => {};
+
// This method is a noop if the watcher has not been started or
// has already been closed.
FSWatcher.prototype.close = function() {