RoadmapShopEvents
Skip to main content

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

PropertyModifiersTypeDescription
browserApprovedPackagesApprovedPackagesConfigurationPackages 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.
enabledbooleanWhether the feature is enabled. The feature is enabled if the "approvedPackagesPolicy" field is assigned in rush.json.
ignoredNpmScopesSet<string>A list of NPM package scopes that will be excluded from review (e.g. @types)
nonbrowserApprovedPackagesApprovedPackagesConfigurationPackages approved for usage everywhere *except* in a web browser.
reviewCategoriesSet<string>A list of category names that are valid for usage as the RushConfigurationProject.reviewCategory field. This array will never be undefined.