mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-25 06:51:11 +00:00
930cf6633c
fix: Additional vi.mock path corrections and prettier formatting
18 lines
448 B
TypeScript
18 lines
448 B
TypeScript
import { logger, withMeta } from '../../../logger/index.ts';
|
|
import type { PackageFileContent } from '../types.ts';
|
|
import { Devbox } from './schema.ts';
|
|
|
|
export function extractPackageFile(
|
|
content: string,
|
|
packageFile: string,
|
|
): PackageFileContent | null {
|
|
logger.trace('devbox.extractPackageFile()');
|
|
|
|
const deps = withMeta({ packageFile }, () => Devbox.parse(content));
|
|
if (!deps.length) {
|
|
return null;
|
|
}
|
|
|
|
return { deps };
|
|
}
|