跳到內容

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.

Parameter Type
name "npm" | "pnpm" | "yarn"
version? string

"npm" | "pnpm" | "yarn-classic" | "yarn-berry"