Home > @microsoft/rush-lib > PnpmOptionsConfiguration
PnpmOptionsConfiguration class
Options that are only used when the PNPM package manager is selected. Use this class to load "common/config/rush/pnpm-config.json" file, or, load json from "pnpmOptions" field in "rush.json" for legacy support.
Signature:
export declare class PnpmOptionsConfiguration extends PackageManagerOptionsConfigurationBase
Extends: PackageManagerOptionsConfigurationBase
Remarks
It is valid to define these options in rush.json even if the PNPM package manager is not being used.
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| boolean | undefined | (EXPERIMENTAL) If "true", then filtered installs ("rush install --to my-project") will be disregarded, instead always performing a full installation of the lockfile. This setting is primarily useful with Rush subspaces which enable filtering across multiple lockfiles, if filtering may be inefficient or undesirable for certain lockfiles. The default value is false. | |
| boolean | undefined | If true, then Here, the injected install refers to PNPM's PNPM's "injected dependencies" feature. Learn more: https://pnpm.io/package\_json\#dependenciesmeta | |
| boolean | undefined | When true, any missing non-optional peer dependencies are automatically installed. | |
| Record<string, string> | undefined | The PNPM documentation: https://pnpm.io/package\_json\#pnpmalloweddeprecatedversions If you are working to eliminate a deprecated version, it's better to specify | |
| Record<string, Record<string, string>> | undefined | The PNPM documentation: https://pnpm.io/catalogs | |
| string[] | undefined | The ignoredOptionalDependencies setting allows you to exclude certain optional dependencies from being installed during the Rush installation process. This can be useful when optional dependencies are not required or are problematic in specific environments (e.g., dependencies with incompatible binaries or platform-specific requirements). The listed dependencies will be treated as though they are missing, even if other packages specify them as optional dependencies. The settings are copied into the pnpm.ignoredOptionalDependencies field of the common/temp/package.json file that is generated by Rush during installation. (SUPPORTED ONLY IN PNPM 9.0.0 AND NEWER) PNPM documentation: https://pnpm.io/package\_json\#pnpmignoredoptionaldependencies | |
| string[] | undefined | The PNPM documentation: https://pnpm.io/package\_json\#pnpmneverbuiltdependencies | |
| string[] | undefined | The (SUPPORTED ONLY IN PNPM 10.1.0 AND NEWER) PNPM documentation: https://pnpm.io/package\_json\#pnpmonlybuiltdependencies | |
| Record<string, string> | undefined | The "globalOverrides" setting provides a simple mechanism for overriding version selections for all dependencies of all projects in the monorepo workspace. The settings are copied into the Order of precedence: PNPM documentation: https://pnpm.io/package\_json\#pnpmoverrides | |
| Record<string, IPnpmPackageExtension> | undefined | The Order of precedence: PNPM documentation: https://pnpm.io/package\_json\#pnpmpackageextensions | |
| Record<string, string> | undefined | (GENERATED BY RUSH-PNPM PATCH-COMMIT) When modifying this property, make sure you know what you are doing. The PNPM documentation: https://pnpm.io/package\_json\#pnpmpatcheddependencies | |
| IPnpmPeerDependencyRules | undefined | The Order of precedence: | |
| string | undefined | ||
| number | undefined | The minimum number of minutes that must pass after a version is published before pnpm will install it. This setting helps reduce the risk of installing compromised packages, as malicious releases are typically discovered and removed within a short time frame. | |
| string[] | undefined | List of package names or patterns that are excluded from the minimumReleaseAge check. These packages will always install the newest version immediately, even if minimumReleaseAge is set. | |
| IPnpmLockfilePolicies | undefined | The | |
| The method used to resolve the store used by PNPM. | ||
| string | The path for PNPM to use as the store directory. Will be overridden by environment variable RUSH_PNPM_STORE_PATH | |
| boolean | If true, then | |
| PnpmResolutionMode | undefined | This setting determines how PNPM chooses version numbers during | |
| boolean | If true, then Rush will add the "--strict-peer-dependencies" option when invoking PNPM. | |
| unknown | undefined | (USE AT YOUR OWN RISK) This is a free-form property bag that will be copied into the USAGE OF THIS SETTING IS NOT SUPPORTED BY THE RUSH MAINTAINERS AND MAY CAUSE RUSH TO MALFUNCTION. If you encounter a missing PNPM setting that you believe should be supported, please create a GitHub issue or PR. Note that Rush does not aim to support every possible PNPM setting, but rather to promote a battle-tested installation strategy that is known to provide a good experience for large teams with lots of projects. | |
| boolean | If true, then Rush will use the workspaces feature to install and link packages when invoking PNPM. |
Methods
Method | Modifiers | Description |
|---|---|---|
Updates globalOnlyBuiltDependencies field of the PNPM options in the common/config/rush/pnpm-config.json file. | ||
Updates patchedDependencies field of the PNPM options in the common/config/rush/pnpm-config.json file. |