{"_id":"@anyions/node-pkg","_rev":"5-e57fcf593310af8531524f6d026ea7c2","name":"@anyions/node-pkg","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@anyions/node-pkg","type":"module","version":"1.0.0","description":"Node package management","author":{"name":"AnyIons","email":"anyions@hotmail.com","url":"https://github.com/anyions"},"license":"MIT","homepage":"https://github.com/anyions/node-pkg","repository":{"url":"git+https://github.com/anyions/node-pkg.git"},"bugs":{"url":"https://github.com/anyions/node-pkg/issues"},"keywords":["package"],"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"dependencies":{"@jsdevtools/ez-spawn":"^3.0.4","find-up":"^7.0.0","mlly":"^1.7.0","pkg-types":"^1.1.0"},"devDependencies":{"@types/node":"^20.12.10","bumpp":"^9.4.1","tsup":"^8.0.2","typescript":"^5.4.5"},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --no-splitting","clean":"pnpm rimraf .turbo node_modules dist","lint":"pnpm eslint .","lint:eslint":"eslint --cache --max-warnings 0 \"**/*.{ts,tsx,js,cjs,mjs}\" --fix","lint:prettier":"prettier --write --log-level warn \"**/*.{js,cjs,mjs,json,ts,tsx,md}\"","typecheck":"tsc --noEmit --skipLibCheck"},"_id":"@anyions/node-pkg@1.0.0","_integrity":"sha512-LjT6QARXa/+uAO3w2tFfJRDRUY04gusSfIC+EXU+wBJ+B66vgCPJQ1FyBQ4ZN8ofM3A6gPQ/I8djPD77DLoiQg==","_resolved":"/private/var/folders/z0/lmj1r6vd4l57qpvgrbfr14600000gr/T/11ce79c5b442170e891c81e2a93cc643/anyions-node-pkg-1.0.0.tgz","_from":"file:anyions-node-pkg-1.0.0.tgz","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-LjT6QARXa/+uAO3w2tFfJRDRUY04gusSfIC+EXU+wBJ+B66vgCPJQ1FyBQ4ZN8ofM3A6gPQ/I8djPD77DLoiQg==","shasum":"30db5e18f3591c61abb61d075dbe045da438eb6e","tarball":"https://registry.npmjs.org/@anyions/node-pkg/-/node-pkg-1.0.0.tgz","fileCount":7,"unpackedSize":22145,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICgmj50LcdWZxegO+3h49dpB8dTnctwkEhJ8cS9ujgGxAiEA0WtuZXZSFwmBffs0xefw8qZwjgSw6WjhKqhWjpFJ+6Y="}]},"_npmUser":{"name":"anyions","email":"anyions@hotmail.com"},"directories":{},"maintainers":[{"name":"anyions","email":"anyions@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-pkg_1.0.0_1715219843932_0.7352933381949174"},"_hasShrinkwrap":false},"1.0.1":{"name":"@anyions/node-pkg","type":"module","version":"1.0.1","description":"Node packages management","author":{"name":"AnyIons","email":"anyions@hotmail.com","url":"https://github.com/anyions"},"license":"MIT","homepage":"https://github.com/anyions/node-pkg","repository":{"url":"git+https://github.com/anyions/node-pkg.git"},"bugs":{"url":"https://github.com/anyions/node-pkg/issues"},"keywords":["package"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14"},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --no-splitting","bump":"bumpp && npm publish --access=public","clean":"pnpm rimraf .turbo node_modules dist","lint":"pnpm eslint .","lint:fix":"eslint . --cache --max-warnings 0 --fix","typecheck":"tsc --noEmit --skipLibCheck"},"dependencies":{"@anyions/shared-eslint-config":"^1.0.0","@jsdevtools/ez-spawn":"^3.0.4","find-up":"^7.0.0","mlly":"^1.7.0","pkg-types":"^1.1.0"},"devDependencies":{"@types/node":"^20.12.10","bumpp":"^9.4.1","eslint":"^9.2.0","tsup":"^8.0.2","typescript":"^5.4.5"},"_id":"@anyions/node-pkg@1.0.1","gitHead":"7e534d2971edbc263e62fa5b1e82842762b28aab","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-fv5gzKqkAeZlX5QBPtyHoiPOdcpA5PyYzjrwQAYnDGk832AZVzGhO1+lnwzwRN9iGkYZr1t9SAyM00T4tiNTRg==","shasum":"883115613cca112a35f6881650e6bbea40930f01","tarball":"https://registry.npmjs.org/@anyions/node-pkg/-/node-pkg-1.0.1.tgz","fileCount":7,"unpackedSize":22152,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFTYN1L6gRR7Gm+pz4Tf7RUq+I3T4C6fDG8F4dC3FTRHAiEAoSHw82gEZBmpcR15rtJ5fw85wp1Vfgwuml9/teCa+y0="}]},"_npmUser":{"name":"anyions","email":"anyions@hotmail.com"},"directories":{},"maintainers":[{"name":"anyions","email":"anyions@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-pkg_1.0.1_1715266544193_0.9293795053673493"},"_hasShrinkwrap":false},"1.0.2":{"name":"@anyions/node-pkg","type":"module","version":"1.0.2","description":"Node packages management","author":{"name":"AnyIons","email":"anyions@hotmail.com","url":"https://github.com/anyions"},"license":"MIT","homepage":"https://github.com/anyions/node-pkg","repository":{"url":"git+https://github.com/anyions/node-pkg.git"},"bugs":{"url":"https://github.com/anyions/node-pkg/issues"},"keywords":["package"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14"},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --no-splitting","bump":"bumpp && npm publish --access=public","clean":"pnpm rimraf .turbo node_modules dist","lint":"pnpm eslint .","lint:fix":"eslint . --cache --max-warnings 0 --fix","typecheck":"tsc --noEmit --skipLibCheck"},"dependencies":{"@anyions/shared-eslint-config":"^1.0.1","@jsdevtools/ez-spawn":"^3.0.4","find-up":"^7.0.0","mlly":"^1.7.0","pkg-types":"^1.1.0"},"devDependencies":{"@types/node":"^20.12.10","bumpp":"^9.4.1","eslint":"^9.2.0","tsup":"^8.0.2","typescript":"^5.4.5"},"_id":"@anyions/node-pkg@1.0.2","gitHead":"4f249c149d4a462e1248ffffa62f182e0fe2a3b9","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-jD6axNoxpoXrW/iBsypKdyZTAazcrMlHOV/39RN8hT2LIknBtakOSTolW9nyAqhVTC5u5rb7H2PY1rHS6rEcFA==","shasum":"1cb58b65fa1479f530dc0da814d26121916524e5","tarball":"https://registry.npmjs.org/@anyions/node-pkg/-/node-pkg-1.0.2.tgz","fileCount":7,"unpackedSize":22152,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCikSoE26C2VIOECbGAEY43NCM+SGfRg4i8AyfxUwCrhwIhAM0bK9kbEP0ceOyYNgPmD0/Wm0NWKgGlzb87lQvlLlav"}]},"_npmUser":{"name":"anyions","email":"anyions@hotmail.com"},"directories":{},"maintainers":[{"name":"anyions","email":"anyions@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-pkg_1.0.2_1715326727052_0.049126300262068545"},"_hasShrinkwrap":false},"1.0.3":{"name":"@anyions/node-pkg","type":"module","version":"1.0.3","description":"Node packages management","author":{"name":"AnyIons","email":"anyions@hotmail.com","url":"https://github.com/anyions"},"license":"MIT","homepage":"https://github.com/anyions/node-pkg","repository":{"url":"git+https://github.com/anyions/node-pkg.git"},"bugs":{"url":"https://github.com/anyions/node-pkg/issues"},"keywords":["package"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14"},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --no-splitting","bump":"bumpp && npm publish --access=public","clean":"pnpm rimraf .turbo node_modules dist","lint":"pnpm eslint .","lint:fix":"eslint . --cache --max-warnings 0 --fix","typecheck":"tsc --noEmit --skipLibCheck"},"dependencies":{"@anyions/shared-eslint-config":"^1.0.2","@jsdevtools/ez-spawn":"^3.0.4","find-up":"^7.0.0","mlly":"^1.7.0","pkg-types":"^1.1.0"},"devDependencies":{"@types/node":"^20.12.10","bumpp":"^9.4.1","eslint":"^9.2.0","tsup":"^8.0.2","typescript":"^5.4.5"},"_id":"@anyions/node-pkg@1.0.3","gitHead":"bc2222892385000d164243fb6e12d499ea3713f5","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-+1LpTSDRnqNwD9U+h3/AaZWDW3mB8dr+YVFCMLzAqUWq5nv21kvJtmUw3cb3X9C1r2gtfYAV4ULhiAcCbWQ4RQ==","shasum":"c2277d6b9b4cbdb02684ca5814b2c080ded70e07","tarball":"https://registry.npmjs.org/@anyions/node-pkg/-/node-pkg-1.0.3.tgz","fileCount":7,"unpackedSize":22297,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIGsI8rd/7gfBcInVz9RrQLZWk1wBC4tYhMkdaSbBK0zNAiEA+P58xFPXaiNTKzlDxiutThCvxNa7gjEE11qxmPdIPdA="}]},"_npmUser":{"name":"anyions","email":"anyions@hotmail.com"},"directories":{},"maintainers":[{"name":"anyions","email":"anyions@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-pkg_1.0.3_1715522640342_0.1964492980680279"},"_hasShrinkwrap":false},"1.0.4":{"name":"@anyions/node-pkg","type":"module","version":"1.0.4","description":"Node packages management","author":{"name":"AnyIons","email":"anyions@hotmail.com","url":"https://github.com/anyions"},"license":"MIT","homepage":"https://github.com/anyions/node-pkg","repository":{"url":"git+https://github.com/anyions/node-pkg.git"},"bugs":{"url":"https://github.com/anyions/node-pkg/issues"},"keywords":["package"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14"},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --no-splitting","bump":"bumpp && npm publish --access=public","clean":"pnpm rimraf .turbo node_modules dist","lint":"pnpm eslint .","lint:fix":"eslint . --cache --max-warnings 0 --fix","typecheck":"tsc --noEmit --skipLibCheck"},"dependencies":{"@anyions/shared-config-eslint":"^1.0.3","@jsdevtools/ez-spawn":"^3.0.4","find-up":"^7.0.0","mlly":"^1.7.0","pkg-types":"^1.1.0"},"devDependencies":{"@types/node":"^20.12.10","bumpp":"^9.4.1","eslint":"^9.2.0","tsup":"^8.0.2","typescript":"^5.4.5"},"_id":"@anyions/node-pkg@1.0.4","gitHead":"6174c53b803c3226fee411192e5504ee9e59f2b1","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-knA1js4juwsax05to8mlER5fR876bFu0iZVZuQqaPwk/rM9t5CUsUVJKFod2SRNdzD/eBjDbCtrJdbqe11zY8A==","shasum":"691c8ec097af1416dddbb535e12e34e8462623a5","tarball":"https://registry.npmjs.org/@anyions/node-pkg/-/node-pkg-1.0.4.tgz","fileCount":7,"unpackedSize":22241,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCaYgpsGx37xOnw/Z8Tjuu2sph55rFygZJC4dI0MJ0ptwIhAJeXLOpOqYMPGDp74OIEvwcxuktW4yGbyO5Ms14Y8Zqv"}]},"_npmUser":{"name":"anyions","email":"anyions@hotmail.com"},"directories":{},"maintainers":[{"name":"anyions","email":"anyions@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-pkg_1.0.4_1715580423722_0.5435955871900418"},"_hasShrinkwrap":false},"1.0.5":{"name":"@anyions/node-pkg","type":"module","version":"1.0.5","description":"Node packages management","author":{"name":"AnyIons","email":"anyions@hotmail.com","url":"https://github.com/anyions"},"license":"MIT","homepage":"https://github.com/anyions/node-pkg","repository":{"url":"git+https://github.com/anyions/node-pkg.git"},"bugs":{"url":"https://github.com/anyions/node-pkg/issues"},"keywords":["package"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"main":"dist/index.cjs","module":"dist/index.js","types":"dist/index.d.ts","engines":{"node":">=14"},"scripts":{"build":"tsup src/index.ts --format cjs,esm --dts --no-splitting","bump":"bumpp && npm publish --access=public","clean":"pnpm rimraf .turbo node_modules dist","lint":"pnpm eslint .","lint:fix":"eslint . --cache --max-warnings 0 --fix","typecheck":"tsc --noEmit --skipLibCheck"},"dependencies":{"@jsdevtools/ez-spawn":"^3.0.4","find-up":"^7.0.0","mlly":"^1.7.0","pkg-types":"^1.1.0"},"devDependencies":{"@anyions/shared-config-eslint":"*","@types/node":"^20.12.10","bumpp":"^9.4.1","eslint":"^9.2.0","tsup":"^8.0.2","typescript":"^5.4.5"},"_id":"@anyions/node-pkg@1.0.5","gitHead":"0dbded13fd250d642d17e9d4c3484cb2eb0153c7","_nodeVersion":"21.7.3","_npmVersion":"10.5.0","dist":{"integrity":"sha512-4yBzIoKWJNk6/hxLmbPw4tQ6OyNASxvD0u/dX+EL02wnZA0DezwW1nsL+Aa/MShiVnqzRvhFH5DKQWGOSHQx9w==","shasum":"5072b7907bd293aeb0a65c47c2d4a7b47ef51ecf","tarball":"https://registry.npmjs.org/@anyions/node-pkg/-/node-pkg-1.0.5.tgz","fileCount":7,"unpackedSize":22220,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC+D1OMLxm50PYeXKZX6jJKcmAgpAq7LXU5aZtcHNig5QIhAJ2QlWQzh+1DUL3XCX96/JH34hX9fpOXmsSLAeFvEQ36"}]},"_npmUser":{"name":"anyions","email":"anyions@hotmail.com"},"directories":{},"maintainers":[{"name":"anyions","email":"anyions@hotmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/node-pkg_1.0.5_1715581414004_0.9142685240941308"},"_hasShrinkwrap":false}},"time":{"created":"2024-05-09T01:57:23.818Z","1.0.0":"2024-05-09T01:57:24.054Z","modified":"2024-05-13T06:23:34.360Z","1.0.1":"2024-05-09T14:55:44.358Z","1.0.2":"2024-05-10T07:38:47.221Z","1.0.3":"2024-05-12T14:04:00.495Z","1.0.4":"2024-05-13T06:07:03.889Z","1.0.5":"2024-05-13T06:23:34.185Z"},"maintainers":[{"name":"anyions","email":"anyions@hotmail.com"}],"description":"Node packages management","homepage":"https://github.com/anyions/node-pkg","keywords":["package"],"repository":{"url":"git+https://github.com/anyions/node-pkg.git"},"author":{"name":"AnyIons","email":"anyions@hotmail.com","url":"https://github.com/anyions"},"bugs":{"url":"https://github.com/anyions/node-pkg/issues"},"license":"MIT","readme":"# node-pkg\n\n[![NPM version](https://img.shields.io/npm/v/@anyions/node-pkg?color=a1b858&label=)](https://www.npmjs.com/package/@anyions/node-pkg) ![NPM License](https://img.shields.io/npm/l/%40anyions%2Fshared-eslint-config) ![Static Badge](https://img.shields.io/badge/author-AnyIons-blue)\n\nNode pakcages management, based on [@antfu/local-pkg](https://www.npmjs.com/package/@antfu/local-pkg) & [@antfu/install-pkg](https://www.npmjs.com/package/@antfu/install-pkg).\n\n- Get information on local packages. works on both CJS and ESM.\n- Install package programmatically. Detect package managers automatically (npm, yarn, bun and pnpm).\n\n## Install\n\n```bash\nnpm i @anyions/node-pkg\n```\n\n## Usage\n\nGet information on local packages\n\n```js\nimport {\n  getPackageInfo,\n  importModule,\n  isPackageExists,\n  resolveModule,\n} from \"@anyions/node-pkg\";\n\nisPackageExists(\"@anyions/node-pkg\"); // true\nisPackageExists(\"foo\"); // false\n\nawait getPackageInfo(\"@anyions/node-pkg\");\n/* {\n *   name: \"@anyions/node-pkg\",\n *   version: \"1.0.0\",\n *   rootPath: \"/path/to/node_modules/@anyions/node-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/@anyions/node-pkg/dist/index.cjs'\n\n// similar to `await import()` but works also in CJS\nconst { importModule } = await importModule(\"@anyions/node-pkg\");\n```\n\nInstall package programmatically\n\n```ts\nimport { installPackage } from \"@anyions/node-pkg\";\n\nawait installPackage(\"vite\", { silent: true });\n```\n\n## License\n\n[MIT](./LICENSE) License © 2020 [AnyIons](https://github.com/anyions)\n","readmeFilename":"README.md"}