# @pnpm/fs.find-packages

> Find all packages inside a directory

Latest version **1000.0.24** (published 2026-03-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @pnpm/fs.find-packages
pnpm add @pnpm/fs.find-packages
yarn add @pnpm/fs.find-packages
bun add @pnpm/fs.find-packages
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; high maintenance score; high quality score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 1000.0.24 |
| Published | 2026-03-24 |
| First published | 2022-12-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.12 |
| Dependencies | 5 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 36489 |
| Maintainers | pnpmuser, zkochan |
| Keywords | pnpm, pnpm10, find, package |

## Links

- npm: https://www.npmjs.com/package/@pnpm/fs.find-packages
- Repository: https://github.com/pnpm/pnpm.git#main
- Homepage: https://github.com/pnpm/pnpm/tree/main/fs/find-packages#readme
- Issues: https://github.com/pnpm/pnpm/issues
- Funding: https://opencollective.com/pnpm
- npm.io page: https://npm.io/package/@pnpm/fs.find-packages

## Dependencies (5)

- [p-filter](https://npm.io/package/p-filter.md) ^2.1.0
- [tinyglobby](https://npm.io/package/tinyglobby.md) ^0.2.15
- [@pnpm/types](https://npm.io/package/@pnpm/types.md) 1001.3.0
- [@pnpm/util.lex-comparator](https://npm.io/package/@pnpm/util.lex-comparator.md) ^3.0.2
- [@pnpm/read-project-manifest](https://npm.io/package/@pnpm/read-project-manifest.md) 1001.2.6

## Recent versions

- 1000.0.24 (latest) — 2026-03-24
- 1000.0.25 (latest-10) — 2026-06-10
- 0.0.0-20230605-20230605142810 (dev) — 2023-06-05
- 1000.0.23 — 2026-02-17
- 1000.0.22 — 2026-01-19
- 1000.0.21 — 2025-12-15
- 1000.0.20 — 2025-12-08
- 1000.0.19 — 2025-11-20
- 1000.0.18 — 2025-11-09
- 1000.0.17 — 2025-10-21
- 1000.0.16 — 2025-09-29
- 1000.0.15 — 2025-09-13
- 1000.0.14 — 2025-09-12
- 1000.0.13 — 2025-07-31
- 1000.0.12 — 2025-07-23
- … 41 more at https://npm.io/package/@pnpm/fs.find-packages/versions

## README

# @pnpm/fs.find-packages

> Find all packages inside a directory

<!--@shields('npm')-->
[![npm version](https://img.shields.io/npm/v/@pnpm/fs.find-packages.svg)](https://www.npmjs.com/package/@pnpm/fs.find-packages)
<!--/@-->

## Installation

```sh
pnpm add @pnpm/fs.find-packages
```

## Usage

```js
const path = require('path')
const findPkgs = require('@pnpm/fs.find-packages')

findPkgs(path.join(__dirname, 'test', 'fixture'))
  .then(pkgs => console.log(pkgs))
  .catch(err => console.error(err))
  //> [ { path: '/home/zkochan/src/find-packages/test/fixture/pkg',
  //      manifest: { name: 'foo', version: '1.0.0' },
  //      writeProjectManifest: [AsyncFunction] } ]
```

## API

### `findPackages(dir, [opts])`

#### `dir`

The directory in which to search for packages.

#### `opts`

Parameters normally passed to [glob](https://www.npmjs.com/package/glob)

#### `opts.patterns`

Array of globs to use as package locations. For example: `['packages/**', 'utils/**']`.

#### `opts.ignore`

Patterns to ignore when searching for packages. By default: `**/node_modules/**`, `**/bower_components/**`, `**/test/**`, `**/tests/**`.

## License

MIT © [Zoltan Kochan](https://www.kochan.io)

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