Fix prettier formatting
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -35,9 +35,7 @@ import { targetPaths } from '@backstage/cli-common';
|
||||
import { logApiReportInstructions } from '../common';
|
||||
import { patchApiReportGeneration } from './patchApiReportGeneration';
|
||||
|
||||
const tmpDir = targetPaths.resolveRoot(
|
||||
'./node_modules/.cache/api-extractor',
|
||||
);
|
||||
const tmpDir = targetPaths.resolveRoot('./node_modules/.cache/api-extractor');
|
||||
|
||||
export async function countApiReportWarnings(reportPath: string) {
|
||||
try {
|
||||
@@ -143,11 +141,7 @@ export async function runApiExtraction({
|
||||
// inspected.
|
||||
const allDistTypesEntryPointPaths = allEntryPoints.map(
|
||||
({ packageDir, distTypesPath }) => {
|
||||
return targetPaths.resolveRoot(
|
||||
'./dist-types',
|
||||
packageDir,
|
||||
distTypesPath,
|
||||
);
|
||||
return targetPaths.resolveRoot('./dist-types', packageDir, distTypesPath);
|
||||
},
|
||||
);
|
||||
|
||||
@@ -173,10 +167,7 @@ export async function runApiExtraction({
|
||||
: allowWarnings;
|
||||
|
||||
const projectFolder = targetPaths.resolveRoot(packageDir);
|
||||
const packageFolder = targetPaths.resolveRoot(
|
||||
'./dist-types',
|
||||
packageDir,
|
||||
);
|
||||
const packageFolder = targetPaths.resolveRoot('./dist-types', packageDir);
|
||||
|
||||
const remainingReportFiles = new Set(
|
||||
fs.readdirSync(projectFolder).filter(
|
||||
|
||||
@@ -38,9 +38,7 @@ type Options = {
|
||||
} & OptionValues;
|
||||
|
||||
export async function buildApiReports(paths: string[] = [], opts: Options) {
|
||||
const tmpDir = targetPaths.resolveRoot(
|
||||
'./node_modules/.cache/api-extractor',
|
||||
);
|
||||
const tmpDir = targetPaths.resolveRoot('./node_modules/.cache/api-extractor');
|
||||
|
||||
const isCiBuild = opts.ci;
|
||||
const isDocsBuild = opts.docs;
|
||||
|
||||
@@ -45,9 +45,7 @@ export async function categorizePackageDirs(packageDirs: string[]) {
|
||||
if (!role) {
|
||||
return; // Ignore packages without roles
|
||||
}
|
||||
if (
|
||||
await fs.pathExists(targetPaths.resolveRoot(dir, 'migrations'))
|
||||
) {
|
||||
if (await fs.pathExists(targetPaths.resolveRoot(dir, 'migrations'))) {
|
||||
sqlPackageDirs.push(dir);
|
||||
}
|
||||
// TODO(Rugvip): Inlined packages are ignored because we can't handle @internal exports
|
||||
|
||||
@@ -150,10 +150,7 @@ export default async function packageDocs(paths: string[] = [], opts: any) {
|
||||
selectedPackageDirs.map(pkg =>
|
||||
limit(async () => {
|
||||
const pkgJson = JSON.parse(
|
||||
await readFile(
|
||||
targetPaths.resolveRoot(pkg, 'package.json'),
|
||||
'utf-8',
|
||||
),
|
||||
await readFile(targetPaths.resolveRoot(pkg, 'package.json'), 'utf-8'),
|
||||
);
|
||||
if (EXCLUDE.includes(pkg) || pkgJson.name.startsWith('@internal/')) {
|
||||
return;
|
||||
@@ -172,10 +169,7 @@ export default async function packageDocs(paths: string[] = [], opts: any) {
|
||||
console.log(`### Processing ${pkg}`);
|
||||
const success = await generateDocJson(pkg);
|
||||
if (success) {
|
||||
await cache.write(
|
||||
pkg,
|
||||
targetPaths.resolveRoot(`dist-types`, pkg),
|
||||
);
|
||||
await cache.write(pkg, targetPaths.resolveRoot(`dist-types`, pkg));
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('Failed to generate docs for', pkg);
|
||||
|
||||
@@ -18,7 +18,10 @@ import { findOwnPaths } from '@backstage/cli-common';
|
||||
import fs from 'fs-extra';
|
||||
|
||||
export async function createTemporaryTsConfig(dir: string) {
|
||||
const path = findOwnPaths(__dirname).resolveRoot(dir, 'tsconfig.typedoc.tmp.json');
|
||||
const path = findOwnPaths(__dirname).resolveRoot(
|
||||
dir,
|
||||
'tsconfig.typedoc.tmp.json',
|
||||
);
|
||||
|
||||
process.once('exit', () => {
|
||||
fs.removeSync(path);
|
||||
|
||||
@@ -63,7 +63,9 @@ export async function resolvePackagePaths(
|
||||
if (include) {
|
||||
packages = packages.filter(pkg =>
|
||||
include.some(pattern =>
|
||||
new Minimatch(pattern).match(relativePath(targetPaths.rootDir, pkg.dir)),
|
||||
new Minimatch(pattern).match(
|
||||
relativePath(targetPaths.rootDir, pkg.dir),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user