mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-31 17:51:49 +00:00
930cf6633c
fix: Additional vi.mock path corrections and prettier formatting
32 lines
776 B
TypeScript
32 lines
776 B
TypeScript
import { isNonEmptyString } from '@sindresorhus/is';
|
|
import { logger } from '../../../logger/index.ts';
|
|
import type { UpdateArtifactsConfig } from '../types.ts';
|
|
|
|
export function getPythonVersionConstraint(
|
|
config: UpdateArtifactsConfig,
|
|
): string | undefined | null {
|
|
const { constraints = {} } = config;
|
|
const { python } = constraints;
|
|
|
|
if (isNonEmptyString(python)) {
|
|
logger.debug('Using python constraint from config');
|
|
return python;
|
|
}
|
|
|
|
return undefined;
|
|
}
|
|
|
|
export function getCopierVersionConstraint(
|
|
config: UpdateArtifactsConfig,
|
|
): string {
|
|
const { constraints = {} } = config;
|
|
const { copier } = constraints;
|
|
|
|
if (isNonEmptyString(copier)) {
|
|
logger.debug('Using copier constraint from config');
|
|
return copier;
|
|
}
|
|
|
|
return '';
|
|
}
|