Rush StackShopBlogEvents
Skip to main content

Home > @microsoft/rush-lib > LockStepVersionPolicy

LockStepVersionPolicy class

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

Signature:

export declare class LockStepVersionPolicy extends VersionPolicy 

Extends: VersionPolicy

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 LockStepVersionPolicy class.

Properties

PropertyModifiersTypeDescription
mainProjectreadonlystring | undefined

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.

nextBumpreadonlyBumpType | undefinedThe type of bump for next bump.
versionreadonlystringThe value of the lockstep version

Methods

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