Rush StackShopBlogEvents
Skip to main content

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

VersionPolicy.ensure() method

Returns an updated package json that satisfies the policy.

Signature:

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

Parameters

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

Returns:

IPackageJson | undefined