{"name":"@manypkg/get-packages","version":"3.1.0","license":"MIT","_id":"@manypkg/get-packages@3.1.0","maintainers":[{"name":"manypkg-release-bot","email":"automation+manypkg@thinkmill.com.au"},{"name":"emmatown","email":"npm@emmas.town"}],"homepage":"https://github.com/Thinkmill/manypkg#readme","bugs":{"url":"https://github.com/Thinkmill/manypkg/issues"},"dist":{"shasum":"c97510b6386cab9c4a59e4a7fc2757753ef18865","tarball":"http://registry-npm.ywwl.com/@manypkg/get-packages/download/@manypkg/get-packages-3.1.0.tgz","fileCount":8,"integrity":"sha512-0TbBVyvPrP7xGYBI/cP8UP+yl/z+HtbTttAD7FMAJgn/kXOTwh5/60TsqP9ZYY710forNfyV0N8P/IE/ujGZJg==","signatures":[{"sig":"MEUCICGtO/3VlkJGyn8kBRncLktfIcDrKL/42nJVfTQ/1AbaAiEAvbBfmoQIjRNXk+bWBYW3d54vLWlJ2kGMvSHqz8pI6Io=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":24309,"size":5560,"noattachment":false,"key":"/@manypkg/get-packages/-/@manypkg/get-packages-3.1.0.tgz"},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/manypkg-get-packages.js","./package.json":"./package.json"},"gitHead":"fc5d5e0be9496841f4e528532697e741c86a5ed5","_npmUser":{"name":"manypkg-release-bot","email":"automation+manypkg@thinkmill.com.au"},"repository":{"url":"git+https://github.com/Thinkmill/manypkg.git","type":"git","directory":"packages/get-packages"},"_npmVersion":"10.9.2","description":"> A simple utility to get the packages from a monorepo, whether they're using Yarn, npm, Lerna, pnpm, Bun or Rush","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@manypkg/tools":"^2.1.0","@manypkg/find-root":"^3.1.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.1.2","fixturez":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/get-packages_3.1.0_1753415316109_0.8275699853711935","host":"s3://npm-registry-packages-npm-production"},"readme":"# @manypkg/get-packages\n\n> A simple utility to get the packages from a monorepo, whether they're using Yarn, npm, Lerna, pnpm, Bun or Rush\n\nThis library exports `getPackages` and `getPackagesSync`. It is intended mostly for use of developers building tools that want to support different kinds of monorepos as an easy way to write tools without having to write tool-specific code. It supports Yarn, npm, Lerna, pnpm, Bun, Rush and single-package repos(where the only package is the the same as the root package). This library uses `@manypkg/find-root` to search up from the directory that's passed to `getPackages` or `getPackagesSync` to find the project root.\n\n```typescript\nimport { getPackages, getPackagesSync } from \"@manypkg/get-packages\";\n\nconst { tool, packages, rootPackage, rootDir } = await getPackages(\n  process.cwd()\n);\nconst { tool, packages, rootPackage, rootDir } = getPackagesSync(process.cwd());\n\n// From @manypkg/tools\n\ninterface Tool {\n  readonly type: string;\n  isMonorepoRoot(directory: string): Promise<boolean>;\n  isMonorepoRootSync(directory: string): boolean;\n  getPackages(directory: string): Promise<Packages>;\n  getPackagesSync(directory: string): Packages;\n}\n\ninterface Package {\n  packageJson: PackageJSON;\n  dir: string;\n  relativeDir: string;\n}\n\ninterface Packages {\n  tool: Tool;\n  packages: Package[];\n  rootPackage?: Package;\n  rootDir: string;\n}\n```\n","publish_time":1753415316328,"_cnpm_publish_time":1753415316328,"dist-tags":{"latest":"3.1.0"}}