🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

@manypkg/find-root

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@manypkg/find-root

> Find the root of a monorepo with Yarn workspaces, npm, Lerna, pnpm or Rush

3.0.0
latest
Source
npm
Version published
Weekly downloads
2M
7.42%
Maintainers
2
Weekly downloads
 
Created

What is @manypkg/find-root?

@manypkg/find-root is an npm package designed to help you find the root directory of a monorepo or a project. This can be particularly useful in monorepo setups where you need to determine the root directory from a nested package.

What are @manypkg/find-root's main functionalities?

Find the root directory of a monorepo

This feature allows you to find the root directory of a monorepo starting from the current working directory. The `findRoot` function will traverse up the directory tree until it finds the root directory.

const findRoot = require('@manypkg/find-root');
const rootDir = findRoot(process.cwd());
console.log(rootDir);

Find the root directory with a custom start path

This feature allows you to specify a custom start path from which to begin the search for the root directory. This can be useful if you want to find the root directory from a specific location in your project.

const findRoot = require('@manypkg/find-root');
const rootDir = findRoot('/path/to/start');
console.log(rootDir);

Other packages similar to @manypkg/find-root

FAQs

Package last updated on 01 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts