Skip to content

Commit

Permalink
watch: fix variable naming
Browse files Browse the repository at this point in the history
PR-URL: #53101
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
  • Loading branch information
jakecastelli authored and marco-ippolito committed Jul 19, 2024
1 parent 23f086c commit 1a2f3ab
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/internal/watch_mode/files_watcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const supportsRecursiveWatching = process.platform === 'win32' ||
class FilesWatcher extends EventEmitter {
#watchers = new SafeMap();
#filteredFiles = new SafeSet();
#depencencyOwners = new SafeMap();
#dependencyOwners = new SafeMap();
#ownerDependencies = new SafeMap();
#debounceOwners = new SafeSet();
#debounceTimer;
Expand Down Expand Up @@ -84,7 +84,7 @@ class FilesWatcher extends EventEmitter {
if (this.#mode === 'filter' && !this.#filteredFiles.has(trigger)) {
return;
}
const owners = this.#depencencyOwners.get(trigger);
const owners = this.#dependencyOwners.get(trigger);
if (owners) {
for (const owner of owners) {
this.#debounceOwners.add(owner);
Expand Down Expand Up @@ -129,11 +129,11 @@ class FilesWatcher extends EventEmitter {
}
this.#filteredFiles.add(file);
if (owner) {
const owners = this.#depencencyOwners.get(file) ?? new SafeSet();
const owners = this.#dependencyOwners.get(file) ?? new SafeSet();
const dependencies = this.#ownerDependencies.get(file) ?? new SafeSet();
owners.add(owner);
dependencies.add(file);
this.#depencencyOwners.set(file, owners);
this.#dependencyOwners.set(file, owners);
this.#ownerDependencies.set(owner, dependencies);
}
}
Expand Down Expand Up @@ -182,10 +182,10 @@ class FilesWatcher extends EventEmitter {
owners.forEach((owner) => {
this.#ownerDependencies.get(owner)?.forEach((dependency) => {
this.#filteredFiles.delete(dependency);
this.#depencencyOwners.delete(dependency);
this.#dependencyOwners.delete(dependency);
});
this.#filteredFiles.delete(owner);
this.#depencencyOwners.delete(owner);
this.#dependencyOwners.delete(owner);
this.#ownerDependencies.delete(owner);
});
}
Expand All @@ -196,7 +196,7 @@ class FilesWatcher extends EventEmitter {
this.#watchers.forEach(this.#unwatch);
this.#watchers.clear();
this.#filteredFiles.clear();
this.#depencencyOwners.clear();
this.#dependencyOwners.clear();
this.#ownerDependencies.clear();
}
}
Expand Down

0 comments on commit 1a2f3ab

Please sign in to comment.