Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

which-pm-runs

zkochan7.6mMIT1.1.0TypeScript support: definitely-typed

Detects what package manager executes the process

npm, pnpm, yarn, cnpm

readme

which-pm-runs

Detects what package manager executes the process

npm version

Supports npm, pnpm, Yarn, cnpm, and bun. And also any other package manager that sets the npm_config_user_agent env variable.

Installation

pnpm add which-pm-runs

Usage

'use strict'
const whichPMRuns = require('which-pm-runs')

whichPMRuns()
//> {name: "pnpm", version: "0.64.2"}
  • which-pm - Detects what package manager was used for installation

License

MIT © Zoltan Kochan

changelog

which-pm-runs

1.1.0

Minor Changes

  • e7af82f: Support for cnpm added.