UNPKG

node-module-collector

Version:

collect all production node modules used in a project

19 lines (14 loc) 526 B
type PM = "npm" | "yarn" | "pnpm" | "bun"; declare const detect: ({ cwd, includeGlobalBun, }?: { cwd?: string; includeGlobalBun?: boolean; }) => Promise<PM>; declare function getNpmVersion(pm: PM): Promise<string>; interface NodeModuleInfo { readonly name: string; readonly version: string; readonly dir: string; readonly dependencies?: Array<NodeModuleInfo>; } declare function getNodeModules(rootDir: string): Promise<NodeModuleInfo[]>; export { type PM, detect, getNodeModules, getNpmVersion };