|
368 | 368 | * lifecycle events). A value of `true` explicitly permits a package to run build scripts; |
369 | 369 | * a value of `false` explicitly blocks it. Packages not listed inherit the default behavior. |
370 | 370 | * |
371 | | - * This is the replacement for `globalNeverBuiltDependencies` and `globalOnlyBuiltDependencies`, |
372 | | - * and is the only way to control build permissions in pnpm 11+. The settings are written to the |
373 | | - * `allowBuilds` field of the `pnpm-workspace.yaml` file that is generated by Rush during |
374 | | - * installation. |
| 371 | + * This is the replacement for `globalNeverBuiltDependencies` and `globalOnlyBuiltDependencies`. |
| 372 | + * The settings are written to the `allowBuilds` field of the `pnpm-workspace.yaml` file that |
| 373 | + * is generated by Rush during installation. |
375 | 374 | * |
376 | | - * (SUPPORTED ONLY IN PNPM 11.0.0 AND NEWER) |
| 375 | + * (SUPPORTED ONLY IN PNPM 10.26.0 AND NEWER) |
377 | 376 | * |
378 | 377 | * PNPM documentation: https://pnpm.io/settings#allowbuilds |
379 | 378 | * |
|
390 | 389 | }, |
391 | 390 | /*[END "HYPOTHETICAL"]*/ |
392 | 391 |
|
| 392 | + /** |
| 393 | + * When `globalStrictDepBuilds` is enabled, the installation will exit with a non-zero exit code |
| 394 | + * if any dependencies have unreviewed build scripts (i.e., scripts not explicitly listed in |
| 395 | + * `globalAllowBuilds`). This helps enforce that all package build permissions are intentionally |
| 396 | + * reviewed and approved. The setting maps to the `strictDepBuilds` field of the |
| 397 | + * `pnpm-workspace.yaml` file generated by Rush during installation. |
| 398 | + * |
| 399 | + * (SUPPORTED ONLY IN PNPM 10.3.0 AND NEWER) |
| 400 | + * |
| 401 | + * PNPM documentation: https://pnpm.io/settings#strictdepbuilds |
| 402 | + */ |
| 403 | + /*[LINE "HYPOTHETICAL"]*/ "globalStrictDepBuilds": false, |
| 404 | + |
| 405 | + /** |
| 406 | + * If set to `true`, all build scripts (`preinstall`, `install`, `postinstall`) from all |
| 407 | + * dependencies will run automatically without requiring explicit approval via `globalAllowBuilds`. |
| 408 | + * The setting maps to the `dangerouslyAllowAllBuilds` field of the `pnpm-workspace.yaml` file |
| 409 | + * generated by Rush during installation. |
| 410 | + * |
| 411 | + * WARNING: This allows all dependencies—including transitive ones—to run install scripts, both |
| 412 | + * now and in the future. Future updates may introduce new, untrusted dependencies, or existing |
| 413 | + * packages may add malicious scripts. For maximum safety, use `globalAllowBuilds` to explicitly |
| 414 | + * review and allow builds. |
| 415 | + * |
| 416 | + * (SUPPORTED ONLY IN PNPM 10.9.0 AND NEWER) |
| 417 | + * |
| 418 | + * PNPM documentation: https://pnpm.io/settings#dangerouslyallowallbuilds |
| 419 | + */ |
| 420 | + /*[LINE "HYPOTHETICAL"]*/ "globalDangerouslyAllowAllBuilds": false, |
| 421 | + |
393 | 422 | /** |
394 | 423 | * The `globalOnlyBuiltDependencies` setting specifies which dependencies are permitted to run |
395 | 424 | * build scripts (`preinstall`, `install`, and `postinstall` lifecycle events). This is the inverse |
|
0 commit comments