Home > @microsoft/rush-lib > ApprovedPackagesPolicy

ApprovedPackagesPolicy class

This is a helper object for RushConfiguration. It exposes the “approvedPackagesPolicy” feature from rush.json.

Signature:

export declare class ApprovedPackagesPolicy 

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the ApprovedPackagesPolicy class.

Properties

Property Modifiers Type Description
browserApprovedPackages   ApprovedPackagesConfiguration Packages approved for usage in a web browser. This is the stricter of the two types, so by default all new packages are added to this file.
enabled   boolean Whether the feature is enabled. The feature is enabled if the “approvedPackagesPolicy” field is assigned in rush.json.
ignoredNpmScopes   Set<string> A list of NPM package scopes that will be excluded from review (e.g. @types)
nonbrowserApprovedPackages   ApprovedPackagesConfiguration Packages approved for usage everywhere *except* in a web browser.
reviewCategories   Set<string> A list of category names that are valid for usage as the RushConfigurationProject.reviewCategory field. This array will never be undefined.