From 8ce58b40fb8b71be4222ee42a8470f081b1557a9 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 2 Feb 2023 20:31:51 +0100 Subject: [PATCH] repo-tools: allow public tags in alpha and beta reports Signed-off-by: Patrik Oldsberg --- .../repo-tools/src/commands/api-reports/api-extractor.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/repo-tools/src/commands/api-reports/api-extractor.ts b/packages/repo-tools/src/commands/api-reports/api-extractor.ts index fb36d5fe4e..dcd0631614 100644 --- a/packages/repo-tools/src/commands/api-reports/api-extractor.ts +++ b/packages/repo-tools/src/commands/api-reports/api-extractor.ts @@ -531,6 +531,11 @@ export async function runApiExtraction({ const line = lines[i]; const match = line.match(/^\/\/ @(alpha|beta|public)/); if (match && match[1] !== expectedTag) { + // Because of limitations in the type script rollup logic we need to allow public exports from the other release stages + // TODO(Rugvip): Try to work around the need for this exception + if (expectedTag !== 'public' && match[1] === 'public') { + continue; + } throw new Error( `Unexpected release tag ${match[1]} in ${ extractorConfig.reportFilePath