{"name":"preferred-pm","version":"5.0.0","keywords":["npm","pnpm","yarn"],"author":{"url":"https://www.kochan.io/","name":"Zoltan Kochan","email":"z@kochan.io"},"license":"MIT","_id":"preferred-pm@5.0.0","maintainers":[{"name":"zkochan","email":"z@kochan.io"}],"bugs":{"url":"https://github.com/zkochan/packages/labels/package%3A%20preferred-pm"},"dist":{"shasum":"0f1b326edb9df50673d3f1b3be9b70ea047971ab","tarball":"http://registry-npm.ywwl.com/preferred-pm/download/preferred-pm-5.0.0.tgz","fileCount":5,"integrity":"sha512-qs9WZBOIW4tXjxoYxUathIb53hcV3cjVpLJl8Y0h3QOiyqnbDzWmw0jvTI5YOw/RAkhDsB/sFVt9pYV+r6NP2A==","signatures":[{"sig":"MEUCIHExSeq0nIlY81LyQ/akrLVgajzUAHbwVrq1tb1OZGcjAiEA5bEQqpw9F4cIOIcNynEEbWkqgr2MVe4Hf/gvApxLuYQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":4919,"size":2213,"noattachment":false,"key":"/preferred-pm/-/preferred-pm-5.0.0.tgz"},"main":"index.js","type":"module","engines":{"node":">=22.13"},"exports":"./index.js","scripts":{"test":"standard && node --test test/index.js"},"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"repository":"https://github.com/zkochan/packages/tree/main/preferred-pm","description":"Detects what package manager was used for installation","directories":{},"_nodeVersion":"25.6.1","dependencies":{"which-pm":"^4.0.0","find-up-simple":"^1.0.1","find-yarn-workspace-root2":"1.2.53"},"_hasShrinkwrap":false,"devDependencies":{"ncp":"^2.0.0","tempy":"^3.2.0","standard":"^17.1.2"},"_npmOperationalInternal":{"tmp":"tmp/preferred-pm_5.0.0_1773215557746_0.9005521922825575","host":"s3://npm-registry-packages-npm-production"},"readme":"# preferred-pm\n\n> Returns the preferred package manager of a project\n\n[![npm version](https://img.shields.io/npm/v/preferred-pm.svg)](https://www.npmjs.com/package/preferred-pm)\n\n* Inside a Yarn workspace, Yarn is preferred.\n* Inside a pnpm workspace, pnpm is preferred.\n* If a `package-lock.json` is present, npm is preferred.\n* If a `yarn.lock` is present, Yarn is preferred.\n* If a `pnpm-lock.yaml` is present, pnpm is preferred.\n* If a `bun.lockb` is present, Bun is preferred.\n* If a `node_modules` is present, tries to detect which package manager installed it.\n\n## Installation\n\n```\n<pnpm|yarn|npm|bun> add preferred-pm\n```\n\n## Usage\n\n```js\n'use strict'\nconst preferredPM = require('preferred-pm')\n\npreferredPM(process.cwd())\n    .then(pm => console.log(pm))\n//> {name: \"npm\", version: \">=5\"}\n```\n\n## Related\n\n* [which-pm](https://github.com/zkochan/packages/tree/main/which-pm) - Detects what package manager was used for installation\n* [which-pm-runs](https://github.com/zkochan/packages/tree/main/which-pm-runs) - Detects what package manager executes the process\n\n## License\n\n[MIT](LICENSE) © [Zoltan Kochan](https://kochan.io)\n","publish_time":1773215557876,"_cnpm_publish_time":1773215557876,"dist-tags":{"latest":"5.0.1","pnpm-temp":"3.0.2"}}