{"_id":"@cjser/read-pkg__v6_0_0","name":"@cjser/read-pkg__v6_0_0","dist-tags":{"latest":"6.0.0-cjser.2"},"versions":{"6.0.0-cjser.2":{"name":"@cjser/read-pkg__v6_0_0","version":"6.0.0-cjser.2","description":"Read a package.json file","license":"MIT","repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"funding":"https://github.com/sponsors/sindresorhus","author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"type":"module","exports":{"require":"./dist-cjser/index.cjs","default":"./index.js"},"engines":{"node":">=12"},"scripts":{"test":"xo && ava && tsd"},"keywords":["json","read","parse","file","fs","graceful","load","package","normalize"],"dependencies":{"@types/normalize-package-data":"^2.4.0","normalize-package-data":"^3.0.2","parse-json":"^5.2.0","type-fest":"^1.0.1"},"devDependencies":{"ava":"^3.15.0","tsd":"^0.14.0","xo":"^0.38.2"},"xo":{"ignores":["test/test.js"]},"main":"./dist-cjser/index.cjs","cjser":{"sourceVersion":"6.0.0","cjserVersion":2,"original":{"name":"read-pkg","version":"6.0.0","exports":"./index.js","repository":"sindresorhus/read-pkg","dependencies":{"@types/normalize-package-data":"^2.4.0","normalize-package-data":"^3.0.2","parse-json":"^5.2.0","type-fest":"^1.0.1"},"files":["index.js","index.d.ts"],"scripts":{"test":"xo && ava && tsd"}}},"_id":"@cjser/read-pkg__v6_0_0@6.0.0-cjser.2","gitHead":"a4bef54d7d22d3d9a6b84528457938d84cd65fe7","_nodeVersion":"20.14.0","_npmVersion":"10.7.0","dist":{"integrity":"sha512-VMNkpFwNe6+V83zWpaL3TcelPyatAfjOdJ95PYWMIW2+7O0tgTdV7wm6eYfvybUH3Grc6JCRLKLuaLkY5CrXYg==","shasum":"ee7a24b844d604a3a8aa6a08c8b1d28cb8017ba9","tarball":"https://registry.npmjs.org/@cjser/read-pkg__v6_0_0/-/read-pkg__v6_0_0-6.0.0-cjser.2.tgz","fileCount":6,"unpackedSize":9623,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDvkSEukwnnbISs7R+ny9Drwo5icMOiGUhDvcOPzyZ/kAIhALW0MH1Y2Bi0ajM3oUa28CfbZXrI2eP7useHUHrR9C4u"}]},"_npmUser":{"name":"nanahira","email":"nanahira@momobako.com"},"directories":{},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/read-pkg__v6_0_0_6.0.0-cjser.2_1778159771828_0.6995993069141517"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-07T13:16:11.749Z","6.0.0-cjser.2":"2026-05-07T13:16:11.964Z","modified":"2026-05-07T13:16:12.145Z"},"maintainers":[{"name":"nanahira","email":"nanahira@momobako.com"}],"description":"Read a package.json file","keywords":["json","read","parse","file","fs","graceful","load","package","normalize"],"repository":{"type":"git","url":"https://code.moenext.com/3rdeye/cjser.git"},"author":{"name":"Sindre Sorhus","email":"sindresorhus@gmail.com","url":"https://sindresorhus.com"},"license":"MIT","readme":"# read-pkg\n\n> Read a package.json file\n\n## Why\n\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```\n$ npm install read-pkg\n```\n\n## Usage\n\n```js\nimport {readPackageAsync} from 'read-pkg';\n\nconsole.log(await readPkg());\n//=> {name: 'read-pkg', …}\n\nconsole.log(await readPkg({cwd: 'some-other-directory'}));\n//=> {name: 'unicorn', …}\n```\n\n## API\n\n### readPackageAsync(options?)\n\nReturns a `Promise<object>` with the parsed JSON.\n\n### readPackageSync(options?)\n\nReturns the parsed JSON.\n\n#### options\n\nType: `object`\n\n##### cwd\n\nType: `string`\\\nDefault: `process.cwd()`\n\nCurrent working directory.\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-up](https://github.com/sindresorhus/read-pkg-up) - Read the closest package.json file\n- [write-pkg](https://github.com/sindresorhus/write-pkg) - Write a `package.json` file\n- [load-json-file](https://github.com/sindresorhus/load-json-file) - Read and parse a JSON file\n\n---\n\n<div align=\"center\">\n\t<b>\n\t\t<a href=\"https://tidelift.com/subscription/pkg/npm-read-pkg?utm_source=npm-read-pkg&utm_medium=referral&utm_campaign=readme\">Get professional support for this package with a Tidelift subscription</a>\n\t</b>\n\t<br>\n\t<sub>\n\t\tTidelift helps make open source sustainable for maintainers while giving companies<br>assurances about security, maintenance, and licensing for their dependencies.\n\t</sub>\n</div>\n\n## cjser\n\nThis package is a CommonJS-compatible build generated by cjser for projects that still need `require()` support. The source version matches the original npm package version, with a cjser prerelease suffix for this generated build.\nOriginal repository: https://github.com/sindresorhus/read-pkg\n","readmeFilename":"readme.md","_rev":"1-ce3dd2fcf6a3942f3332c1baa47bf524"}