UNPKG

ipsambeatae

Version:

Shared dependencies of Compass, the MongoDB extension for VSCode and MongoSH

11 lines (9 loc) 291 B
import findUp from 'find-up'; import path from 'path'; export async function findMonorepoRoot() { const packagePath = await findUp('package-lock.json'); if (!packagePath) { throw new Error('Could not find monorepo root package-lock file'); } return path.dirname(packagePath); }