{"_id":"pkg-up","_rev":"3048612","name":"pkg-up","description":"Find the closest package.json file","dist-tags":{"latest":"5.0.0"},"maintainers":[{"name":"sindresorhus","email":""}],"time":{"modified":"2023-11-27T03:20:45.000Z","created":"2015-09-21T10:17:20.550Z","5.0.0":"2023-11-04T09:15:40.635Z","4.0.0":"2021-11-04T14:08:14.404Z","3.1.0":"2019-04-15T04:03:00.078Z","3.0.1":"2019-03-23T08:20:34.257Z","3.0.0":"2019-03-21T15:05:06.794Z","2.0.0":"2017-05-04T15:24:27.726Z","1.0.0":"2015-09-21T10:17:20.550Z"},"users":{"huhgawz":true,"alexreg90":true,"alexreg":true,"mysticatea":true,"drewigg":true,"dwqs":true,"arcticicestudio":true},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-up.git"},"versions":{"5.0.0":{"name":"pkg-up","version":"5.0.0","description":"Find the closest package.json file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-up.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"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":"^6.2.0"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.18.0","xo":"^0.46.4"},"types":"./index.d.ts","gitHead":"78730d5a721fefbc45c8b4d65bb6679a4fbdcbbb","bugs":{"url":"https://github.com/sindresorhus/pkg-up/issues"},"homepage":"https://github.com/sindresorhus/pkg-up#readme","_id":"pkg-up@5.0.0","_nodeVersion":"18.18.2","_npmVersion":"9.2.0","dist":{"shasum":"43fed23f28a60f669d6ebf5ed408187478733b53","size":1939,"noattachment":false,"key":"/pkg-up/-/pkg-up-5.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-up/download/pkg-up-5.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-up_5.0.0_1699089340372_0.29585655048766446"},"_hasShrinkwrap":false,"deprecated":"Renamed to package-up","_cnpmcore_publish_time":"2023-11-04T09:15:40.635Z","publish_time":1699089340635,"_source_registry_name":"default","_cnpm_publish_time":1699089340635},"4.0.0":{"name":"pkg-up","version":"4.0.0","description":"Find the closest package.json file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-up.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":"./index.js","engines":{"node":"^12.20.0 || ^14.13.1 || >=16.0.0"},"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":"^6.2.0"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.18.0","xo":"^0.46.4"},"types":"./index.d.ts","gitHead":"78730d5a721fefbc45c8b4d65bb6679a4fbdcbbb","bugs":{"url":"https://github.com/sindresorhus/pkg-up/issues"},"homepage":"https://github.com/sindresorhus/pkg-up#readme","_id":"pkg-up@4.0.0","_nodeVersion":"12.22.1","_npmVersion":"8.1.0","dist":{"shasum":"b2ca5e845979e31497d81520b621f4cdac2dcd75","size":1939,"noattachment":false,"key":"/pkg-up/-/pkg-up-4.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-up/download/pkg-up-4.0.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-up_4.0.0_1636034894298_0.37791111314856773"},"_hasShrinkwrap":false,"publish_time":1636034894404,"_cnpm_publish_time":1636034894404},"3.1.0":{"name":"pkg-up","version":"3.1.0","description":"Find the closest package.json file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-up.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava && tsd"},"keywords":["pkg","package","file","find","up","find-up","findup","look-up","look","search","match","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"find-up":"^3.0.0"},"devDependencies":{"ava":"^1.4.1","tsd":"^0.7.2","xo":"^0.24.0"},"gitHead":"9166b423d53ffef572eedf7b62926dcc199df0ae","bugs":{"url":"https://github.com/sindresorhus/pkg-up/issues"},"homepage":"https://github.com/sindresorhus/pkg-up#readme","_id":"pkg-up@3.1.0","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"100ec235cc150e4fd42519412596a28512a0def5","size":2022,"noattachment":false,"key":"/pkg-up/-/pkg-up-3.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-up/download/pkg-up-3.1.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-up_3.1.0_1555300979957_0.7882048060432563"},"_hasShrinkwrap":false,"publish_time":1555300980078,"_cnpm_publish_time":1555300980078},"3.0.1":{"name":"pkg-up","version":"3.0.1","description":"Find the closest package.json file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-up.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava"},"keywords":["pkg","package","file","find","up","find-up","findup","look-up","look","search","match","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"find-up":"^3.0.0"},"devDependencies":{"ava":"^1.3.1","xo":"^0.24.0"},"gitHead":"4396ac2868d99c880e459a5e875c8afbdd60e8ff","bugs":{"url":"https://github.com/sindresorhus/pkg-up/issues"},"homepage":"https://github.com/sindresorhus/pkg-up#readme","_id":"pkg-up@3.0.1","_nodeVersion":"8.15.0","_npmVersion":"6.9.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"91ea5597c5585fe438d32689ac8943f1b5f17900","size":1746,"noattachment":false,"key":"/pkg-up/-/pkg-up-3.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-up/download/pkg-up-3.0.1.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-up_3.0.1_1553329234141_0.7432386458725204"},"_hasShrinkwrap":false,"publish_time":1553329234257,"_cnpm_publish_time":1553329234257},"3.0.0":{"name":"pkg-up","version":"3.0.0","description":"Find the closest package.json file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-up.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=8"},"scripts":{"test":"xo && ava"},"keywords":["pkg","package","file","find","up","find-up","findup","look-up","look","search","match","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"find-up":"^3.0.0"},"devDependencies":{"ava":"^1.3.1","xo":"^0.24.0"},"gitHead":"f62a81e287243cf4d0ba47049ccdc68467820e65","bugs":{"url":"https://github.com/sindresorhus/pkg-up/issues"},"homepage":"https://github.com/sindresorhus/pkg-up#readme","_id":"pkg-up@3.0.0","_npmVersion":"6.4.1","_nodeVersion":"10.15.1","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"c0caa5c1066ffbd7a1f70ef6a70fe2a6ee6fe009","size":1743,"noattachment":false,"key":"/pkg-up/-/pkg-up-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-up/download/pkg-up-3.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pkg-up_3.0.0_1553180706636_0.4423074213091289"},"_hasShrinkwrap":false,"publish_time":1553180706794,"_cnpm_publish_time":1553180706794},"2.0.0":{"name":"pkg-up","version":"2.0.0","description":"Find the closest package.json file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-up.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=4"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["pkg","package","file","find","up","find-up","findup","look-up","look","search","match","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"find-up":"^2.1.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"a3d7ab574308dc311118d360f178f833bb2b693c","bugs":{"url":"https://github.com/sindresorhus/pkg-up/issues"},"homepage":"https://github.com/sindresorhus/pkg-up#readme","_id":"pkg-up@2.0.0","_shasum":"c819ac728059a461cab1c3889a2be3c49a004d7f","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.7.3","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"c819ac728059a461cab1c3889a2be3c49a004d7f","size":1761,"noattachment":false,"key":"/pkg-up/-/pkg-up-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-up/download/pkg-up-2.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/pkg-up-2.0.0.tgz_1493911467499_0.2755624745041132"},"directories":{},"publish_time":1493911467726,"_hasShrinkwrap":false,"_cnpm_publish_time":1493911467726},"1.0.0":{"name":"pkg-up","version":"1.0.0","description":"Find the closest package.json file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/pkg-up.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"sindresorhus.com"},"engines":{"node":">=0.10.0"},"scripts":{"test":"xo && ava"},"files":["index.js"],"keywords":["pkg","package","file","find","up","find-up","findup","look-up","look","file","search","match","package","resolve","parent","parents","folder","directory","dir","walk","walking","path"],"dependencies":{"find-up":"^1.0.0"},"devDependencies":{"ava":"*","xo":"*"},"gitHead":"fdbaf6200f31e1e4878c4fc8298966804554cfc4","bugs":{"url":"https://github.com/sindresorhus/pkg-up/issues"},"homepage":"https://github.com/sindresorhus/pkg-up#readme","_id":"pkg-up@1.0.0","_shasum":"3e08fb461525c4421624a33b9f7e6d0af5b05a26","_from":".","_npmVersion":"2.14.3","_nodeVersion":"4.1.0","_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"dist":{"shasum":"3e08fb461525c4421624a33b9f7e6d0af5b05a26","size":1762,"noattachment":false,"key":"/pkg-up/-/pkg-up-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/pkg-up/download/pkg-up-1.0.0.tgz"},"maintainers":[{"name":"sindresorhus","email":""}],"directories":{},"publish_time":1442830640550,"_cnpm_publish_time":1442830640550,"_hasShrinkwrap":false}},"readme":"# pkg-up\n\n> Find the closest package.json file\n\n## Install\n\n```sh\nnpm install pkg-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 {pkgUp} from 'pkg-up';\n\nconsole.log(await pkgUp());\n//=> '/Users/sindresorhus/foo/package.json'\n```\n\n## API\n\n### pkgUp(options?)\n\nReturns a `Promise<string>` for the file path, or `Promise<undefined>` if it could not be found.\n\n### pkgUpSync(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","_attachments":{},"homepage":"https://github.com/sindresorhus/pkg-up#readme","bugs":{"url":"https://github.com/sindresorhus/pkg-up/issues"},"license":"MIT"}