import semverSatisfies from 'semver/functions/satisfies';
export function minimalRequiredRuntimeCheck({ packageJson, required, requiredBy = 'WixPatterns', }) {
    const { version: actual, name: packageName } = packageJson;
    const satisfies = actual.startsWith('0.0.0') || semverSatisfies(actual, required);
    if (!satisfies) {
        throw new Error(`[@wix/patterns]: ${packageName}@${actual} does not satisfy ${requiredBy} minimal requirement: ${required}`);
    }
}
//# sourceMappingURL=minimalRequiredRuntimeCheck.js.map