{"name":"preferred-pm","version":"3.1.0","description":"Detects what package manager was used for installation","main":"index.js","engines":{"node":">=10"},"repository":{"type":"git","url":"git+https://github.com/zkochan/packages.git#main"},"bugs":{"url":"https://github.com/zkochan/packages/labels/package%3A%20preferred-pm"},"keywords":["npm","pnpm","yarn"],"author":{"name":"Zoltan Kochan","email":"z@kochan.io","url":"https://www.kochan.io/"},"license":"MIT","dependenciesMeta":{"preferred-pm":{"injected":true}},"dependencies":{"find-up":"^5.0.0","find-yarn-workspace-root2":"1.2.16","path-exists":"^4.0.0","which-pm":"2.0.0"},"devDependencies":{"ncp":"^2.0.0","preferred-pm":"file:","standard":"^16.0.4","tape":"^5.3.2","tempy":"^1.0.1"},"scripts":{"test":"standard && node test"},"types":"./index.d.ts","homepage":"https://github.com/zkochan/packages/tree/main#readme","_id":"preferred-pm@3.1.0","_integrity":"sha512-n0vYWRoLitvdxNxA/sVc3NESEmcEOvY2xOOshR0UjXwVmvjQkY6bvL1w+1T9pLKHgF2o3QwPSE+X9NffWrdgnA==","_resolved":"/private/var/folders/g7/5ygp0ncd6qx5g4fn5hpsqq5c0000gn/T/a73b672b23450b143e0b00401b9f044d/preferred-pm-3.1.0.tgz","_from":"file:preferred-pm-3.1.0.tgz","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-n0vYWRoLitvdxNxA/sVc3NESEmcEOvY2xOOshR0UjXwVmvjQkY6bvL1w+1T9pLKHgF2o3QwPSE+X9NffWrdgnA==","shasum":"a63927742ce994beecece69c7243733aaf3bda49","tarball":"http://registry-npm.ywwl.com/preferred-pm/download/preferred-pm-3.1.0.tgz","fileCount":5,"unpackedSize":4680,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDpwHePHOIZpouC4B2WWRt05OLFr5fepuGZc9ZjXQ/R9wIgH8sQigR+amNbBZD8kkIj3MCL2mlKRRRCdGO8oAw8cPw="}],"size":2142,"noattachment":false,"key":"/preferred-pm/-/preferred-pm-3.1.0.tgz"},"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"directories":{},"maintainers":[{"name":"zkochan","email":"z@kochan.io"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/preferred-pm_3.1.0_1693440847749_0.3746614660860159"},"_hasShrinkwrap":false,"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":1693440847946,"_cnpm_publish_time":1693440847946,"dist-tags":{"latest":"5.0.1","pnpm-temp":"3.0.2"}}