Skip to content

Commit d678f07

Browse files
authored
fix: update pnpm-config template with correct version and new settings
1 parent b9c7df8 commit d678f07

1 file changed

Lines changed: 34 additions & 5 deletions

File tree

libraries/rush-lib/assets/rush-init/common/config/rush/pnpm-config.json

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,11 @@
368368
* lifecycle events). A value of `true` explicitly permits a package to run build scripts;
369369
* a value of `false` explicitly blocks it. Packages not listed inherit the default behavior.
370370
*
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.
375374
*
376-
* (SUPPORTED ONLY IN PNPM 11.0.0 AND NEWER)
375+
* (SUPPORTED ONLY IN PNPM 10.26.0 AND NEWER)
377376
*
378377
* PNPM documentation: https://pnpm.io/settings#allowbuilds
379378
*
@@ -390,6 +389,36 @@
390389
},
391390
/*[END "HYPOTHETICAL"]*/
392391

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+
393422
/**
394423
* The `globalOnlyBuiltDependencies` setting specifies which dependencies are permitted to run
395424
* build scripts (`preinstall`, `install`, and `postinstall` lifecycle events). This is the inverse

0 commit comments

Comments
 (0)