Skip to content

Commit fd71c6e

Browse files
miluoshiFrozenPandaz
authored andcommitted
fix(core): use globbing also for workspace file patterns without '*' (#11298)
(cherry picked from commit a43a99b)
1 parent d304133 commit fd71c6e

1 file changed

Lines changed: 6 additions & 14 deletions

File tree

packages/nx/src/hasher/hasher.ts

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -459,20 +459,12 @@ class TaskHasher {
459459
if (!this.filesetHashes[mapKey]) {
460460
this.filesetHashes[mapKey] = new Promise(async (res) => {
461461
const parts = [];
462-
if (fileset.indexOf('*') > -1) {
463-
this.projectGraph.allWorkspaceFiles
464-
.filter((f) => minimatch(f.file, withoutWorkspaceRoot))
465-
.forEach((f) => {
466-
parts.push(f.hash);
467-
});
468-
} else {
469-
const matchingFile = this.projectGraph.allWorkspaceFiles.find(
470-
(t) => t.file === withoutWorkspaceRoot
471-
);
472-
if (matchingFile) {
473-
parts.push(matchingFile.hash);
474-
}
475-
}
462+
this.projectGraph.allWorkspaceFiles
463+
.filter((f) => minimatch(f.file, withoutWorkspaceRoot))
464+
.forEach((f) => {
465+
parts.push(f.hash);
466+
});
467+
476468
const value = this.hashing.hashArray(parts);
477469
res({
478470
value,

0 commit comments

Comments
 (0)