mirror of
https://github.com/renovatebot/renovate.git
synced 2026-10-31 01:37:24 +00:00
533bc62eb4
* refactor(manager/pixi): extract shared pixi.lock update helper * test(manager/pixi): cover shared pixi.lock helper directly Add a dedicated lockfile.spec.ts that exercises updatePixiLockfile directly (gate, package-file write branch, lockfile maintenance, unchanged, constraint pass-through, and error handling), and slim the pixi and pep621 call-site specs down to their own behavior: how each derives the pixi constraint and that they delegate to the shared helper.
26 lines
814 B
TypeScript
26 lines
814 B
TypeScript
import { logger } from '../../../logger/index.ts';
|
|
import type { UpdateArtifact, UpdateArtifactsResult } from '../types.ts';
|
|
import { getUserPixiConfig } from './extract.ts';
|
|
import { updatePixiLockfile } from './lockfile.ts';
|
|
|
|
export async function updateArtifacts({
|
|
packageFileName,
|
|
updatedDeps,
|
|
newPackageFileContent,
|
|
config,
|
|
}: UpdateArtifact): Promise<UpdateArtifactsResult[] | null> {
|
|
logger.debug(`pixi.updateArtifacts(${packageFileName})`);
|
|
|
|
const pixiConfig = getUserPixiConfig(newPackageFileContent, packageFileName);
|
|
const constraint =
|
|
config.constraints?.pixi ?? pixiConfig?.project['requires-pixi'];
|
|
|
|
return await updatePixiLockfile({
|
|
packageFileName,
|
|
updatedDeps,
|
|
isLockFileMaintenance: config.isLockFileMaintenance,
|
|
constraint,
|
|
newPackageFileContent,
|
|
});
|
|
}
|