Files
renovate/lib/modules/manager/hermit/update.ts
Sergei Zharinov 930cf6633c refactor: Rewrite imports with .ts extensions (#40700)
fix: Additional vi.mock path corrections and prettier formatting
2026-01-26 22:48:17 +00:00

23 lines
706 B
TypeScript

import { logger } from '../../../logger/index.ts';
import type { UpdateDependencyConfig } from '../types.ts';
const updateLine = '#hermit updated';
/**
* updateDependency appends a comment line once.
* This is only for the purpose of triggering the artifact update
* Hermit doesn't have a package file to update like other package managers.
*/
export function updateDependency({
fileContent,
upgrade,
}: UpdateDependencyConfig): string | null {
logger.trace({ upgrade }, `hermit.updateDependency()`);
if (!fileContent.endsWith(updateLine)) {
logger.debug(`append update line to the fileContent if it hasn't been`);
return `${fileContent}\n${updateLine}`;
}
return fileContent;
}