repo-tools: flip around API report naming

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2023-11-28 10:47:35 +01:00
parent bb6878f5b7
commit aea8f8d329
69 changed files with 10 additions and 5 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/repo-tools': minor
---
**BREAKING**: API Reports generated for sub-path exports now place the name as a suffix rather than prefix, for example `api-report-alpha.md` instead of `alpha-api-report.md`. When upgrading to this version you'll need to re-create any such API reports and delete the old ones.
+1 -1
View File
@@ -5,7 +5,7 @@ coverage
*.hbs
templates
api-report.md
*-api-report.md
api-report-*.md
cli-report.md
plugins/scaffolder-backend/sample-templates
.vscode
@@ -375,8 +375,8 @@ export async function runApiExtraction({
packageDir,
);
const prefix = name === 'index' ? '' : `${name}-`;
const reportFileName = `${prefix}api-report.md`;
const suffix = name === 'index' ? '' : `-${name}`;
const reportFileName = `api-report${suffix}.md`;
const reportPath = resolvePath(projectFolder, reportFileName);
const warningCountBefore = await countApiReportWarnings(reportPath);
@@ -396,7 +396,7 @@ export async function runApiExtraction({
reportFolder: projectFolder,
reportTempFolder: resolvePath(
outputDir,
`${prefix}<unscopedPackageName>`,
`<unscopedPackageName>${suffix}`,
),
},
@@ -406,7 +406,7 @@ export async function runApiExtraction({
enabled: name === 'index',
apiJsonFilePath: resolvePath(
outputDir,
`${prefix}<unscopedPackageName>.api.json`,
`<unscopedPackageName>${suffix}.api.json`,
),
},