depsweep
Version:
🌱 Automated intelligent dependency cleanup with environmental impact reporting
22 lines (21 loc) • 1.51 kB
TypeScript
import type { DependencyContext, WorkspaceInfo } from "./interfaces.js";
interface DependencyInfo {
usedInFiles: string[];
requiredByPackages: Set<string>;
hasSubDependencyUsage: boolean;
}
interface ProgressOptions {
onProgress?: (filePath: string, subdepIndex?: number, totalSubdeps?: number) => void;
totalAnalysisSteps: number;
}
export declare function getDependencyInfo(dependency: string, context: DependencyContext, sourceFiles: string[], topLevelDependencies: Set<string>, progressOptions?: ProgressOptions): Promise<DependencyInfo>;
export declare function getTSConfig(projectRoot: string): Promise<any>;
export declare function getWorkspaceInfo(packageJsonPath: string): Promise<WorkspaceInfo | undefined>;
export declare function findClosestPackageJson(startDirectory: string): Promise<string>;
export declare function getDependencies(packageJsonPath: string): Promise<string[]>;
export declare function getPackageContext(packageJsonPath: string): Promise<DependencyContext>;
export declare function getSourceFiles(projectDirectory: string, ignorePatterns?: string[]): Promise<string[]>;
export declare function scanForDependency(config: any, dependency: string): boolean;
export declare function processFilesInParallel(files: string[], dependency: string, context: DependencyContext, onProgress?: (processed: number, total: number) => void): Promise<string[]>;
export declare function findSubDependencies(dependency: string, context: DependencyContext): string[];
export {};