Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-watch

Package Overview
Dependencies
Maintainers
2
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-watch - npm Package Compare versions

Comparing version 0.7.3 to 0.7.4

2

lib/watch.d.ts

@@ -63,3 +63,3 @@ import { FSWatcher } from 'fs';

declare interface Watcher extends FSWatcher {
export declare interface Watcher extends FSWatcher {
/**

@@ -66,0 +66,0 @@ * Returns `true` if the watcher has been closed.

@@ -129,2 +129,12 @@ var fs = require('fs');

function tryWatch(watcher, dir, opts) {
try {
return fs.watch(dir, opts);
} catch (e) {
process.nextTick(function() {
watcher.emit('error', e);
});
}
}
function getSubDirectories(dir, fn, done = function() {}) {

@@ -361,3 +371,7 @@ if (is.directory(dir)) {

var watcher = fs.watch(parent, opts);
var watcher = tryWatch(this, parent, opts);
if (!watcher) {
return;
}
this.add(watcher, {

@@ -400,3 +414,7 @@ type: 'file',

var watcher = fs.watch(dir, opts);
var watcher = tryWatch(self, dir, opts);
if (!watcher) {
done();
return;
}

@@ -477,5 +495,7 @@ self.add(watcher, {

if (!is.array(fpath) && !is.exists(fpath)) {
watcher.emit('error',
new Error(fpath + ' does not exist.')
);
process.nextTick(function() {
watcher.emit('error',
new Error(fpath + ' does not exist.')
);
});
}

@@ -482,0 +502,0 @@

@@ -14,3 +14,3 @@ {

],
"version": "0.7.3",
"version": "0.7.4",
"bugs": {

@@ -35,4 +35,4 @@ "url": "https://github.com/yuanchuan/node-watch/issues"

"fs-extra": "^7.0.1",
"mocha": "^5.2.0"
"mocha": "^10.2.0"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc