{"name":"preferred-pm","version":"4.1.0","keywords":["npm","pnpm","yarn"],"author":{"url":"https://www.kochan.io/","name":"Zoltan Kochan","email":"z@kochan.io"},"license":"MIT","_id":"preferred-pm@4.1.0","maintainers":[{"name":"zkochan","email":"z@kochan.io"}],"homepage":"https://github.com/zkochan/packages/tree/main#readme","bugs":{"url":"https://github.com/zkochan/packages/labels/package%3A%20preferred-pm"},"dist":{"shasum":"911b7adb811a485d992fd60953eb9d9efcdba36f","tarball":"http://registry-npm.ywwl.com/preferred-pm/download/preferred-pm-4.1.0.tgz","fileCount":5,"integrity":"sha512-cNKMVcSvE3hZBRukdRsvPtlUaM2fYLFbIvBz620XaDA5SjHsCRsAjNE2baI90Hh7QvJIjCHJYnpPtyqJ1/kOjQ==","signatures":[{"sig":"MEQCIGXDuPf/jEeLd0DGhjol/kGOMHVQXXHduHS/veyGJiMzAiBXYAKmyPVUayrPdlR+ll4xoWXJwA1I6GTdzvDjHGVyKA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5044,"size":2209,"noattachment":false,"key":"/preferred-pm/-/preferred-pm-4.1.0.tgz"},"main":"index.js","_from":"file:preferred-pm-4.1.0.tgz","types":"./index.d.ts","engines":{"node":">=18.12"},"scripts":{"test":"standard && node test"},"_npmUser":{"name":"zkochan","email":"z@kochan.io"},"_resolved":"/private/var/folders/g7/5ygp0ncd6qx5g4fn5hpsqq5c0000gn/T/b43d39fba26fab5f230ce9accdd72e94/preferred-pm-4.1.0.tgz","_integrity":"sha512-cNKMVcSvE3hZBRukdRsvPtlUaM2fYLFbIvBz620XaDA5SjHsCRsAjNE2baI90Hh7QvJIjCHJYnpPtyqJ1/kOjQ==","repository":{"url":"git+https://github.com/zkochan/packages.git#main","type":"git"},"_npmVersion":"10.8.2","description":"Detects what package manager was used for installation","directories":{},"_nodeVersion":"20.18.1","dependencies":{"which-pm":"^3.0.0","find-up-simple":"^1.0.0","find-yarn-workspace-root2":"1.2.16"},"_hasShrinkwrap":false,"devDependencies":{"ncp":"^2.0.0","tape":"^5.3.2","tempy":"^1.0.1","standard":"^16.0.4","preferred-pm":"file:"},"dependenciesMeta":{"preferred-pm":{"injected":true}},"_npmOperationalInternal":{"tmp":"tmp/preferred-pm_4.1.0_1738154127636_0.7537566744661948","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":1738154127800,"_cnpm_publish_time":1738154127800,"dist-tags":{"latest":"5.0.1","pnpm-temp":"3.0.2"}}