Skip to content

Commit

Permalink
docs: document v10.4 features
Browse files Browse the repository at this point in the history
  • Loading branch information
zkochan committed Feb 14, 2025
1 parent 88beeca commit 6589629
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/cli/add.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,21 @@ Install a package globally.

Only adds the new dependency if it is found in the workspace.


### --allow-build

Added in: v10.4.0

A list of package names that are allowed to run postinstall scripts during installation.

Example:

```
pnpm --allow-build=esbuild add my-bundler
```

This will run `esbuild`'s postinstall script and also add it to the `pnpm.onlyBuiltDependencies` field of `package.json`. So, `esbuild` will always be allowed to run its scripts in the future.

### --filter <package_selector\>

[Read more about filtering.](../filtering.md)
9 changes: 9 additions & 0 deletions docs/cli/approve-builds.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,12 @@ title: pnpm approve-builds
Added in: v10.1.0

Approve dependencies for running scripts during installation.

## Options

### --global, -g

Added in: v10.4.0

Approve dependencies of globally installed packages.

8 changes: 8 additions & 0 deletions docs/npmrc.md
Original file line number Diff line number Diff line change
Expand Up @@ -809,6 +809,14 @@ This flag does not prevent the execution of [.pnpmfile.cjs](./pnpmfile.md)

Do not execute any scripts of the installed packages. Scripts of the projects are executed.

:::note

Since v10, pnpm doesn't run the lifecycle scripts of dependencies unless they are listed in the [`pnpm.onlyBuiltDependencies`] field of `package.json`.

:::

[`pnpm.onlyBuiltDependencies`]: package_json.md#pnpmonlybuiltdependencies

### child-concurrency

* Default: **5**
Expand Down

0 comments on commit 6589629

Please sign in to comment.