pnpm-list
List installed packages in a symlinked `node_modules`
Last updated 7 years ago by zkochan .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install pnpm-list 
SYNC missed versions from official npm registry.

pnpm-list

List installed packages in a symlinked `node_modules`

npm version

Install

Install it via npm.

npm install pnpm-list

Usage

'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.

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.

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 © Zoltan Kochan

Current Tags

  • 5.0.5                                ...           latest (7 years ago)
  • 6.0.0-2                                ...           next (7 years ago)
  • 6.0.0-3                                ...           next-major (7 years ago)

32 Versions

  • 6.0.0-3                                ...           7 years ago
  • 6.0.0-2                                ...           7 years ago
  • 5.0.5                                ...           7 years ago
  • 6.0.0-1                                ...           7 years ago
  • 6.0.0-0                                ...           7 years ago
  • 5.0.4                                ...           7 years ago
  • 5.0.3                                ...           7 years ago
  • 5.0.2                                ...           7 years ago
  • 5.0.1                                ...           7 years ago
  • 5.0.0                                ...           7 years ago
  • 4.2.2                                ...           7 years ago
  • 4.2.1                                ...           7 years ago
  • 4.2.0                                ...           7 years ago
  • 4.1.6                                ...           7 years ago
  • 4.1.5                                ...           7 years ago
  • 4.1.4                                ...           7 years ago
  • 4.1.3                                ...           7 years ago
  • 4.1.2                                ...           7 years ago
  • 4.1.1                                ...           7 years ago
  • 4.1.0                                ...           7 years ago
  • 4.1.0-2                                ...           7 years ago
  • 4.1.0-1                                ...           7 years ago
  • 4.1.0-0                                ...           8 years ago
  • 4.0.1                                ...           8 years ago
  • 4.0.0                                ...           8 years ago
  • 3.0.0                                ...           8 years ago
  • 2.1.0                                ...           8 years ago
  • 2.0.1                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.0.0                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 0.0.0                                ...           9 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (11)
Dev Dependencies (12)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |