From a05cdf3a6ed2b19fdd5d22d88f2d6223c75afce2 Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 21 May 2024 16:17:45 +0800 Subject: [PATCH 1/2] fix: change pdm update strategy to eager --- lib/modules/manager/pep621/processors/pdm.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/modules/manager/pep621/processors/pdm.ts b/lib/modules/manager/pep621/processors/pdm.ts index c36311540fcd14..98afea80563e5c 100644 --- a/lib/modules/manager/pep621/processors/pdm.ts +++ b/lib/modules/manager/pep621/processors/pdm.ts @@ -17,7 +17,7 @@ import { PdmLockfileSchema, type PyProject } from '../schema'; import { depTypes, parseDependencyGroupRecord } from '../utils'; import type { PyProjectProcessor } from './types'; -const pdmUpdateCMD = 'pdm update --no-sync'; +const pdmUpdateCMD = 'pdm update --no-sync --update-eager'; export class PdmProcessor implements PyProjectProcessor { process(project: PyProject, deps: PackageDependency[]): PackageDependency[] { From 55fb9161f4b28a2432ade6f02bb307e7d10729da Mon Sep 17 00:00:00 2001 From: Xuan Hu Date: Tue, 21 May 2024 16:26:39 +0800 Subject: [PATCH 2/2] update test --- lib/modules/manager/pep621/artifacts.spec.ts | 2 +- lib/modules/manager/pep621/processors/pdm.spec.ts | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/modules/manager/pep621/artifacts.spec.ts b/lib/modules/manager/pep621/artifacts.spec.ts index c3c3b9bd1bd89d..2c586b2ecdf292 100644 --- a/lib/modules/manager/pep621/artifacts.spec.ts +++ b/lib/modules/manager/pep621/artifacts.spec.ts @@ -127,7 +127,7 @@ requires-python = "<3.9" '&& ' + 'install-tool pdm v2.5.0 ' + '&& ' + - 'pdm update --no-sync dep1' + + 'pdm update --no-sync --update-eager dep1' + '"', options: { cwd: '/tmp/github/some/repo', diff --git a/lib/modules/manager/pep621/processors/pdm.spec.ts b/lib/modules/manager/pep621/processors/pdm.spec.ts index bab8859c79c18b..f53df3c2c241a1 100644 --- a/lib/modules/manager/pep621/processors/pdm.spec.ts +++ b/lib/modules/manager/pep621/processors/pdm.spec.ts @@ -89,7 +89,7 @@ describe('modules/manager/pep621/processors/pdm', () => { '&& ' + 'install-tool pdm v2.5.0 ' + '&& ' + - 'pdm update --no-sync dep1' + + 'pdm update --no-sync --update-eager dep1' + '"', }, ]); @@ -177,16 +177,16 @@ describe('modules/manager/pep621/processors/pdm', () => { ]); expect(execSnapshots).toMatchObject([ { - cmd: 'pdm update --no-sync dep1 dep2', + cmd: 'pdm update --no-sync --update-eager dep1 dep2', }, { - cmd: 'pdm update --no-sync -G group1 dep3 dep4', + cmd: 'pdm update --no-sync --update-eager -G group1 dep3 dep4', }, { - cmd: 'pdm update --no-sync -dG group2 dep5 dep6', + cmd: 'pdm update --no-sync --update-eager -dG group2 dep5 dep6', }, { - cmd: 'pdm update --no-sync -dG group3 dep7 dep8', + cmd: 'pdm update --no-sync --update-eager -dG group3 dep7 dep8', }, ]); }); @@ -228,7 +228,7 @@ describe('modules/manager/pep621/processors/pdm', () => { ]); expect(execSnapshots).toMatchObject([ { - cmd: 'pdm update --no-sync', + cmd: 'pdm update --no-sync --update-eager', options: { cwd: '/tmp/github/some/repo/folder', },