Skip to content

Commit c4796b2

Browse files
authored
fix: include files that are outside project context (#437)
In the case that the referenced project was outside the webpack context, changes didn't update the issues list.
1 parent 1f7ae0d commit c4796b2

File tree

2 files changed

+2
-22
lines changed

2 files changed

+2
-22
lines changed

src/hooks/getChangedFiles.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,7 @@ function getChangedFiles(compiler: webpack.Compiler): string[] {
1515
changedFiles = Object.keys((watcher && watcher.mtimes) || {});
1616
}
1717

18-
return (
19-
changedFiles
20-
// normalize paths
21-
.map((changedFile) => path.normalize(changedFile))
22-
// check if path is inside the context to filer-out some trash from fs
23-
.filter(
24-
(changedFile) =>
25-
!compiler.options.context ||
26-
changedFile.startsWith(path.normalize(compiler.options.context))
27-
)
28-
);
18+
return changedFiles.map((changedFile) => path.normalize(changedFile));
2919
}
3020

3121
export { getChangedFiles };

src/hooks/getDeletedFiles.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,7 @@ function getDeletedFiles(
1717
deletedFiles = [...state.removedFiles];
1818
}
1919

20-
return (
21-
deletedFiles
22-
// normalize paths
23-
.map((changedFile) => path.normalize(changedFile))
24-
// check if path is inside the context to filer-out some trash from fs
25-
.filter(
26-
(changedFile) =>
27-
!compiler.options.context ||
28-
changedFile.startsWith(path.normalize(compiler.options.context))
29-
)
30-
);
20+
return deletedFiles.map((changedFile) => path.normalize(changedFile));
3121
}
3222

3323
export { getDeletedFiles };

0 commit comments

Comments
 (0)