Comparing version 2.0.0-beta.0 to 2.0.0-beta.1
@@ -14,2 +14,4 @@ /* | ||
const EXISTANCE_ONLY_TIME_ENTRY = Object.freeze({}); | ||
let FS_ACCURACY = 1000; | ||
@@ -500,3 +502,3 @@ | ||
if(err2) { | ||
if(err2.code === "ENOENT" || err2.code === "EPERM" || err.code === "EBUSY") { | ||
if(err2.code === "ENOENT" || err2.code === "EPERM" || err2.code === "EBUSY") { | ||
this.setMissing(itemPath, initial, "scan (" + err2.code + ")") | ||
@@ -590,5 +592,5 @@ } else { | ||
// No additional info about this directory | ||
map.set(dir, {}); | ||
map.set(dir, EXISTANCE_ONLY_TIME_ENTRY); | ||
} | ||
map.set(this.path, {}); | ||
map.set(this.path, EXISTANCE_ONLY_TIME_ENTRY); | ||
} | ||
@@ -634,2 +636,3 @@ if(!this.initialScan) { | ||
module.exports = DirectoryWatcher; | ||
module.exports.EXISTANCE_ONLY_TIME_ENTRY = EXISTANCE_ONLY_TIME_ENTRY; | ||
@@ -639,2 +642,3 @@ function fixupEntryAccuracy(entry) { | ||
entry.safeTime = entry.safeTime - entry.accuracy + FS_ACCURACY; | ||
entry.accuracy = FS_ACCURACY; | ||
} | ||
@@ -641,0 +645,0 @@ } |
@@ -10,2 +10,4 @@ /* | ||
let EXISTANCE_ONLY_TIME_ENTRY; // lazy required | ||
function addWatchersToSet(watchers, set) { | ||
@@ -82,2 +84,5 @@ for(const w of watchers) { | ||
getTimeInfoEntries() { | ||
if(EXISTANCE_ONLY_TIME_ENTRY === undefined) { | ||
EXISTANCE_ONLY_TIME_ENTRY = require("./DirectoryWatcher").EXISTANCE_ONLY_TIME_ENTRY; | ||
} | ||
const directoryWatchers = new Set(); | ||
@@ -90,2 +95,11 @@ addWatchersToSet(this.fileWatchers, directoryWatchers); | ||
for(const [path, entry] of times) { | ||
if(map.has(path)) { | ||
if(entry === EXISTANCE_ONLY_TIME_ENTRY) continue; | ||
const value = map.get(path); | ||
if(value === entry) continue; | ||
if(value !== EXISTANCE_ONLY_TIME_ENTRY) { | ||
map.set(path, Object.assign({}, value, entry)); | ||
continue; | ||
} | ||
} | ||
map.set(path, entry); | ||
@@ -92,0 +106,0 @@ } |
{ | ||
"name": "watchpack", | ||
"version": "2.0.0-beta.0", | ||
"version": "2.0.0-beta.1", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "./lib/watchpack.js", |
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
28169
774
0