import type { Catalogs } from '@pnpm/catalogs.types'; import type { CommandHandler } from '@pnpm/cli.command'; import { type Config, type ConfigContext } from '@pnpm/config.reader'; import { type DryRunInstallResult, type UpdateMatchingFunction } from '@pnpm/installing.deps-installer'; import type { PreferredVersions } from '@pnpm/resolving.resolver-base'; import type { ResolutionVerifier } from '@pnpm/resolving.resolver-base'; import { type CreateStoreControllerOptions } from '@pnpm/store.connection-manager'; import type { StoreController } from '@pnpm/store.controller'; import type { IncludedDependencies, Project, ProjectManifest, ProjectsGraph } from '@pnpm/types'; export type RecursiveOptions = CreateStoreControllerOptions & Pick & Pick & { rebuildHandler?: CommandHandler; include?: IncludedDependencies; includeDirect?: IncludedDependencies; latest?: boolean; pending?: boolean; workspace?: boolean; allowNew?: boolean; ignoredPackages?: Set; update?: boolean; updatePackageManifest?: boolean; updateMatching?: UpdateMatchingFunction; useBetaCli?: boolean; allProjectsGraph: ProjectsGraph; selectedProjectsGraph: ProjectsGraph; preferredVersions?: PreferredVersions; pruneDirectDependencies?: boolean; pruneLockfileImporters?: boolean; storeControllerAndDir?: { ctrl: StoreController; dir: string; resolutionVerifiers: ResolutionVerifier[]; }; pnpmfile: string[]; /** * Alternative install engine (today: pacquet) the deps-installer * delegates the install to. Built in `installDeps` when * `configDependencies.pacquet` is declared, threaded through here so * the recursive workspace path picks it up too. */ runPacquet?: { supportsResolution: boolean; run: (opts?: { filterResolvedProgress?: boolean; resolve?: boolean; }) => Promise; }; } & Partial> & Required>; export type CommandFullName = 'install' | 'add' | 'remove' | 'update' | 'import'; export interface RecursiveResult { passed: boolean | string; /** * Catalog entries written to `pnpm-workspace.yaml` during this install. * The caller folds these into the catalogs recorded in the workspace state * cache so that reverting a catalog entry is detected as an outdated state. */ updatedCatalogs?: Catalogs; /** * Present only for a `dryRun` install over a shared workspace lockfile: * the before/after wanted lockfiles for the caller to diff. */ dryRunResult?: DryRunInstallResult; } export declare function recursive(allProjects: Project[], params: string[], opts: RecursiveOptions, cmdFullName: CommandFullName): Promise; export declare function matchDependencies(match: (input: string) => string | null, manifest: ProjectManifest, include: IncludedDependencies): string[]; export type UpdateDepsMatcher = (input: string) => string | null; export declare function createMatcher(params: string[]): UpdateDepsMatcher; export declare function parseUpdateParam(param: string): { pattern: string; versionSpec: string | undefined; }; export declare function makeIgnorePatterns(ignoredDependencies: string[]): string[];