fix(core): use globbing also for workspace file patterns without '*' (#11298)

This commit is contained in:
Miloš Lajtman 2023-03-02 23:30:12 +01:00 committed by GitHub
parent 311dbd079c
commit a43a99bea5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -459,20 +459,12 @@ class TaskHasher {
if (!this.filesetHashes[mapKey]) {
this.filesetHashes[mapKey] = new Promise(async (res) => {
const parts = [];
if (fileset.indexOf('*') > -1) {
this.projectGraph.allWorkspaceFiles
.filter((f) => minimatch(f.file, withoutWorkspaceRoot))
.forEach((f) => {
parts.push(f.hash);
});
} else {
const matchingFile = this.projectGraph.allWorkspaceFiles.find(
(t) => t.file === withoutWorkspaceRoot
);
if (matchingFile) {
parts.push(matchingFile.hash);
}
}
const value = this.hashing.hashArray(parts);
res({
value,