Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/rush-lib > VersionPolicyConfiguration

VersionPolicyConfiguration class

Use this class to load and save the "common/config/rush/version-policies.json" config file. This config file configures how different groups of projects will be published by Rush, and how their version numbers will be determined.


export declare class VersionPolicyConfiguration 


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


versionPoliciesreadonlyMap<string, VersionPolicy>Gets all the version policies


bump(versionPolicyName, bumpType, identifier, shouldCommit)Bumps up versions for the specified version policy or all version policies
getVersionPolicy(policyName)Gets the version policy by its name. Throws error if the version policy is not found.
update(versionPolicyName, newVersion, shouldCommit)Updates the version directly for the specified version policy
validate(projectsByName)Validate the version policy configuration against the rush config