Include default alpha export during package detection

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com>
Co-authored-by: Camila Belo <camilaibs@gmail.com>
Co-authored-by: Philipp Hugenroth <philipph@spotify.com>
Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2023-09-13 15:06:42 +02:00
parent 1807df9dbd
commit 219b46ae1a
2 changed files with 10 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/cli': patch
---
Include default alpha export during package detection
@@ -70,6 +70,11 @@ async function detectPackages(
depPackageJson.backstage?.role ?? '',
)
) {
// Include alpha entry point if available. If there's no default export it will be ignored
const exp = depPackageJson.exports;
if (exp && typeof exp === 'object' && './alpha' in exp) {
return [depName, `${depName}/alpha`];
}
return [depName];
}
return [];