Home > @microsoft/rush-lib > LockStepVersionPolicy

LockStepVersionPolicy class

This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.

This policy indicates all related projects should use the same version.


export declare class LockStepVersionPolicy extends VersionPolicy 

Extends: VersionPolicy


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


Property Modifiers Type Description
mainProject   string | undefined (BETA) The main project for the version policy.If the value is provided, change logs will only be generated in that project. If the value is not provided, change logs will be hosted in each project associated with the policy.
nextBump   BumpType (BETA) The type of bump for next bump.
version   string (BETA) The value of the lockstep version


Method Modifiers Description
bump(bumpType, identifier)   (BETA) Bumps the version of the lockstep policy
ensure(project, force)   (BETA) Returns an updated package json that satisfies the version policy.
update(newVersionString)   (BETA) Updates the version of the policy directly with a new value
validate(versionString, packageName)   (BETA) Validates the specified version and throws if the version does not satisfy lockstep version.