Merge branch 'dev' into 8363-RefactorItemFixedPrice
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
4351ee4976
|
@ -44,7 +44,7 @@ export async function findImports(targetFile, visited = new Set(), identation =
|
|||
];
|
||||
}
|
||||
|
||||
return getUniques(fullTree); // Remove duplicates
|
||||
return getUniques([...fullTree, targetFile]); // Remove duplicates
|
||||
}
|
||||
|
||||
function getUniques(array) {
|
||||
|
|
|
@ -25,7 +25,7 @@ async function getChangedModules() {
|
|||
if (change.startsWith(E2E_PATH)) changedArray.push(change);
|
||||
changedModules = new Set(changedArray);
|
||||
}
|
||||
return [...changedModules].join('\n');
|
||||
return cleanSpecs(changedModules).join('\n');
|
||||
}
|
||||
|
||||
getChangedModules()
|
||||
|
@ -34,3 +34,20 @@ getChangedModules()
|
|||
console.error(e);
|
||||
process.exit(1);
|
||||
});
|
||||
|
||||
function cleanSpecs(changedModules) {
|
||||
let specifics = [];
|
||||
const modules = [];
|
||||
for (const changed of changedModules) {
|
||||
if (changed.endsWith('*.spec.js')) {
|
||||
modules.push(changed);
|
||||
continue;
|
||||
}
|
||||
specifics.push(changed);
|
||||
}
|
||||
specifics = specifics.filter(
|
||||
(spec) => !modules.some((module) => spec.startsWith(module.split('**')[0])),
|
||||
);
|
||||
|
||||
return [...modules, ...specifics];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue