Comparing version 0.10.0 to 0.10.1
27
index.js
@@ -210,7 +210,2 @@ 'use strict'; | ||
if (this.options.usePolling) { | ||
fs.unwatchFile(absolutePath, this.listeners[absolutePath]); | ||
delete this.listeners[absolutePath]; | ||
} | ||
// The Entry will either be a directory that just got removed | ||
@@ -244,3 +239,6 @@ // or a bogus entry to a file, in either case we have to remove it | ||
} else if (event === 'unlink') { | ||
this._remove(parent, item); | ||
// suppress unlink events on never before seen files (from atomic write) | ||
if (info.type === 'directory' || watchedDir.indexOf(item) !== -1) { | ||
this._remove(parent, item); | ||
} | ||
return; // Don't emit event twice. | ||
@@ -281,3 +279,3 @@ } | ||
return fs.stat(path, function(error, stats) { | ||
handleEvent(stats ? flags === 72960 ? 'change' : 'add' : 'unlink'); | ||
stats ? addOrChange() : handleEvent('unlink'); | ||
}); | ||
@@ -504,12 +502,9 @@ } | ||
}); | ||
if (this.options.usePolling) { | ||
Object.keys(watched).forEach(function(directory) { | ||
watched[directory].forEach(function(file) { | ||
var absolutePath = sysPath.resolve(directory, file); | ||
fs.unwatchFile(absolutePath, listeners[absolutePath]); | ||
delete listeners[absolutePath]; | ||
}); | ||
Object.keys(watched).forEach(function(directory) { | ||
watched[directory].forEach(function(file) { | ||
var absolutePath = sysPath.resolve(directory, file); | ||
fs.unwatchFile(absolutePath, listeners[absolutePath]); | ||
delete listeners[absolutePath]; | ||
}); | ||
} | ||
}); | ||
this.watched = Object.create(null); | ||
@@ -516,0 +511,0 @@ |
{ | ||
"name": "chokidar", | ||
"description": "A neat wrapper around node.js fs.watch / fs.watchFile / fsevents.", | ||
"version": "0.10.0", | ||
"version": "0.10.1", | ||
"keywords": [ | ||
@@ -6,0 +6,0 @@ "fs", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
0
23443
451