{"_id":"root-pkg-dir","name":"root-pkg-dir","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"root-pkg-dir","version":"1.0.0","description":"Find the highest directory with a package.json, starting from from the current working directory.","license":"MIT","private":false,"author":{"name":"Connor White","email":"hello@connorwhite.dev","url":"https://connorwhite.dev"},"contributors":[],"homepage":"https://github.com/bconnorwhite/root-pkg-dir#readme","repository":{"type":"git","url":"git+https://github.com/bconnorwhite/root-pkg-dir.git"},"bugs":{"url":"https://github.com/bconnorwhite/root-pkg-dir/issues"},"keywords":["root","pkg","dir","directory","package","json","package.json","ancestor","parent","top","workspace","monorepo","find"],"type":"module","main":".auto/build/index.js","exports":"./.auto/build/index.js","types":".auto/build/index.d.ts","engines":{"node":"^14.13.1 || >=16.0.0"},"scripts":{"build":"auto build","prepack":"auto build","release":"auto release"},"dependencies":{"root-pkg-json":"^1.0.2"},"devDependencies":{"autorepo":"^0.1.10"},"gitHead":"cc3173cd53ebed0d080216cfda6a9fa98b32dcf6","_id":"root-pkg-dir@1.0.0","_nodeVersion":"20.3.1","_npmVersion":"9.6.7","dist":{"integrity":"sha512-aZHO84EEjhfxffJF0PTcMU0aeVx4fFwptlzwzLIChLt7Wt41coK/+5utPWnivqdAxu0wg4wMKE9eiC5vR+trMA==","shasum":"e2a041aeca2966ce4587859581a5067490bba163","tarball":"https://registry.npmjs.org/root-pkg-dir/-/root-pkg-dir-1.0.0.tgz","fileCount":4,"unpackedSize":4145,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICrP6aAuJTlIOURrZ8B+2ZGGD7sOmJ8Uqrpcp6HxNpasAiBdRAs0P6QMA2Ov2461Ho5i6PVU0e7sm1B1oLraZIP5zw=="}]},"_npmUser":{"name":"bconnorwhite","email":"connor.bcw@gmail.com"},"directories":{},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/root-pkg-dir_1.0.0_1690240195920_0.9939040829471333"},"_hasShrinkwrap":false}},"time":{"created":"2023-07-24T23:09:55.920Z","1.0.0":"2023-07-24T23:09:56.093Z","modified":"2023-07-24T23:09:56.362Z"},"maintainers":[{"name":"bconnorwhite","email":"connor.bcw@gmail.com"}],"description":"Find the highest directory with a package.json, starting from from the current working directory.","homepage":"https://github.com/bconnorwhite/root-pkg-dir#readme","keywords":["root","pkg","dir","directory","package","json","package.json","ancestor","parent","top","workspace","monorepo","find"],"repository":{"type":"git","url":"git+https://github.com/bconnorwhite/root-pkg-dir.git"},"contributors":[],"author":{"name":"Connor White","email":"hello@connorwhite.dev","url":"https://connorwhite.dev"},"bugs":{"url":"https://github.com/bconnorwhite/root-pkg-dir/issues"},"license":"MIT","readme":"<!--BEGIN HEADER-->\n<div id=\"top\" align=\"center\">\n  <h1>root-pkg-dir</h1>\n  <a href=\"https://npmjs.com/package/root-pkg-dir\">\n    <img alt=\"NPM\" src=\"https://img.shields.io/npm/v/root-pkg-dir.svg\">\n  </a>\n  <a href=\"https://github.com/bconnorwhite/root-pkg-dir\">\n    <img alt=\"TypeScript\" src=\"https://img.shields.io/github/languages/top/bconnorwhite/root-pkg-dir.svg\">\n  </a>\n</div>\n\n<br />\n\n<blockquote align=\"center\">Find the highest directory with a package.json, starting from from the current working directory.</blockquote>\n\n<br />\n\n_If I should maintain this repo, please ⭐️_\n<a href=\"https://github.com/bconnorwhite/root-pkg-dir\">\n  <img align=\"right\" alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/bconnorwhite/root-pkg-dir?label=%E2%AD%90%EF%B8%8F&style=social\">\n</a>\n\n_DM me on [Twitter](https://twitter.com/bconnorwhite) if you have questions or suggestions._\n<a href=\"https://twitter.com/bconnorwhite\">\n  <img align=\"right\" alt=\"Twitter\" src=\"https://img.shields.io/twitter/url?label=%40bconnorwhite&style=social&url=https%3A%2F%2Ftwitter.com%2Fbconnorwhite\">\n</a>\n\n---\n<!--END HEADER-->\n\n## Installation\n\n```sh\nnpm install root-pkg-dir\n```\n\n```sh\nyarn add root-pkg-dir\n```\n\n```sh\npnpm add root-pkg-dir\n```\n\n```sh\nbun add root-pkg-dir\n```\n\n## Usage\n```ts\nimport { rootPkgDir } from \"root-pkg-dir\";\n\n// Returns an absolute path to the directory of the root package.json\nconst rootDir = await rootPkgDir(); // string | undefined\n```\n\n### Options\n```ts\ntype Options {\n  /**\n   * The directory to start searching from.\n   * \n   * @default process.cwd()\n   */\n  readonly cwd?: URL | string;\n};\n```\n\n<!--BEGIN FOOTER-->\n\n<br />\n\n<h2 id=\"dependencies\">Dependencies<a href=\"https://www.npmjs.com/package/root-pkg-dir?activeTab=dependencies\"><img align=\"right\" alt=\"dependencies\" src=\"https://img.shields.io/librariesio/release/npm/root-pkg-dir.svg\"></a></h2>\n\n- [root-pkg-json](https://www.npmjs.com/package/root-pkg-json): Find the highest package.json, starting from from the current working directory.\n\n<br />\n\n<h3>Dev Dependencies</h3>\n\n- [autorepo](https://www.npmjs.com/package/autorepo): Autorepo abstracts away your dev dependencies, providing a single command to run all of your scripts.\n\n<br />\n\n<h2 id=\"license\">License <a href=\"https://opensource.org/licenses/MIT\"><img align=\"right\" alt=\"license\" src=\"https://img.shields.io/npm/l/root-pkg-dir.svg\"></a></h2>\n\n[MIT](https://opensource.org/licenses/MIT)\n<!--END FOOTER-->\n","readmeFilename":"README.md"}