import type { GenericProjectMetadata } from '@-xun/project-types'; import type { ParametersNoFirst } from "../../../common/src/types.js"; import type { ProjectFiles } from "../common.js"; /** * @see {@link gatherProjectFiles} */ export type GatherProjectFilesOptions = { /** * Use the internal cached result from a previous run, if available. * * Unless `useCached` is `false`, the results returned by this function will * always strictly equal (`===`) each other with respect to call signature. * * @see {@link cache} */ useCached: boolean; /** * Will not error if an interesting `package.json` file uses unsupported * features. */ ignoreUnsupportedFeatures?: boolean; } & ({ /** * If `true`, use the project root's `.prettierignore` file exclusively to * filter out returned project files. * * Note that _`.gitignore`_ is never used to filter the result of * `gatherProjectFiles`. * * @default true */ skipPrettierIgnored: false; /** * If `true`, completely ignore (never consider or return) files unknown * to git. * * Meaningless without `skipPrettierIgnored` also being `true`. * * @default false */ skipUnknown?: false; } | { skipPrettierIgnored?: true; skipUnknown?: boolean; }); declare function gatherProjectFiles_(shouldRunSynchronously: false, projectMetadata: GenericProjectMetadata, options: GatherProjectFilesOptions): Promise; declare function gatherProjectFiles_(shouldRunSynchronously: true, projectMetadata: GenericProjectMetadata, options: GatherProjectFilesOptions): ProjectFiles; /** * Asynchronously construct a {@link ProjectFiles} instance containing absolute * file paths ({@link AbsolutePath}s) derived from `projectMetadata`. * * Note that **only named packages** are considered "packages" in monorepos. * Unnamed and broken packages/workspaces are ignored except when constructing * `packageJsonFiles.elsewhere`. * * **NOTE: the result of this function is memoized! This does NOT _necessarily_ * mean results will strictly equal each other. See `useCached` in this specific * function's options for details.** To fetch fresh results, set the `useCached` * option to `false` or clear the internal cache with {@link cache.clear}. */ export declare function gatherProjectFiles(...args: ParametersNoFirst): Promise; export declare namespace gatherProjectFiles { /** * Synchronously construct a {@link ProjectFiles} instance containing absolute * file paths ({@link AbsolutePath}s) derived from `projectMetadata`. * * Note that **only named packages** are considered "packages" in monorepos. * Unnamed and broken packages/workspaces are ignored except when constructing * `packageJsonFiles.elsewhere`. * * **NOTE: the result of this function is memoized! This does NOT * _necessarily_ mean results will strictly equal each other. See `useCached` * in this specific function's options for details.** To fetch fresh results, * set the `useCached` option to `false` or clear the internal cache with * {@link cache.clear}. */ const sync: (projectMetadata: GenericProjectMetadata, options: Omit) => Awaited>; } export {};