Skip to content

Commit 226e9e4

Browse files
jakecastellimarco-ippolito
authored andcommitted
watch: fix variable naming
PR-URL: #53101 Reviewed-By: Moshe Atlow <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Zijian Liu <[email protected]>
1 parent 46660c7 commit 226e9e4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/internal/watch_mode/files_watcher.js

+7-7
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const supportsRecursiveWatching = process.platform === 'win32' ||
2727
class FilesWatcher extends EventEmitter {
2828
#watchers = new SafeMap();
2929
#filteredFiles = new SafeSet();
30-
#depencencyOwners = new SafeMap();
30+
#dependencyOwners = new SafeMap();
3131
#ownerDependencies = new SafeMap();
3232
#debounceOwners = new SafeSet();
3333
#debounceTimer;
@@ -84,7 +84,7 @@ class FilesWatcher extends EventEmitter {
8484
if (this.#mode === 'filter' && !this.#filteredFiles.has(trigger)) {
8585
return;
8686
}
87-
const owners = this.#depencencyOwners.get(trigger);
87+
const owners = this.#dependencyOwners.get(trigger);
8888
if (owners) {
8989
for (const owner of owners) {
9090
this.#debounceOwners.add(owner);
@@ -129,11 +129,11 @@ class FilesWatcher extends EventEmitter {
129129
}
130130
this.#filteredFiles.add(file);
131131
if (owner) {
132-
const owners = this.#depencencyOwners.get(file) ?? new SafeSet();
132+
const owners = this.#dependencyOwners.get(file) ?? new SafeSet();
133133
const dependencies = this.#ownerDependencies.get(file) ?? new SafeSet();
134134
owners.add(owner);
135135
dependencies.add(file);
136-
this.#depencencyOwners.set(file, owners);
136+
this.#dependencyOwners.set(file, owners);
137137
this.#ownerDependencies.set(owner, dependencies);
138138
}
139139
}
@@ -182,10 +182,10 @@ class FilesWatcher extends EventEmitter {
182182
owners.forEach((owner) => {
183183
this.#ownerDependencies.get(owner)?.forEach((dependency) => {
184184
this.#filteredFiles.delete(dependency);
185-
this.#depencencyOwners.delete(dependency);
185+
this.#dependencyOwners.delete(dependency);
186186
});
187187
this.#filteredFiles.delete(owner);
188-
this.#depencencyOwners.delete(owner);
188+
this.#dependencyOwners.delete(owner);
189189
this.#ownerDependencies.delete(owner);
190190
});
191191
}
@@ -196,7 +196,7 @@ class FilesWatcher extends EventEmitter {
196196
this.#watchers.forEach(this.#unwatch);
197197
this.#watchers.clear();
198198
this.#filteredFiles.clear();
199-
this.#depencencyOwners.clear();
199+
this.#dependencyOwners.clear();
200200
this.#ownerDependencies.clear();
201201
}
202202
}

0 commit comments

Comments
 (0)