{"name":"local-pkg","version":"1.1.2","keywords":["package"],"author":{"name":"Anthony Fu","email":"anthonyfu117@hotmail.com"},"license":"MIT","_id":"local-pkg@1.1.2","maintainers":[{"name":"antfu","email":"anthonyfu117@hotmail.com"},{"name":"sxzz","email":"sxzz@sxzz.moe"}],"homepage":"https://github.com/antfu-collective/local-pkg#readme","bugs":{"url":"https://github.com/antfu-collective/local-pkg/issues"},"dist":{"shasum":"c03d208787126445303f8161619dc701afa4abb5","tarball":"http://registry-npm.ywwl.com/local-pkg/download/local-pkg-1.1.2.tgz","fileCount":8,"integrity":"sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==","signatures":[{"sig":"MEQCIHfU3RSAEytZn+APJkCOtH6G3L0jN3XE0syR6y8iLzx0AiBv7JpegfqpV1ZhjSKZ4smt7wmSfvT/gWG84/kXTEJsSQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/local-pkg@1.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20250,"size":4445,"noattachment":false,"key":"/local-pkg/-/local-pkg-1.1.2.tgz"},"main":"dist/index.cjs","type":"module","_from":"file:local-pkg-1.1.2.tgz","types":"dist/index.d.ts","module":"dist/index.mjs","engines":{"node":">=14"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"funding":"https://github.com/sponsors/antfu","scripts":{"lint":"eslint .","test":"vitest run && node ./test/cjs.cjs && node ./test/esm.mjs","build":"unbuild","release":"bumpp","typecheck":"tsc --noEmit"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:92682d5a-39b3-4d95-8271-359bd48ff881"}},"_resolved":"/tmp/2f481173b2f85fa6b27db01d8a5b4e43/local-pkg-1.1.2.tgz","_integrity":"sha512-arhlxbFRmoQHl33a0Zkle/YWlmNwoyt6QNZEIJcqNbdrsix5Lvc4HyyI3EnwxTYlZYc32EbYrQ8SzEZ7dqgg9A==","repository":{"url":"git+https://github.com/antfu-collective/local-pkg.git","type":"git"},"_npmVersion":"11.5.2","description":"Get information on local packages.","directories":{},"sideEffects":false,"_nodeVersion":"22.18.0","dependencies":{"mlly":"^1.7.4","quansync":"^0.2.11","pkg-types":"^2.3.0"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^5.3.1","esno":"^4.8.0","bumpp":"^10.2.3","eslint":"^9.33.0","vitest":"^3.2.4","unbuild":"^3.6.1","@antfu/ni":"^25.0.0","typescript":"^5.9.2","@types/chai":"^5.2.2","@types/node":"^24.3.0","@antfu/utils":"^9.2.0","find-up-simple":"^1.0.1","unplugin-quansync":"^0.4.4","@antfu/eslint-config":"^5.2.1"},"_npmOperationalInternal":{"tmp":"tmp/local-pkg_1.1.2_1755649038057_0.38305960160267727","host":"s3://npm-registry-packages-npm-production"},"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## 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":1755649038265,"_cnpm_publish_time":1755649038265,"dist-tags":{"latest":"2.0.0"}}