# @monorepo-utils/package-utils

> Package utility for monorepo.

Latest version **2.11.0** (published 2025-05-12) · MIT license · 0 weekly downloads

## Install

```sh
npm install @monorepo-utils/package-utils
pnpm add @monorepo-utils/package-utils
yarn add @monorepo-utils/package-utils
bun add @monorepo-utils/package-utils
```

## Health

**Score 35/100 (D)** — status: maintenance-mode.

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

Warnings: low downloads; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.11.0 |
| Published | 2025-05-12 |
| First published | 2018-07-22 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 14.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 180 |
| Author | azu |
| Maintainers | azu |
| Keywords | lerna, monorepo, util |

## Links

- npm: https://www.npmjs.com/package/@monorepo-utils/package-utils
- Repository: https://github.com/azu/monorepo-utils
- Homepage: https://github.com/azu/monorepo-utils/tree/master/packages/@monorepo-utils/package-utils/
- Issues: https://github.com/azu/monorepo-utils/issues
- npm.io page: https://npm.io/package/@monorepo-utils/package-utils

## Dependencies (4)

- [yaml](https://npm.io/package/yaml.md) ^2.1.3
- [upath](https://npm.io/package/upath.md) ^2.0.1
- [globby](https://npm.io/package/globby.md) ^11.0.1
- [load-json-file](https://npm.io/package/load-json-file.md) ^6.2.0

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 2.11.0 (latest) — 2025-05-12
- 2.10.4 — 2023-11-09
- 2.10.3 — 2023-11-09
- 2.10.2 — 2023-07-07
- 2.9.0 — 2022-12-02
- 2.8.1 — 2022-05-16
- 2.8.0 — 2022-05-16
- 2.7.0 — 2021-10-20
- 2.4.4 — 2021-01-15
- 2.2.1 — 2020-10-22
- 2.2.0 — 2020-08-30
- 2.1.0 — 2020-04-28
- 2.0.3 — 2019-01-22
- 2.0.2 — 2019-01-22
- 2.0.1 — 2018-08-07
- … 2 more at https://npm.io/package/@monorepo-utils/package-utils/versions

## README

# @monorepo-utils/package-utils

Package utility for monorepo.

## Install

Install with [npm](https://www.npmjs.com/):

    npm install @monorepo-utils/package-utils

## Usage

### `getPackages(rootDirectory: string): PackageResult[]`

```ts
export interface PackageResult {
    // path to package's directory
    location: string;
    // package.json content
    packageJSON: any;
}
export declare const getPackages: (rootDirectory: string) => PackageResult[];
```

## Changelog

See [Releases page](https://github.com/azu/monorepo-utils/releases).

## Running tests

    yarn test

## Contributing

Pull requests and stars are always welcome.

For bugs and feature requests, [please create an issue](https://github.com/azu/monorepo-utils/issues).

1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## Author

- [github/azu](https://github.com/azu)
- [twitter/azu_re](https://twitter.com/azu_re)

## License

MIT © azu

Thanks to [azz/get-monorepo-packages: Get a list of packages from a monorepo](https://github.com/azz/get-monorepo-packages)

---
_Source: https://npm.io/package/@monorepo-utils/package-utils · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
