watchpack
Advanced tools
Comparing version 2.0.0 to 2.0.1
@@ -352,3 +352,18 @@ /* | ||
if (this.closed) return; | ||
watcher.emit("change", safeTime); | ||
if (filePath === this.path) { | ||
watcher.emit( | ||
"change", | ||
filePath, | ||
safeTime, | ||
"watch (outdated on attach)", | ||
true | ||
); | ||
} else { | ||
watcher.emit( | ||
"change", | ||
safeTime, | ||
"watch (outdated on attach)", | ||
true | ||
); | ||
} | ||
}); | ||
@@ -355,0 +370,0 @@ } |
@@ -305,42 +305,2 @@ /* | ||
_missingWatcher(file, watcher) { | ||
if (watcher) { | ||
watcher.on("change", (mtime, type) => { | ||
this._onChange(file, mtime, file, type); | ||
}); | ||
watcher.on("remove", type => { | ||
this._onRemove(file, file, type); | ||
}); | ||
} | ||
return watcher; | ||
} | ||
_fileWatcher(file, watcher) { | ||
if (watcher) { | ||
watcher.on("initial-missing", type => { | ||
this._onRemove(file, file, type); | ||
}); | ||
watcher.on("change", (mtime, type) => { | ||
this._onChange(file, mtime, file, type); | ||
}); | ||
watcher.on("remove", type => { | ||
this._onRemove(file, file, type); | ||
}); | ||
} | ||
return watcher; | ||
} | ||
_dirWatcher(item, watcher) { | ||
watcher.on("initial-missing", type => { | ||
this._onRemove(item, item, type); | ||
}); | ||
watcher.on("change", (file, mtime, type) => { | ||
this._onChange(item, mtime, file, type); | ||
}); | ||
watcher.on("remove", type => { | ||
this._onRemove(item, item, type); | ||
}); | ||
return watcher; | ||
} | ||
_onChange(item, mtime, file, type) { | ||
@@ -347,0 +307,0 @@ file = file || item; |
{ | ||
"name": "watchpack", | ||
"version": "2.0.0", | ||
"version": "2.0.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/watchpack.js", |
55179
1643