[v12.x backport] fs: add .ref() and .unref() methods to watcher classes
PR-URL: https://github.com/nodejs/node/pull/33134 Fixes: https://github.com/nodejs/node/issues/33096 Reviewed-By: James M Snell jasnell@gmail.com Reviewed-By: Anna Henningsen anna@addaleax.net
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines