Exports util functions to clean up node_modules
83
Quality
Pending
Does it follow best practices?
Impact
83%
1.09xAverage score across 10 eval scenarios
Build a CLI tool that configures a package manager to enforce minimum release age requirements for installed packages.
Your team wants to avoid installing recently published packages that may contain undiscovered bugs or security issues. Create a tool that configures the package manager to only allow installation of packages that have been published for at least a specified number of days.
Create a Node.js CLI tool that:
Accepts command-line arguments:
--min-days <number>: Minimum days since package publication (required, must be positive)--project-dir <path>: Project directory path (defaults to current directory)Sets the package manager configuration to enforce the minimum release age
Validates inputs and handles errors appropriately
min-days is a positive integer (greater than 0)@generates
/**
* Main CLI entry point that processes command line arguments
* and configures minimum release age policy
*/
function main() {
// IMPLEMENTATION HERE
}
/**
* Configures minimum release age for the package manager
* @param {number} minDays - Minimum number of days a package must be published
* @param {string} projectDir - Path to the project directory
* @returns {Promise<void>}
* @throws {Error} If configuration fails
*/
async function configureMinimumReleaseAge(minDays, projectDir) {
// IMPLEMENTATION HERE
}
/**
* Validates the minimum days parameter
* @param {number} minDays - The value to validate
* @returns {boolean} True if valid, false otherwise
*/
function validateMinDays(minDays) {
// IMPLEMENTATION HERE
}
module.exports = {
main,
configureMinimumReleaseAge,
validateMinDays
};Fast, disk space efficient package manager with support for minimum release age configuration.
@satisfied-by
Install with Tessl CLI
npx tessl i tessl/npm-pnpm--modules-cleanerdocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10