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