cnp 1.0.0

A utility tool written in Rust to check unused node packages.
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::path::Path;

pub fn detect_package_manager() -> String {
    if Path::new("pnpm-lock.yaml").exists() {
        "pnpm".to_string()
    } else if Path::new("yarn.lock").exists() {
        "yarn".to_string()
    } else if Path::new("bun.lock").exists() {
        "bun".to_string()
    } else {
        "npm".to_string()
    }
}