diff --git a/packages/cli-common/api-report.md b/packages/cli-common/api-report.md index d6d1c4fc36..f129fa3045 100644 --- a/packages/cli-common/api-report.md +++ b/packages/cli-common/api-report.md @@ -3,19 +3,13 @@ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). ```ts -// Warning: (ae-missing-release-tag) "findPaths" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function findPaths(searchDir: string): Paths; -// Warning: (ae-missing-release-tag) "isChildPath" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// // @public export function isChildPath(base: string, path: string): boolean; -// Warning: (ae-missing-release-tag) "Paths" is exported by the package, but it is missing a release tag (@alpha, @beta, @public, or @internal) -// -// @public (undocumented) +// @public export type Paths = { ownDir: string; ownRoot: string; @@ -27,9 +21,8 @@ export type Paths = { resolveTargetRoot: ResolveFunc; }; -// Warnings were encountered during analysis: -// -// src/paths.d.ts:7:5 - (ae-forgotten-export) The symbol "ResolveFunc" needs to be exported by the entry point index.d.ts +// @public (undocumented) +export type ResolveFunc = (...paths: string[]) => string; // (No @packageDocumentation comment for this package) ``` diff --git a/packages/cli-common/src/index.ts b/packages/cli-common/src/index.ts index 1f4f17fe9f..ed8158366d 100644 --- a/packages/cli-common/src/index.ts +++ b/packages/cli-common/src/index.ts @@ -16,4 +16,4 @@ export { findPaths } from './paths'; export { isChildPath } from './isChildPath'; -export type { Paths } from './paths'; +export type { Paths, ResolveFunc } from './paths'; diff --git a/packages/cli-common/src/isChildPath.ts b/packages/cli-common/src/isChildPath.ts index f48c92db32..f66a0cfa94 100644 --- a/packages/cli-common/src/isChildPath.ts +++ b/packages/cli-common/src/isChildPath.ts @@ -18,6 +18,8 @@ import { relative, isAbsolute } from 'path'; /** * Checks if path is the same as or a child path of base. + * + * @public */ export function isChildPath(base: string, path: string): boolean { const relativePath = relative(base, path); diff --git a/packages/cli-common/src/paths.ts b/packages/cli-common/src/paths.ts index 12a8484797..90239dfa4a 100644 --- a/packages/cli-common/src/paths.ts +++ b/packages/cli-common/src/paths.ts @@ -17,10 +17,15 @@ import fs from 'fs'; import { dirname, resolve as resolvePath } from 'path'; +/** @public */ export type ResolveFunc = (...paths: string[]) => string; -// Common paths and resolve functions used by the cli. -// Currently assumes it is being executed within a monorepo. +/** + * Common paths and resolve functions used by the cli. + * Currently assumes it is being executed within a monorepo. + * + * @public + */ export type Paths = { // Root dir of the cli itself, containing package.json ownDir: string; @@ -100,6 +105,7 @@ export function findOwnRootDir(ownDir: string) { /** * Find paths related to a package and its execution context. * + * @public * @example * * const paths = findPaths(__dirname)