repo-tools: make api extraction ignore packages without a role

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-02-04 13:12:16 +01:00
parent 02f1316e57
commit ff63acf30a
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': patch
---
Packages without a declared `backstage.role` are now ignored.
@@ -1107,7 +1107,7 @@ export async function categorizePackageDirs(packageDirs: any[]) {
});
const role = pkgJson?.backstage?.role;
if (!role) {
throw new Error(`No backstage.role in ${dir}/package.json`);
return; // Ignore packages without roles
}
if (role === 'cli') {
cliPackageDirs.push(dir);