agentFor
function agentFor( name: "npm" | "pnpm" | "yarn", version?: string,): "npm" | "pnpm" | "yarn-classic" | "yarn-berry"Defined in: index.ts:215
The agent that runs a package manager. Yarn 1 is Classic and later versions are
Berry; without a version, yarn means the Classic global binary.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
name |
"npm" | "pnpm" | "yarn" |
version? |
string |
Returns
Section titled “Returns”"npm" | "pnpm" | "yarn-classic" | "yarn-berry"