Skip to content

Commit

Permalink
docs: add jsdocs for detectPackageManager
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Feb 6, 2024
1 parent d44ca3a commit a7dfce7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/package-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@ export const packageManagers: PackageManager[] = [
},
] as const;

/**
* Detect the package manager used in a directory (and up) by checking various sources:
*
* 1. Use `packageManager` field from package.json
*
* 2. Known lock files and other files
*/
export async function detectPackageManager(
cwd: string,
options: DetectPackageManagerOptions = {},
Expand Down

0 comments on commit a7dfce7

Please sign in to comment.