{"name":"local-pkg","version":"0.4.3","packageManager":"pnpm@7.5.0","description":"Get information on local packages.","author":{"name":"Anthony Fu","email":"anthonyfu117@hotmail.com"},"license":"MIT","funding":"https://github.com/sponsors/antfu","homepage":"https://github.com/antfu/local-pkg#readme","repository":{"type":"git","url":"git+https://github.com/antfu/local-pkg.git"},"bugs":{"url":"https://github.com/antfu/local-pkg/issues"},"keywords":["package"],"sideEffects":false,"exports":{".":{"types":"./index.d.ts","require":"./index.cjs","import":"./index.mjs"}},"main":"index.cjs","module":"index.mjs","types":"index.d.ts","engines":{"node":">=14"},"scripts":{"prepublishOnly":"nr build","build":"tsup shared.ts --format esm,cjs --dts && esno scripts/postbuild.ts","lint":"eslint .","release":"bumpp && npm publish","test":"node test/cjs.cjs && node test/esm.mjs"},"devDependencies":{"@antfu/eslint-config":"^0.34.1","@antfu/ni":"^0.18.8","@antfu/utils":"^0.7.2","@types/chai":"^4.3.4","@types/node":"^18.11.18","bumpp":"^8.2.1","chai":"^4.3.7","eslint":"^8.32.0","esno":"^0.16.3","find-up":"^6.3.0","tsup":"^6.5.0","typescript":"^4.9.4"},"gitHead":"e707712fa952eef4fbf5be9c252ce4db88c4ffc1","_id":"local-pkg@0.4.3","_nodeVersion":"18.13.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==","shasum":"0ff361ab3ae7f1c19113d9bb97b98b905dbc4963","tarball":"http://registry-npm.ywwl.com/local-pkg/download/local-pkg-0.4.3.tgz","fileCount":9,"unpackedSize":28224,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC2LTj/ch2dwAqpIbQ9s8ULGaiIQHBBN4WcISL9VH93RwIgPHMmfuryuvWADuHrdvbNsSVkEDW5vGIiBvNz4xIyyfo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjyVxFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqoEw//Qo1ZPJR5d12oPbj+hfdBSFU8RV1H9XwEu15TOv/IpuJh0lqF\r\nnv/E6EVa7Jon/xLcBG1UjFUdsqs/WY2BT+KIeYMTrnPgr7TBZznv+8cCbYmq\r\nUL4hyAQTdxH4jAI1lGwEGmvMEhzRBEYITCXDMaNbhe82ncYB016x/3KqXznz\r\nDJJ8VpJcRbpN9KmEF9LPCirBzLqksG0VdgtQ/gzA9TQapHXHN20JVvqBA9RI\r\njFfb3UvZQjzbTYgRCsHcn0UYVQnNwxuBqu3UYA7lbAFT7hJYpTiJr7La+zss\r\nsXww1fYF5LzQLxPFzzWVh9CHJfoNWdIVOmRlGfXN9tUpJ8acWW75hmuQwWhn\r\nQ8ZZ7kjwBTctG2fRSzAzC6W40lc6gj51wsiFXYGrnZ9daYj7i9TSeS0D1crT\r\nrEnLvJZEbLsGgyhWo5JEst7x+EOqIKfvsqoz1K5bw3N+PJV2xK48oB5AySHD\r\nXlEXd1z5JgpkxiH5EmNKy6S7W0tgIADWdyj0qzHrTkjuWX1jtJKnm2sbL2wp\r\ncQaZEN8WblasoZUZJrj4U9AGuFdgThtoJf/RWf/nOkFTOYKm0xHiz4FhtSXq\r\n8mxOvlZPLvAT43oflkFvd06o+662+zqMtyeEFxIKPHQPuBKA3cuyhwMdsDOx\r\nmu0lzWpU1Vm1mfsLhFSOULviZLIUW4aUr8g=\r\n=pIzD\r\n-----END PGP SIGNATURE-----\r\n","size":6262,"noattachment":false,"key":"/local-pkg/-/local-pkg-0.4.3.tgz"},"_npmUser":{"name":"antfu","email":"anthonyfu117@hotmail.com"},"directories":{},"maintainers":[{"name":"antfu","email":"anthonyfu117@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/local-pkg_0.4.3_1674140741426_0.726364648467009"},"_hasShrinkwrap":false,"readme":"# local-pkg\n\n[![NPM version](https://img.shields.io/npm/v/local-pkg?color=a1b858&label=)](https://www.npmjs.com/package/local-pkg)\n\nGet information on local packages. Works on both CJS and ESM.\n\n## Install\n\n```bash\nnpm i local-pkg\n```\n\n## Usage\n\n```ts\nimport {\n  getPackageInfo,\n  importModule,\n  isPackageExists,\n  resolveModule,\n} from 'local-pkg'\n\nisPackageExists('local-pkg') // true\nisPackageExists('foo') // false\n\nawait getPackageInfo('local-pkg')\n/* {\n *   name: \"local-pkg\",\n *   version: \"0.1.0\",\n *   rootPath: \"/path/to/node_modules/local-pkg\",\n *   packageJson: {\n *     ...\n *   }\n * }\n */\n\n// similar to `require.resolve` but works also in ESM\nresolveModule('local-pkg')\n// '/path/to/node_modules/local-pkg/dist/index.cjs'\n\n// similar to `await import()` but works also in CJS\nconst { importModule } = await importModule('local-pkg')\n```\n\n\n## Sponsors\n\n<p align=\"center\">\n  <a href=\"https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg\">\n    <img src='https://cdn.jsdelivr.net/gh/antfu/static/sponsors.svg'/>\n  </a>\n</p>\n\n## License\n\n[MIT](./LICENSE) License © 2021 [Anthony Fu](https://github.com/antfu)\n","publish_time":1674140741580,"_cnpm_publish_time":1674140741580,"dist-tags":{"latest":"2.0.0"}}