docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a command-line tool that cleans up redundant packages from node_modules directories in pnpm-managed projects.
Your CLI should accept the following command-line arguments:
<project-path> - Path to the project directory (required, positional argument)--dry-run - Simulate the operation without making actual changes (optional flag)The tool should:
--dry-run is specified, only simulate the operation without making changes--dry-run flag, it simulates the operation without modifying files @test/**
* Main CLI entry point
* Parses command-line arguments and executes the cleanup operation
*/
function main(): Promise<void>;
/**
* Executes the pruning operation for a given project directory
* @param projectPath - Path to the project directory
* @param dryRun - If true, simulate without making changes
* @returns The number of packages processed
*/
function cleanupProject(projectPath: string, dryRun: boolean): Promise<number>;Provides the core pruning functionality to remove redundant packages from node_modules.
Handles reading and parsing of pnpm lockfiles.
Provides type definitions for store controller operations.