Comparing version 0.5.0 to 0.5.1
25
main.js
@@ -32,13 +32,22 @@ // Copyright 2010-2011 Mikeal Rogers | ||
callback.pending -= 1; | ||
files.forEach(function (f) { | ||
files.forEach(function (f, index) { | ||
f = path.join(dir, f); | ||
callback.pending += 1; | ||
fs.stat(f, function (err, stat) { | ||
if (err) return callback(err) | ||
var enoent = false; | ||
if (err) { | ||
if (err.code !== 'ENOENT') { | ||
return callback(err); | ||
} else { | ||
enoent = true; | ||
} | ||
} | ||
callback.pending -= 1; | ||
if (options.ignoreDotFiles && path.basename(f)[0] === '.') return; | ||
if (options.filter && options.filter(f)) return; | ||
callback.files[f] = stat; | ||
if (stat.isDirectory()) walk(f, options, callback); | ||
if (callback.pending === 0) callback(null, callback.files); | ||
if (!enoent) { | ||
if (options.ignoreDotFiles && path.basename(f)[0] === '.') return; | ||
if (options.filter && options.filter(f, stat)) return; | ||
callback.files[f] = stat; | ||
if (stat.isDirectory()) walk(f, options, callback); | ||
if (callback.pending === 0) callback(null, callback.files); | ||
} | ||
}) | ||
@@ -85,3 +94,3 @@ }) | ||
fileWatcher(root); | ||
for (i in files) { | ||
for (var i in files) { | ||
fileWatcher(i); | ||
@@ -88,0 +97,0 @@ } |
{ "name" : "watch" | ||
, "description" : "Utilities for watching file trees." | ||
, "tags" : ["util", "utility", "fs", "files"] | ||
, "version" : "0.5.0" | ||
, "version" : "0.5.1" | ||
, "homepage": "https://github.com/mikeal/watch" | ||
@@ -6,0 +6,0 @@ , "bugs": |
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
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
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
Non-existent author
Supply chain riskThe package was published by an npm account that no longer exists.
Found 1 instance in 1 package
17248
146
0
1