{"_id":"package-up","name":"package-up","dist-tags":{"latest":"5.0.0"},"versions":{"5.0.0":{"name":"package-up","version":"5.0.0","description":"Find the closest package.json file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/package-up.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"types":"./index.d.ts","default":"./index.js"},"engines":{"node":">=18"},"scripts":{"test":"xo && ava && tsd"},"keywords":["pkg","package","file","find","up","find-up","findup","look-up","look","search","match","resolve","parent","parents","folder","directory","walk","walking","path"],"dependencies":{"find-up-simple":"^1.0.0"},"devDependencies":{"ava":"^5.3.1","tsd":"^0.29.0","xo":"^0.56.0"},"types":"./index.d.ts","gitHead":"7153370dc0db356207c71032daceec6ce4387cf5","bugs":{"url":"https://github.com/sindresorhus/package-up/issues"},"homepage":"https://github.com/sindresorhus/package-up#readme","_id":"package-up@5.0.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"integrity":"sha512-MQEgDUvXCa3sGvqHg3pzHO8e9gqTCMPVrWUko3vPQGntwegmFo52mZb2abIVTjFnUcW0BcPz0D93jV5Cas1DWA==","shasum":"3facda2aa9248c0b68b3dddfa4c58d22aa3faea2","tarball":"https://registry.npmjs.org/package-up/-/package-up-5.0.0.tgz","fileCount":5,"unpackedSize":4669,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDSZZbGdwDudpMEbEf+6MDpT2wb2SFUb/uY0rOIZV3qDwIgH0yILGWjZOobHWjibxLVtu6iWCq2/4WV+WMWdkdRiY4="}]},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/package-up_5.0.0_1699089184911_0.6194924088882641"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-04T09:13:04.911Z","5.0.0":"2023-11-04T09:13:05.102Z","modified":"2023-11-04T09:13:05.400Z"},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"description":"Find the closest package.json file","homepage":"https://github.com/sindresorhus/package-up#readme","keywords":["pkg","package","file","find","up","find-up","findup","look-up","look","search","match","resolve","parent","parents","folder","directory","walk","walking","path"],"repository":{"type":"git","url":"git+https://github.com/sindresorhus/package-up.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"bugs":{"url":"https://github.com/sindresorhus/package-up/issues"},"license":"MIT","readme":"# package-up\n\n> Find the closest package.json file\n\n## Install\n\n```sh\nnpm install package-up\n```\n\n## Usage\n\n```\n/\n└── Users\n    └── sindresorhus\n        └── foo\n            ├── package.json\n            └── bar\n                ├── baz\n                └── example.js\n```\n\n```js\n// example.js\nimport {packageUp} from 'package-up';\n\nconsole.log(await packageUp());\n//=> '/Users/sindresorhus/foo/package.json'\n```\n\n## API\n\n### packageUp(options?)\n\nReturns a `Promise<string>` for the file path, or `Promise<undefined>` if it could not be found.\n\n### packageUpSync(options?)\n\nReturns the file path, or `undefined` if it could not be found.\n\n#### options\n\nType: `object`\n\n#### cwd\n\nType: `string`\\\nDefault: `process.cwd()`\n\nThe directory to start from.\n\n## Related\n\n- [read-pkg-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file\n- [pkg-dir](https://github.com/sindresorhus/pkg-dir) - Find the root directory of an npm package\n- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories\n","readmeFilename":"readme.md"}