Home > @microsoft/rush-lib > VersionPolicy > ensure
VersionPolicy.ensure() method
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.
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 |
force update even when the project version is higher than the policy version. |
Returns:
IPackageJson | undefined