scipts/generate-changeset-feedback: skip regex matching

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-12-06 13:33:52 +01:00
parent b062a1dc63
commit 88c273ec14
+1 -3
View File
@@ -99,11 +99,9 @@ async function listPackages() {
return;
}
// Find all subdirectories, check if they match the provided pattern
const nextPattern = new RegExp(nextPart.replaceAll('*', '.*'));
for (const filePath of fs.readdirSync(dir)) {
if (fs.statSync(resolvePath(dir, filePath)).isDirectory()) {
if (filePath.match(nextPattern)) {
if (filePath === nextPart || nextPart === '*') {
readDirRecursive(resolvePath(dir, filePath), parts.slice(1));
}
}