跳到主内容
版本:Next

pnpm approve-builds

添加于:v10.1.0

在安装期间批准依赖项运行脚本。

The approved dependencies are added to the allowBuilds map in pnpm-workspace.yaml with a value of true, while unapproved ones are saved with a value of false. 如果你愿意,你也可以手动更新这些设置。

使用方法

You can run pnpm approve-builds without arguments to get an interactive prompt, or pass package names as positional arguments:

pnpm approve-builds esbuild fsevents !core-js

Prefix a package name with ! to deny it. Only mentioned packages are affected; the rest are left untouched.

During install, packages with ignored builds that are not yet listed in allowBuilds are automatically added to pnpm-workspace.yaml with a placeholder value, so you can manually set them to true or false.

配置项

--all

Added in: v10.32.0

Approve all pending builds without interactive prompts.

--global, -g

添加于:v10.4.0

批准全局安装的包的依赖关系。