repo-tools: flip around API report naming
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -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
@@ -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`,
|
||||
),
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user