import type { Preset } from '.'; /** * Generate a table of contents for a monorepo. * * ##### Example (basic) * * `` * * ##### Example (using config options) * * `` * * @param repoRoot * [optional] the relative path to the root of the git repository. By default, searches parent directories for a package.json to find the "root". * @param filter * [optional] a dictionary of filter rules to whitelist packages. Filters can be applied based on package.json keys, * * examples: * - `filter: '@myorg/.*-lib'` (match packages with names matching this regex) * - `filter: { package.name: '@myorg/.*-lib' }` (equivalent to the above) * - `filter: { package.version: '^[1-9].*' }` (match packages with versions starting with a non-zero digit, i.e. 1.0.0+) * - `filter: '^(?!.*(internal$))'` (match packages that do not contain "internal" anywhere (using [negative lookahead](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Regular_expressions/Lookahead_assertion))) * - `filter: { package.name: '@myorg', path: 'libraries' }` (match packages whose name contains "@myorg" and whose path matches "libraries") * - `filter: { readme: 'This is production-ready' }` (match packages whose readme contains the string "This is production-ready") * @param sort * [optional] sort based on package properties (see `filter`), or readme length. Use `-` as a prefix to sort descending. * examples: * - `sort: package.name` (sort by package name) * - `sort: -readme.length` (sort by readme length, descending) * - `sort: toplogical` (sort by toplogical dependencies, starting with the most depended-on packages) */ export declare const monorepoTOC: Preset<{ repoRoot?: string; filter?: string | Record; sort?: string; }>; export declare const toposort: (graph: Record) => import("@pnpm/deps.graph-sequencer").Result;