Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/rush-lib > ApprovedPackagesConfiguration

ApprovedPackagesConfiguration class

This represents the JSON file specified via the "approvedPackagesFile" option in rush.json.

Signature:

export declare class ApprovedPackagesConfiguration 

Constructors

ConstructorModifiersDescription
(constructor)(jsonFilename)Constructs a new instance of the ApprovedPackagesConfiguration class

Properties

PropertyModifiersTypeDescription
itemsApprovedPackagesItem[]

Methods

MethodModifiersDescription
addOrUpdatePackage(packageName, reviewCategory)
clear()Clears all the settings, returning to an empty state.
getItemByName(packageName)
loadFromFile()Loads the configuration data from the filename that was passed to the constructor.
saveToFile()Loads the configuration data to the filename that was passed to the constructor.
tryLoadFromFile(approvedPackagesPolicyEnabled)If the file exists, calls loadFromFile().