MCPcopy Index your code
hub / github.com/dmno-dev/bumpy / detectWorkspaces

Function detectWorkspaces

packages/bumpy/src/utils/package-manager.ts:16–21  ·  view source on GitHub ↗
(rootDir: string)

Source from the content-addressed store, hash-verified

14
15/** Detect the package manager, extract workspace globs, and load catalogs */
16export async function detectWorkspaces(rootDir: string): Promise<WorkspaceInfo> {
17 const pm = await detectPackageManager(rootDir);
18 const globs = await getWorkspaceGlobs(rootDir, pm);
19 const catalogs = await loadCatalogs(rootDir, pm);
20 return { packageManager: pm, globs, catalogs };
21}
22
23export async function detectPackageManager(rootDir: string): Promise<PackageManager> {
24 // Check lockfiles in priority order

Callers 4

updateLockfileFunction · 0.90
publishCommandFunction · 0.90
discoverWorkspaceFunction · 0.90

Calls 3

detectPackageManagerFunction · 0.85
getWorkspaceGlobsFunction · 0.85
loadCatalogsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…