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
Parameter | Type | Description |
---|---|---|
project | IPackageJson | package json |
force | boolean | (Optional) force update even when the project version is higher than the policy version. |
Returns:
IPackageJson | undefined