From 219b46ae1a50f12d3e145e3929faf243d3a78df1 Mon Sep 17 00:00:00 2001 From: Johan Haals Date: Wed, 13 Sep 2023 15:06:42 +0200 Subject: [PATCH] Include default alpha export during package detection MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Fredrik Adelöw Co-authored-by: Patrik Oldsberg Co-authored-by: Camila Belo Co-authored-by: Philipp Hugenroth Signed-off-by: Johan Haals --- .changeset/wise-boxes-kiss.md | 5 +++++ packages/cli/src/lib/bundler/packageDetection.ts | 5 +++++ 2 files changed, 10 insertions(+) create mode 100644 .changeset/wise-boxes-kiss.md diff --git a/.changeset/wise-boxes-kiss.md b/.changeset/wise-boxes-kiss.md new file mode 100644 index 0000000000..ea3abd594d --- /dev/null +++ b/.changeset/wise-boxes-kiss.md @@ -0,0 +1,5 @@ +--- +'@backstage/cli': patch +--- + +Include default alpha export during package detection diff --git a/packages/cli/src/lib/bundler/packageDetection.ts b/packages/cli/src/lib/bundler/packageDetection.ts index 46cffdceb0..10686f7c86 100644 --- a/packages/cli/src/lib/bundler/packageDetection.ts +++ b/packages/cli/src/lib/bundler/packageDetection.ts @@ -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 [];