Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pnpm/fs.find-packages

Package Overview
Dependencies
Maintainers
2
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pnpm/fs.find-packages

Find all packages inside a directory

  • 2.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
67K
increased by2.45%
Maintainers
2
Weekly downloads
 
Created
Source

@pnpm/fs.find-packages

Find all packages inside a directory

npm version

Installation

pnpm add @pnpm/fs.find-packages

Usage

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

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

Keywords

FAQs

Package last updated on 11 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc