{"name":"local-pkg","version":"1.2.0","keywords":["package"],"author":"Anthony Fu <anthonyfu117@hotmail.com>","license":"MIT","_id":"local-pkg@1.2.0","maintainers":[{"name":"antfu","email":"anthonyfu117@hotmail.com"},{"name":"sxzz","email":"npm@sxzz.moe"}],"homepage":"https://github.com/antfu-collective/local-pkg#readme","bugs":{"url":"https://github.com/antfu-collective/local-pkg/issues"},"dist":{"shasum":"5237bc3cbb5bacc1de4796fde27bd2dbbe51852b","tarball":"http://registry-npm.ywwl.com/local-pkg/download/local-pkg-1.2.0.tgz","fileCount":8,"integrity":"sha512-U16tFsiwNEac4GuqQ/SmG3ayjPIT1YKmiFeH4x9NaHTZwYbSqmEhf9POmzJu6NdUDDVjaE7n1WQQLjymYYFx+Q==","signatures":[{"sig":"MEYCIQDmuyQMbgZ4a/Ef/qOc8TAMLXl11oCl28j0PUEhRoycnwIhAKV0UT+l9kEysEYznqkfzZHJPeqEJJ35Mpsv9aPRnMMz","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/local-pkg@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":20183,"size":4454,"noattachment":false,"key":"/local-pkg/-/local-pkg-1.2.0.tgz"},"main":"dist/index.cjs","type":"module","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"}},"repository":{"url":"git+https://github.com/antfu-collective/local-pkg.git","type":"git"},"description":"Get information on local packages.","directories":{},"sideEffects":false,"_nodeVersion":"24.15.0","dependencies":{"mlly":"^1.8.2","quansync":"^1.0.0","pkg-types":"^2.3.1"},"_hasShrinkwrap":false,"devDependencies":{"chai":"^6.2.2","esno":"^4.8.0","bumpp":"^11.1.0","eslint":"^10.4.0","vitest":"^4.1.6","unbuild":"^3.6.1","@antfu/ni":"^30.1.0","typescript":"^6.0.3","@types/chai":"^5.2.3","@types/node":"^25.9.1","@antfu/utils":"^9.3.0","find-up-simple":"^1.0.1","unplugin-quansync":"^0.5.2","@antfu/eslint-config":"^9.0.0"},"_npmOperationalInternal":{"tmp":"tmp/local-pkg_1.2.0_1779221044341_0.7979395289540441","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":1779221044550,"_cnpm_publish_time":1779221044550,"dist-tags":{"latest":"2.0.0"}}