{"name":"@manypkg/get-packages","version":"3.0.0","license":"MIT","_id":"@manypkg/get-packages@3.0.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":"29fe81fc43147981bbadd720ad0790dba0b24d83","tarball":"http://registry-npm.ywwl.com/@manypkg/get-packages/download/@manypkg/get-packages-3.0.0.tgz","fileCount":8,"integrity":"sha512-C5TGJoG/MaVGt0HDij+RYQxVw/O/GDNJc4+qwv8g6wtbGEE8wawCcrQns8+qaNsZJybTTHYgdw7eD3wQhuxTng==","signatures":[{"sig":"MEUCIEco06SImqCw2/lw5Sy99gaYCgyaBaU5NUDjfswtOAe3AiEAu6G0mNSZx/tpW+kvyLIsJKRGfvVrZyRvTILi2PIdP5g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22518,"size":5405,"noattachment":false,"key":"/@manypkg/get-packages/-/@manypkg/get-packages-3.0.0.tgz"},"type":"module","engines":{"node":">=20.0.0"},"exports":{".":"./dist/manypkg-get-packages.js","./package.json":"./package.json"},"gitHead":"734a9a8c52243e4e10a851b8dedf1016977a3b5e","_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 or Rush","directories":{},"_nodeVersion":"22.14.0","dependencies":{"@manypkg/tools":"^2.0.0","@manypkg/find-root":"^3.0.0"},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.1.2","fixturez":"^1.1.0"},"_npmOperationalInternal":{"tmp":"tmp/get-packages_3.0.0_1746096014254_0.610822749667816","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":1746096014440,"_cnpm_publish_time":1746096014440,"dist-tags":{"latest":"3.1.0"}}