{"name":"read-pkg-up","version":"10.1.0","description":"Read the closest package.json file","license":"MIT","repository":{"type":"git","url":"git+https://github.com/sindresorhus/read-pkg-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":">=16"},"scripts":{"test":"xo && ava && tsd"},"keywords":["json","read","parse","file","fs","graceful","load","package","find","up","find-up","findup","look-up","look","search","match","resolve","parent","parents","folder","directory","walk","walking","path"],"dependencies":{"find-up":"^6.3.0","read-pkg":"^8.1.0","type-fest":"^4.2.0"},"devDependencies":{"ava":"^5.3.1","tsd":"^0.28.1","xo":"^0.56.0"},"xo":{"rules":{"@typescript-eslint/no-redundant-type-constituents":"off"}},"types":"./index.d.ts","gitHead":"ec9827e8d217d6676c78868ebb840ee787dd472c","bugs":{"url":"https://github.com/sindresorhus/read-pkg-up/issues"},"homepage":"https://github.com/sindresorhus/read-pkg-up#readme","_id":"read-pkg-up@10.1.0","_nodeVersion":"16.20.0","_npmVersion":"9.2.0","dist":{"integrity":"sha512-aNtBq4jR8NawpKJQldrQcSW9y/d+KWH4v24HWkHljOZ7H0av+YTGANBzRh9A5pw7v/bLVsLVPpOhJ7gHNVy8lA==","shasum":"2d13ab732d2f05d6e8094167c2112e2ee50644f4","tarball":"http://registry-npm.ywwl.com/read-pkg-up/download/read-pkg-up-10.1.0.tgz","fileCount":5,"unpackedSize":6218,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIE2OqNAPnbJVPYzbniKM0WMQZiL2N6jK88EKWtqFUuYbAiABGP6dwpePj9Tb3PnoUBPo/EOoMlNgHRafao74QXjaqw=="}],"size":2369,"noattachment":false,"key":"/read-pkg-up/-/read-pkg-up-10.1.0.tgz"},"_npmUser":{"name":"sindresorhus","email":"sindresorhus@gmail.com"},"directories":{},"maintainers":[{"name":"sindresorhus","email":"sindresorhus@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/read-pkg-up_10.1.0_1692747484128_0.7795501727389758"},"_hasShrinkwrap":false,"readme":"# read-pkg-up\n\n> Read the closest package.json file\n\n## Why\n\n- [Finds the closest package.json](https://github.com/sindresorhus/find-up)\n- [Throws more helpful JSON errors](https://github.com/sindresorhus/parse-json)\n- [Normalizes the data](https://github.com/npm/normalize-package-data#what-normalization-currently-entails)\n\n## Install\n\n```sh\nnpm install read-pkg-up\n```\n\n## Usage\n\n```js\nimport {readPackageUp} from 'read-pkg-up';\n\nconsole.log(await readPackageUp());\n/*\n{\n\tpackageJson: {\n\t\tname: 'awesome-package',\n\t\tversion: '1.0.0',\n\t\t…\n\t},\n\tpath: '/Users/sindresorhus/dev/awesome-package/package.json'\n}\n*/\n```\n\n## API\n\n### readPackageUp(options?)\n\nReturns a `Promise<object>`, or `Promise<undefined>` if no `package.json` was found.\n\n### readPackageUpSync(options?)\n\nReturns the result object, or `undefined` if no `package.json` was found.\n\n#### options\n\nType: `object`\n\n##### cwd\n\nType: `URL | string`\\\nDefault: `process.cwd()`\n\nThe directory to start looking for a package.json file.\n\n##### normalize\n\nType: `boolean`\\\nDefault: `true`\n\n[Normalize](https://github.com/npm/normalize-package-data#what-normalization-currently-entails) the package data.\n\n## Related\n\n- [read-pkg](https://github.com/sindresorhus/read-pkg) - Read a package.json file\n- [pkg-up](https://github.com/sindresorhus/pkg-up) - Find the closest package.json file\n- [find-up](https://github.com/sindresorhus/find-up) - Find a file by walking up parent directories\n- [pkg-conf](https://github.com/sindresorhus/pkg-conf) - Get namespaced config from the closest package.json\n","publish_time":1692747484315,"_cnpm_publish_time":1692747484315,"dist-tags":{"latest":"11.0.0"}}