# pnpm-list

> List installed packages in a symlinked `node_modules`

Latest version **5.0.5** (published 2019-02-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install pnpm-list
pnpm add pnpm-list
yarn add pnpm-list
bun add pnpm-list
```

## Health

**Score 45/100 (D)** — status: abandoned.

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

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 5.0.5 |
| Published | 2019-02-03 |
| First published | 2017-07-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=6 |
| Dependencies | 11 |
| Unpacked size | 21.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 36525 |
| Author | Zoltan Kochan |
| Maintainers | zkochan |
| Keywords | pnpm, list, ls |

## Links

- npm: https://www.npmjs.com/package/pnpm-list
- Repository: https://github.com/pnpm/pnpm/blob/master/packages/list
- Homepage: https://github.com/pnpm/pnpm/blob/master/packages/list#readme
- Issues: https://github.com/pnpm/pnpm/issues
- npm.io page: https://npm.io/package/pnpm-list

## Dependencies (11)

- [archy](https://npm.io/package/archy.md) 1.0.0
- [chalk](https://npm.io/package/chalk.md) 2.4.2
- [ramda](https://npm.io/package/ramda.md) 0.26.1
- [p-limit](https://npm.io/package/p-limit.md) 2.1.0
- [@pnpm/types](https://npm.io/package/@pnpm/types.md) 2.0.0
- [@types/node](https://npm.io/package/@types/node.md) 10.12.18
- [@types/archy](https://npm.io/package/@types/archy.md) 0.0.31
- [@types/ramda](https://npm.io/package/@types/ramda.md) 0.25.39
- [dependencies-hierarchy](https://npm.io/package/dependencies-hierarchy.md) 4.0.6
- [@pnpm/read-package-json](https://npm.io/package/@pnpm/read-package-json.md) 1.1.1
- [@zkochan/npm-package-arg](https://npm.io/package/@zkochan/npm-package-arg.md) 1.0.1

## Recent versions

- 5.0.5 (latest) — 2019-02-03
- 6.0.0-3 (next-major) — 2019-03-04
- 6.0.0-2 (next) — 2019-02-03
- 6.0.0-1 — 2019-01-30
- 6.0.0-0 — 2019-01-24
- 5.0.4 — 2019-01-05
- 5.0.3 — 2019-01-05
- 5.0.2 — 2018-12-27
- 5.0.1 — 2018-12-09
- 5.0.0 — 2018-12-03
- 4.2.2 — 2018-11-28
- 4.2.1 — 2018-11-25
- 4.2.0 — 2018-11-18
- 4.1.6 — 2018-11-15
- 4.1.5 — 2018-11-12
- … 17 more at https://npm.io/package/pnpm-list/versions

## README

# pnpm-list

> List installed packages in a symlinked \`node_modules\`

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

## Install

Install it via npm.

    npm install pnpm-list

## Usage

<!--@example('./example/index.js')-->
```js
'use strict'
const pnpmList = require('pnpm-list').default

pnpmList(__dirname, {depth: 2})
  .then(output => {
    console.log(output)
    //> pnpm-list@0.0.1 /home/zkochan/src/pnpm/pnpm-list/example
    //  └─┬ write-pkg@3.1.0
    //    ├─┬ sort-keys@2.0.0
    //    │ └── is-plain-obj@1.1.0
    //    └─┬ write-json-file@2.2.0
    //      ├── detect-indent@5.0.0
    //      ├── graceful-fs@4.1.11
    //      ├── make-dir@1.0.0
    //      ├── pify@2.3.0
    //      ├── sort-keys@1.1.2
    //      └── write-file-atomic@2.1.0
  })
```
<!--/@-->

## API

### default: `list(path, [opts]): Promise<string>`

Returns a string output similar to the `npm ls` but for [pnpm](github.com/pnpm/pnpm).

### Arguments

* `path` - *String* - path to the project
* `[opts.depth]` - *number* - `0` by default. Max display depth of the dependency tree.
* `[opts.only]` - *dev | prod* - `null` by default. Display only the dependency tree for packages in `devDependencies` or `dependencies`.
* `[opts.long]` - *Boolean* - `false` by default. If true, show extended information.
* `[opts.parseable]` - *Boolean* - `false` by default. Show parseable output instead of tree view.
* `[opts.alwaysPrintRootPackage]` - *Boolean* - `true` by default. Print the root package even if no dependencies found/matched.

### `forPackages(packages, path, [opts]): Promise<string>`

Returns a string output similar to the `npm ls [<@scope>/]<pkg> ...` but for [pnpm](github.com/pnpm/pnpm).

### Arguments

* `packages` - *String[]* - an array of `name@version-range` identifiers, which will limit the results to only the paths to the packages named.
* `path` - *String* - path to the project
* `[opts.depth]` - *number* - `0` by default. Max display depth of the dependency tree.
* `[opts.only]` - *dev | prod* - `null` by default. Display only the dependency tree for packages in `devDependencies` or `dependencies`.
* `[opts.long]` - *Boolean* - `false` by default. If true, show extended information.
* `[opts.parseable]` - *Boolean* - `false` by default. Show parseable output instead of tree view.
* `[opts.alwaysPrintRootPackage]` - *Boolean* - `true` by default. Print the root package even if no dependencies found/matched..

## License

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

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