Comparing version 1.3.1 to 1.3.2
{ | ||
"name": "sane", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"description": "Sane aims to be fast, small, and reliable file system watcher.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -279,3 +279,5 @@ 'use strict'; | ||
this.watchdir(fullPath); | ||
this.emitEvent(ADD_EVENT, relativePath, stat); | ||
if (common.isFileIncluded(this.globs, this.dot, relativePath)) { | ||
this.emitEvent(ADD_EVENT, relativePath, stat); | ||
} | ||
} | ||
@@ -282,0 +284,0 @@ } else { |
@@ -138,3 +138,3 @@ 'use strict'; | ||
// Make sure we honor the dot option if even we're not using globs. | ||
options.expression = ['match', '*', 'basename', { | ||
options.expression = ['match', '**', 'wholename', { | ||
includedotfiles: false | ||
@@ -141,0 +141,0 @@ }]; |
@@ -370,6 +370,14 @@ var os = require('os'); | ||
}); | ||
this.watcher.on('add', function(filepath, dir) { | ||
if (filepath.match(/^\.lol/)) { | ||
done(new Error('Should not emit add events for ignored dirs')); | ||
} | ||
}); | ||
this.watcher.on('ready', function() { | ||
fs.mkdirSync(jo(testdir, '.lol')); | ||
fs.writeFileSync(jo(testdir, '.lol', 'file'), 'wow'); | ||
fs.writeFileSync(jo(testdir, '.file_3'), 'wow'); | ||
var subdir = jo(testdir, '.lol' + Math.floor(Math.random() * 10000)); | ||
fs.mkdirSync(subdir); | ||
fs.writeFileSync(jo(subdir, 'file'), 'wow'); | ||
fs.writeFileSync(jo(subdir, '.file_3'), 'wow'); | ||
fs.writeFileSync(jo(testdir, 'file_1'), 'wow'); | ||
@@ -376,0 +384,0 @@ }); |
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
61564
1253