Skip to content

Commit

Permalink
Make backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Molinaro committed Nov 14, 2021
1 parent 6a163a7 commit 7451ffb
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/WatchIgnorePlugin.js
Expand Up @@ -50,7 +50,7 @@ class IgnoringWatchFileSystem {
missing,
startTime,
options,
(err, fileTimestamps, changedFiles, removedFiles) => {
(err, fileTimestamps, _, changedFiles, removedFiles) => {
if (err) return callback(err);
for (const path of ignoredFiles) {
fileTimestamps.set(path, IGNORE_TIME_ENTRY);
Expand Down
2 changes: 1 addition & 1 deletion lib/Watching.js
Expand Up @@ -310,7 +310,7 @@ class Watching {
missing,
this.lastWatcherStartTime,
this.watchOptions,
(err, fileTimeInfoEntries, changedFiles, removedFiles) => {
(err, fileTimeInfoEntries, _, changedFiles, removedFiles) => {
if (err) {
this.compiler.modifiedFiles = undefined;
this.compiler.removedFiles = undefined;
Expand Down
4 changes: 2 additions & 2 deletions lib/node/NodeWatchFileSystem.js
Expand Up @@ -28,7 +28,7 @@ class NodeWatchFileSystem {
* @param {Iterable<string>} missing watched exitance entries
* @param {number} startTime timestamp of start time
* @param {WatchOptions} options options object
* @param {function(Error=, Map<string, FileSystemInfoEntry>, Set<string>, Set<string>): void} callback aggregated callback
* @param {function(Error=, Map<string, FileSystemInfoEntry>, Map<string, FileSystemInfoEntry>, Set<string>, Set<string>): void} callback aggregated callback
* @param {function(string, number): void} callbackUndelayed callback when the first change was detected
* @returns {Watcher} a watcher
*/
Expand Down Expand Up @@ -79,7 +79,7 @@ class NodeWatchFileSystem {
}
}
const times = this.watcher.getTimeInfoEntries();
callback(null, times, changes, removals);
callback(null, times, times, changes, removals);
});

this.watcher.watch({ files, directories, missing, startTime });
Expand Down
2 changes: 1 addition & 1 deletion lib/util/fs.js
Expand Up @@ -78,7 +78,7 @@ const path = require("path");
* @param {Iterable<string>} missing watched exitance entries
* @param {number} startTime timestamp of start time
* @param {WatchOptions} options options object
* @param {function(Error=, Map<string, FileSystemInfoEntry | "ignore">, Set<string>, Set<string>): void} callback aggregated callback
* @param {function(Error=, Map<string, FileSystemInfoEntry | "ignore">, Map<string, FileSystemInfoEntry | "ignore">, Set<string>, Set<string>): void} callback aggregated callback
* @param {function(string, number): void} callbackUndelayed callback when the first change was detected
* @returns {Watcher} a watcher
*/
Expand Down
5 changes: 3 additions & 2 deletions types.d.ts
Expand Up @@ -11655,8 +11655,9 @@ declare interface WatchFileSystem {
callback: (
arg0: undefined | Error,
arg1: Map<string, FileSystemInfoEntry | "ignore">,
arg2: Set<string>,
arg3: Set<string>
arg2: Map<string, FileSystemInfoEntry | "ignore">,
arg3: Set<string>,
arg4: Set<string>
) => void,
callbackUndelayed: (arg0: string, arg1: number) => void
) => Watcher;
Expand Down

0 comments on commit 7451ffb

Please sign in to comment.