Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@manypkg/find-root

Thinkmill7.8mMIT2.2.3TypeScript support: included

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

readme

@manypkg/find-root

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

Install

yarn add @manypkg/find-root

Usage

import { findRoot, findRootSync } from "@manypkg/find-root";

let dir = await findRoot(process.cwd());
let dir = findRootSync(process.cwd());

changelog

@manypkg/find-root

2.2.3

Patch Changes

2.2.2

Patch Changes

2.2.1

Patch Changes

2.2.0

Minor Changes

Patch Changes

2.1.0

Minor Changes

  • #167 bf586f5 Thanks @elliot-nelson! - The findRoot and findRootSync methods now take an optional list of Tool implementations, allowing the caller to restrict the desired types of monorepo discovered, or provide a custom monorepo tool implementation.

2.0.0

Major Changes

  • #151 a01efc9 Thanks @elliot-nelson! - The find-root package now returns a new MonorepoRoot interface, instead of a string. This interface provides a rootDir for the discovered monorepo, and a tool object, which is an object using the new Tool interface provided by @manypkg/tools.

  • #165 7b9c4f6 Thanks @Andarist! - Removed support for Bolt monorepos.

  • #162 f046017 Thanks @Andarist! - Increased the transpilation target of the source files to `node@14.x. At the same time added this aspackage.json#engines` to explicitly declare the minimum node version supported by this package.

Patch Changes

1.1.0

Minor Changes

1.0.0

Major Changes