diff options
Diffstat (limited to 'node_modules/watchpack')
-rw-r--r-- | node_modules/watchpack/lib/DirectoryWatcher.js | 48 | ||||
-rw-r--r-- | node_modules/watchpack/package.json | 4 |
2 files changed, 33 insertions, 19 deletions
diff --git a/node_modules/watchpack/lib/DirectoryWatcher.js b/node_modules/watchpack/lib/DirectoryWatcher.js index 908ff2397..8c7c9cea9 100644 --- a/node_modules/watchpack/lib/DirectoryWatcher.js +++ b/node_modules/watchpack/lib/DirectoryWatcher.js @@ -56,7 +56,8 @@ function DirectoryWatcher(directoryPath, options) { ignorePermissionErrors: true,
ignored: options.ignored,
usePolling: options.poll ? true : undefined,
- interval: typeof options.poll === "number" ? options.poll : undefined
+ interval: typeof options.poll === "number" ? options.poll : undefined,
+ disableGlobbing: true
});
this.watcher.on("add", this.onFileAdded.bind(this));
this.watcher.on("addDir", this.onDirectoryAdded.bind(this));
@@ -119,24 +120,37 @@ DirectoryWatcher.prototype.setFileTime = function setFileTime(filePath, mtime, i };
DirectoryWatcher.prototype.setDirectory = function setDirectory(directoryPath, exist, initial, type) {
- var old = this.directories[directoryPath];
- if(!old) {
- if(exist) {
- if(this.nestedWatching) {
- this.createNestedWatcher(directoryPath);
- } else {
- this.directories[directoryPath] = true;
- }
+ if(directoryPath === this.path) {
+ if(!initial && this.watchers[withoutCase(this.path)]) {
+ this.watchers[withoutCase(this.path)].forEach(function(w) {
+ w.emit("change", directoryPath, w.data, initial ? "initial" : type);
+ });
}
} else {
- if(!exist) {
- if(this.nestedWatching)
- this.directories[directoryPath].close();
- delete this.directories[directoryPath];
- if(!initial && this.watchers[withoutCase(this.path)]) {
- this.watchers[withoutCase(this.path)].forEach(function(w) {
- w.emit("change", directoryPath, w.data, initial ? "initial" : type);
- });
+ var old = this.directories[directoryPath];
+ if(!old) {
+ if(exist) {
+ if(this.nestedWatching) {
+ this.createNestedWatcher(directoryPath);
+ } else {
+ this.directories[directoryPath] = true;
+ }
+ if(!initial && this.watchers[withoutCase(this.path)]) {
+ this.watchers[withoutCase(this.path)].forEach(function(w) {
+ w.emit("change", directoryPath, w.data, initial ? "initial" : type);
+ });
+ }
+ }
+ } else {
+ if(!exist) {
+ if(this.nestedWatching)
+ this.directories[directoryPath].close();
+ delete this.directories[directoryPath];
+ if(!initial && this.watchers[withoutCase(this.path)]) {
+ this.watchers[withoutCase(this.path)].forEach(function(w) {
+ w.emit("change", directoryPath, w.data, initial ? "initial" : type);
+ });
+ }
}
}
}
diff --git a/node_modules/watchpack/package.json b/node_modules/watchpack/package.json index b2017ff7e..72567df72 100644 --- a/node_modules/watchpack/package.json +++ b/node_modules/watchpack/package.json @@ -1,6 +1,6 @@ { "name": "watchpack", - "version": "1.3.1", + "version": "1.4.0", "description": "", "main": "./lib/watchpack.js", "directories": { @@ -38,7 +38,7 @@ }, "dependencies": { "async": "^2.1.2", - "chokidar": "^1.4.3", + "chokidar": "^1.7.0", "graceful-fs": "^4.1.2" } } |