{"_id":"nypm@0.6.10","bin":{"nypm":"./dist/cli.mjs"},"dist":{"shasum":"1e2f6881980b62c421c4796c94262793c273d38e","tarball":"http://registry-npm.ywwl.com/nypm/download/nypm-0.6.10.tgz","fileCount":7,"integrity":"sha512-W72Hrj1petq+b3Hk2aAC+9zswetlIFTnDW4s5djseZh2nYqBbyQLOtj472HwcbcWykPBUW1WpWpjOd4nK6gMRw==","signatures":[{"sig":"MEUCIGf9Oqp/PeORTPuKPt7QJE4aHt0qXfi0IxvBKotZVRngAiEA23CWnyoFy7MVdMeHs/iY3gfoywgG8CP4+2I/5No3WW8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAgY09QTkFhv6+/pisSF4Y0XRyDWB2WiRU2b/9i7pAuQAiEA/rhyVmZiom5czH/5QTA3RuqhkJV8Z+6gQVtqw1DgaIs="}],"unpackedSize":51530,"size":9561,"noattachment":false,"key":"/nypm/-/nypm-0.6.10.tgz"},"name":"nypm","type":"module","types":"./dist/index.d.mts","module":"./dist/index.mjs","engines":{"node":">=18"},"exports":{".":"./dist/index.mjs"},"license":"MIT","scripts":{"dev":"vitest dev","fmt":"oxlint . --fix && oxfmt src test","lint":"oxlint . && oxfmt --check src test","nypm":"node ./src/cli.ts","test":"pnpm lint && pnpm test:types && vitest run --coverage","build":"automd && obuild","release":"pnpm test && pnpm build && changelogen --release --push && pnpm publish","test:types":"tsc --noEmit"},"version":"0.6.10","_npmUser":{"name":"pi0","email":"pyapar@gmail.com"},"repository":{"url":"unjs/nypm","type":"git"},"description":"Unified Package Manager for Node.js","directories":{},"maintainers":[{"name":"pi0","email":"pyapar@gmail.com"}],"sideEffects":false,"_nodeVersion":"24.20.0","dependencies":{"citty":"^0.2.2","pathe":"^2.0.3","tinyexec":"^1.3.1"},"_hasShrinkwrap":false,"devDependencies":{"ufo":"^1.6.4","oxfmt":"^0.67.0","automd":"^0.4.3","obuild":"^0.4.39","oxlint":"^1.82.0","vitest":"^5.0.0","std-env":"^4.2.0","pkg-types":"^2.3.3","typescript":"^7","@types/node":"^26.5.0","changelogen":"^0.6.2","expect-type":"^1.4.0","@volar/typescript":"^2.4.28","eslint-config-unjs":"^0.6.2","@vitest/coverage-v8":"^5.0.0","@volar/language-service":"^2.4.28"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/nypm_0.6.10_1788900258592_0.4090734033247938"},"readme":"# 🌈 nypm\n\n<!-- automd:badges color=\"yellow\" codecov -->\n\n[![npm version](https://img.shields.io/npm/v/nypm?color=yellow)](https://npmjs.com/package/nypm)\n[![npm downloads](https://img.shields.io/npm/dm/nypm?color=yellow)](https://npm.chart.dev/nypm)\n[![codecov](https://img.shields.io/codecov/c/gh/unjs/nypm?color=yellow)](https://codecov.io/gh/unjs/nypm)\n\n<!-- /automd -->\n\n🌈 Unified Package Manager for Node.js (npm, pnpm, yarn), Bun and Deno.\n\n✅ Supports [npm](https://docs.npmjs.com/cli/v10/commands/npm), [yarn](https://yarnpkg.com/), [pnpm](https://pnpm.io/), [bun](https://bun.sh/package-manager), [deno](https://deno.com/), [aube](https://github.com/jdx/aube) and [nub](https://github.com/nubjs/nub) 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✅ **[corepack](https://github.com/nodejs/corepack)** integration for **pnpm** and **yarn**.\n\n## `nypm` command\n\n**Install dependencies:**\n\n```sh\nnpx nypm i\n```\n\n**Add a dependency:**\n\n```sh\nnpx nypm add defu\n```\n\n**Remove a dependency:**\n\n```sh\nnpx nypm remove defu\n```\n\n## API Usage\n\nInstall package:\n\n```sh\n# ✨ Auto-detect\nnpx nypm install nypm\n```\n\nImport:\n\n```js\n// ESM import\nimport { addDependency } from \"nypm\";\n\n// or dynamic import\nconst { addDependency } = await import(\"nypm\");\n```\n\n### `addDependency(name, options)`\n\nAdds dependency to the project.\n\n### `addDevDependency(name, options)`\n\nAdds dev dependency to the project.\n\n### `detectPackageManager(cwd, options)`\n\nDetect the package manager used in a directory (and up) by checking various sources:\n\n1. Use `packageManager` field from package.json\n2. Use [`devEngines.packageManager`](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#devengines) field from package.json\n3. Known lock files and other files\n\n### `ensureDependencyInstalled(name, options)`\n\nEnsures dependency is installed.\n\n### `installDependencies(options)`\n\nInstalls project dependencies.\n\n### `removeDependency(name, options)`\n\nRemoves dependency from the project.\n\n### `dedupeDependencies(options)`\n\nDedupe project dependencies.\n\n> [!NOTE]\n> For `bun` and `deno` it will remove the lockfile and reinstall all dependencies.\n\n### `runScript(name, options)`\n\nRuns a script defined in the `package.json` file.\n\n### `dlx(package, options)`\n\nDownload and execute a package with the package manager.\n\n### `installDependenciesCommand(<pm>, { short?, frozenLockFile? })`\n\nGet the command to install dependencies with the package manager.\n\n### `addDependencyCommand(<pm>, <name>, { dev?, global?, workspace?, yarnBerry?, short? })`\n\nGet the command to add a dependency with the package manager.\n\n### `runScriptCommand(<pm>, <name>, { args? })`\n\nGet the command to run a script with the package manager.\n\n### `dlxCommand(<pm>, <name>, { args?, short?, packages? })`\n\nGet the command to download and execute a package with the package manager.\n\n## 💻 Development\n\n- Clone this repository\n- Play [Nyan Cat](https://www.nyan.cat/) in the background (really important!)\n- Enable [Corepack](https://github.com/nodejs/corepack) using `corepack enable`\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 experience.\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- [egoist/dum](https://github.com/egoist/dum)\n- [nodejs/corepack](https://github.com/nodejs/corepack)\n\n## License\n\nMade with 💛\n\nPublished under [MIT License](./LICENSE).\n\n<!-- Badges -->\n\n[npm-version-src]: https://img.shields.io/npm/v/nypm?style=flat-square\n[npm-version-href]: https://npmjs.com/package/nypm\n[npm-downloads-src]: https://img.shields.io/npm/dm/nypm?style=flat-square\n[npm-downloads-href]: https://npmjs.com/package/nypm\n[github-actions-src]: https://img.shields.io/github/actions/workflow/status/unjs/nypm/ci.yml?branch=main&style=flat-square\n[github-actions-href]: https://github.com/unjs/nypm/actions?query=workflow%3Aci\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","publish_time":1788900258683,"_cnpm_publish_time":1788900258683,"dist-tags":{"latest":"0.6.12","latest-0.1":"0.1.1"}}