RoadmapShopEvents
Skip to main content

Home > @microsoft/rush-lib > LockStepVersionPolicy > ensure

LockStepVersionPolicy.ensure() method

Returns an updated package json that satisfies the version policy.

Signature:

ensure(project: IPackageJson, force?: boolean): IPackageJson | undefined;

Parameters

ParameterTypeDescription
projectIPackageJsoninput package json
forceboolean(Optional) force update even when the project version is higher than the policy version.

Returns:

IPackageJson | undefined