# find-yarn-workspace-root

> Algorithm for finding the root of a yarn workspace, extracted from yarnpkg.com

Latest version **2.0.0** (published 2020-06-11) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install find-yarn-workspace-root
pnpm add find-yarn-workspace-root
yarn add find-yarn-workspace-root
bun add find-yarn-workspace-root
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2020-06-11 |
| First published | 2017-12-06 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 16.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51 |
| Author | Square, Inc. |
| Maintainers | adrw, bmishkin, dpapastrat, hirokiosame, matahwoosh, maxbeatty, square-developers, square-owner |

## Links

- npm: https://www.npmjs.com/package/find-yarn-workspace-root
- Repository: https://github.com/square/find-yarn-workspace-root
- Homepage: https://github.com/square/find-yarn-workspace-root#readme
- Issues: https://github.com/square/find-yarn-workspace-root/issues
- npm.io page: https://npm.io/package/find-yarn-workspace-root

## Dependencies (1)

- [micromatch](https://npm.io/package/micromatch.md) ^4.0.2

## Recent versions

- 2.0.0 (latest) — 2020-06-11
- 1.2.1 — 2018-08-30
- 1.2.0 — 2018-08-09
- 1.1.0 — 2018-03-23
- 1.0.0 — 2017-12-13
- 0.1.0 — 2017-12-06

## README

# find-yarn-workspace-root

![CI](https://github.com/square/find-yarn-workspace-root/workflows/CI/badge.svg)

Algorithm for finding the root of a yarn workspace, extracted from yarnpkg.com

## Installation

```bash
yarn add find-yarn-workspace-root
```

## Usage

```js
const findWorkspaceRoot = require('find-yarn-workspace-root');

const workspaceRoot = findWorkspaceRoot(__dirname); // Absolute path or null
```

## Contributing

Contributions are welcome! Just clone this repository and install the dependencies:

```bash
git clone https://github.com/square/find-yarn-workspace-root.git
cd find-yarn-workspace-root
yarn
```

Note that you'll need `node` and `yarn` installed. Next, verify the tests all pass:

```bash
yarn test
```

Then create a branch for your bugfix/feature, make changes and update the tests, and submit a pull request. Please do not change the version in `package.json` when submitting a pull request. We determine the next version automatically based on the commits since the last release.

> *NOTE*: Commit messages follow the [Angular commit message guidelines](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits).

## Releases

To trigger a release, bump the version using `standard-version`:

1. To update the CHANGELOG, bump the version in `package.json`, and create a git tag, run:

   ```bash
   $(yarn bin)/standard-version
   ```

2. `git push && git push --tags`

3. `npm publish`

---
Copyright 2017 Square, Inc.

---
_Source: https://npm.io/package/find-yarn-workspace-root · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
