{"name":"nypm","version":"0.1.1","description":"Unified Package Manager for Node.js","repository":{"type":"git","url":"git+https://github.com/unjs/nypm.git"},"license":"MIT","sideEffects":false,"type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","require":"./dist/index.cjs"}},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","scripts":{"build":"unbuild","dev":"vitest dev","lint":"eslint --ext .ts,.js,.mjs,.cjs .","prepack":"unbuild","release":"npm version patch && git push --follow-tags && npm publish --tag latest-0.1","test":"pnpm lint && vitest run --coverage"},"dependencies":{"execa":"^7.1.1"},"devDependencies":{"@nuxtjs/eslint-config-typescript":"^11.0.0","@types/node":"^18.11.11","@vitest/coverage-c8":"^0.25.4","changelogen":"^0.4.0","corepack":"^0.15.2","eslint":"^8.29.0","eslint-config-unjs":"^0.0.2","jiti":"^1.16.0","pathe":"^1.0.0","typescript":"^4.9.3","unbuild":"^1.0.1","vitest":"^0.25.4"},"packageManager":"pnpm@7.18.0","engines":{"node":"^14.16.0 || ^16.10.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"},"readme":"# 🌈 [nypm](https://www.youtube.com/watch?v=QH2-TGUlwu4)\n\n[![npm version][npm-version-src]][npm-version-href]\n[![npm downloads][npm-downloads-src]][npm-downloads-href]\n[![Github Actions][github-actions-src]][github-actions-href]\n[![Codecov][codecov-src]][codecov-href]\n\n> Unified Package Manager for Node.js\n\n🚧 This project is under development. Please follow [issues](https://github.com/unjs/nypm/issues) for the roadmap. 🚧\n\n## What does **nypm** do?\n\n✅ Supports **npm, yarn and pnpm** out of the box with a unified API\n\n✅ Provides an **API interface** to interact with package managers\n\n✅ **Autodetects** project's package manager using package.json and known lockfiles\n\n✅ **Auto-installs and use exactly expected version** of package manager using [nodejs/corepack](https://github.com/nodejs/corepack)\n\n✅ **Zero dependency** and low overhead implementation\n\nnypm, detects package manager type and version and converts command into package manager CLI arguments. It then uses corepack to execute package manager's command (and download it if necessary).\n\n```\n  +------------------------------------+\n  |                nypm                |\n  +------------------------------------+\n  +------------------------------------+\n  |              Corepack              |\n  +------------------------------------+\n  +---------+  +---------+   +---------+\n  |   npm   |  |  yarn   |   |  pnpm   |\n  +---------+  +---------+   +---------+\n  +------------------------------------+\n  |         Node.js project            |\n  +------------------------------------+\n```\n\n## CLI Usage\n\n[TBA]\n\n## API Usage\n\nInstall package:\n\n```sh\n# npm\nnpm install nypm\n\n# yarn\nyarn add nypm\n\n# pnpm\npnpm install nypm\n```\n\nImport:\n\n```js\n// ESM\nimport { detectPackageManager, installDependency } from 'nypm'\n\n// CommonJS\nconst { detectPackageManager, installDependency } = require('nypm')\n```\n\n## 💻 Development\n\n- Clone this repository\n- Play [Nyan Cat](https://www.youtube.com/watch?v=QH2-TGUlwu4) in the background (really important!)\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable` (use `npm i -g corepack` for Node.js < 16.10)\n- Install dependencies using `pnpm install`\n- Run interactive tests using `pnpm dev`\n\n## Related Projects\n\nNYPM is inspired from previous attempts and projects for unifying package manager exeperience.\n\n- [pi0/yarnpm](https://github.com/pi0/yarnpm)\n- [unjs/lmify](https://github.com/unjs/lmify)\n- [antfu/ni](https://github.com/antfu/ni)\n- [antfu/install-pkg](https://github.com/antfu/install-pkg)\n- [nodejs/corepack](https://github.com/nodejs/corepack)\n\n## License\n\nMade with 💛\n\nPublished under [MIT License](./LICENSE).\n\n<!-- Badges -->\n[npm-version-src]: https://img.shields.io/npm/v/nypm?style=flat-square\n[npm-version-href]: https://npmjs.com/package/nypm\n\n[npm-downloads-src]: https://img.shields.io/npm/dm/nypm?style=flat-square\n[npm-downloads-href]: https://npmjs.com/package/nypm\n\n[github-actions-src]: https://img.shields.io/github/workflow/status/unjs/nypm/ci/main?style=flat-square\n[github-actions-href]: https://github.com/unjs/nypm/actions?query=workflow%3Aci\n\n[codecov-src]: https://img.shields.io/codecov/c/gh/unjs/nypm/main?style=flat-square\n[codecov-href]: https://codecov.io/gh/unjs/nypm\n","readmeFilename":"README.md","gitHead":"b67f68306d63f4abedd03ce7ac94788e2655a90e","bugs":{"url":"https://github.com/unjs/nypm/issues"},"homepage":"https://github.com/unjs/nypm#readme","_id":"nypm@0.1.1","_nodeVersion":"16.19.0","_npmVersion":"8.19.3","dist":{"integrity":"sha512-rklj6nA+gKsU5GBr+8vLcIc9Qqq4iYrMKbxyHDAnnyfNDwCVGltKGBZq31fTDwo1UBKiOVpTf7/awSNVcWHHFw==","shasum":"512865979a45d5be2399a6ed835584e74b99f571","tarball":"http://registry-npm.ywwl.com/nypm/download/nypm-0.1.1.tgz","fileCount":6,"unpackedSize":19259,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBLiHupqPKA2j9RmqawRXPxDtyWxd7H6kP15/yApAuWGAiABwubIHmh0xID3dG1aeE78DaN9ow6hPzz+1q0cldiVjw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkNtnsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRxBAAg/wDcJNkfaEDb5lCnXrB2KstJjpEMsYmUOsfMTELw9Zwmhma\r\nUE0nIt57Ea6FlzI0hIPZOc6XK3g+odZVwbWOMiJ9FysnKTVZirhcRMYkoy/l\r\n+R8Nb8J2j1cSuGxP03QhIRKuUeLQSgkn2La8Lakb+4jf1b1c/Xrd2cavYkLf\r\n2n3sYqQCvcBNb9sS/q9yG7foQ/gush/h0EVF8aU6dphCBwO5bVT99XG6fFdi\r\nzty8HkETXre2i3A6uppvZdx9skltdMCERa7YM6iblq0WtdbiFh1kP8QSDjV+\r\n2l4C24RyIz8RxbLPWDBsHxHEI7hR2pTuwU8AVSdm7gj+/2iuJBJ0dW/KTLI/\r\nDOf/5PtUogzPq++cYZxaz0sMu5WIIqhGtMlj1ou97YqD/Zuwn7XflZELxwZb\r\nDhH+TYLcflNngYFOaWy0F1dXpFUw2m/MAPbLD2QEzxnsPi3lQXNi1nJPiMEZ\r\n1dMbYkEY2eg+jVl3ivEr8Ki9a69rspmyIr4vgU3gRahrPGVa4XZQ24TLzb8p\r\nl8QAW6QBsrC5sVyHjECl9J5YJBzSPDhfb2XkKCQJXCJZXV3aKMrGB6mExOz6\r\nuzffQthw2/m8UWjn13f1LVyOZ6AWXp3jSqC/pRXTqtthENSjZnrI6w+26kDM\r\nvWIh0/XCeZg4OakVWLk3jOKfCRJxvLp0KQ4=\r\n=LtGA\r\n-----END PGP SIGNATURE-----\r\n","size":4726,"noattachment":false,"key":"/nypm/-/nypm-0.1.1.tgz"},"_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"directories":{},"maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nypm_0.1.1_1681316332164_0.9309830297083794"},"_hasShrinkwrap":false,"publish_time":1681316332407,"_cnpm_publish_time":1681316332407,"dist-tags":{"latest":"0.6.12","latest-0.1":"0.1.1"}}