Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cfe1e49
Add package manager command smoke tests
edvilme Jul 28, 2026
b18db3d
Adopt package manager command classes
edvilme Jul 28, 2026
a135bc8
Parse pep440 versions
edvilme Jul 28, 2026
e292a5d
Address #1686 review comments
edvilme Jul 31, 2026
d82423c
Add parametrized package manager roundtrip integration test
edvilme Jul 31, 2026
dfa4f9a
test: exercise getPackageAvailableVersions in roundtrip
edvilme Jul 31, 2026
fb1bd18
test: skip roundtrip for managers that cannot install the test package
edvilme Aug 2, 2026
01575b1
test: use flask (universal + transitive deps) for package-manager rou…
edvilme Aug 3, 2026
7e9c7a3
test: restrict package roundtrip to isolated environments
edvilme Aug 6, 2026
0f2ac6f
fix: preserve Poetry command working directory
edvilme Aug 6, 2026
e4c7f10
fix: reject pip management for Python 2
edvilme Aug 6, 2026
39f8559
test: restore package command parser coverage
edvilme Aug 6, 2026
29c2d41
fix: address remaining package manager review feedback
edvilme Aug 6, 2026
0a8c3ad
test: use disposable package manager environments
edvilme Aug 7, 2026
d59560d
test: remove package manager tests from refactor
edvilme Aug 12, 2026
9edd9ef
Merge branch 'main' into package-manager-command-adoption
edvilme Aug 17, 2026
29c5b74
Merge origin/main into package-manager-command-adoption
edvilme Aug 18, 2026
5053e1a
Merge branch 'main' into package-manager-command-adoption
edvilme Aug 18, 2026
4b4b292
Address package manager review feedback
edvilme Aug 18, 2026
d2c0993
Preserve Poetry package manager behavior
edvilme Aug 18, 2026
850bc29
Merge branch 'main' into package-manager-command-adoption
edvilme Aug 18, 2026
b2eff5a
Fix Conda package list error caching
edvilme Aug 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/common/inlineScript/cacheKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Licensed under the MIT License.

import { createHash } from 'crypto';
import { normalizePackageName } from '../../managers/builtin/utils';
import { normalizePackageName } from '../../managers/common/packageUtils';
import { normalizePath } from '../utils/pathUtils';

/** Length, in hex chars, of the cache key returned by {@link computeCacheKey}. 16 = 64 bits of SHA-256; fixed-length and filesystem-safe. */
Expand Down
31 changes: 18 additions & 13 deletions src/managers/builtin/commands/availableVersions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,26 @@ import type { Pep440Version } from '@renovatebot/pep440';
import { AvailableVersionsCommand, type AvailableVersionsExecuteArgs } from '../../base/commands/index';
import { runPython, runUV } from '../helpers';

export interface PipAvailableVersionsExecuteArgs extends AvailableVersionsExecuteArgs {
useJson?: boolean;
}

/**
* Pip available versions command.
* Parsed command: `python -m pip index versions <package> --json --python-version <version>`
* Parsed command: `python -m pip index versions <package> [--json] --python-version <version>`
* Official documentation: https://pip.pypa.io/en/stable/cli/pip_index/
*/
export class PipAvailableVersionsCommand extends AvailableVersionsCommand {
protected buildCommand(executeArgs: AvailableVersionsExecuteArgs): string[] {
return [
'-m',
'pip',
'index',
'versions',
executeArgs.packageName,
'--json',
'--python-version',
executeArgs.pythonVersion,
];
protected buildCommand(executeArgs: PipAvailableVersionsExecuteArgs): string[] {
const args = ['-m', 'pip', 'index', 'versions', executeArgs.packageName];
if (executeArgs.useJson !== false) {
args.push('--json');
}
args.push('--python-version', executeArgs.pythonVersion);
return args;
}

async execute(executeArgs: AvailableVersionsExecuteArgs): Promise<Pep440Version[]> {
async execute(executeArgs: PipAvailableVersionsExecuteArgs): Promise<Pep440Version[]> {
const output = await runPython(
this.pythonExecutable,
this.buildCommand(executeArgs),
Expand All @@ -30,6 +30,11 @@ export class PipAvailableVersionsCommand extends AvailableVersionsCommand {
executeArgs.cancellationToken,
this.timeout,
);
if (executeArgs.useJson === false) {
const match = output.match(/^Available versions:\s*(.+)$/im);
return this.parseVersions(match?.[1].split(',') ?? [], executeArgs.includePrerelease);
}

const match = output.match(/{[\s\S]*}/);
if (!match) {
return [];
Expand Down
2 changes: 1 addition & 1 deletion src/managers/builtin/commands/listDirectNames.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ListDirectNamesCommand, type BaseExecuteArgs } from '../../base/commands/index';
import { normalizePackageName } from '../../common/packageUtils';
import { runPython, runUV } from '../helpers';
import { normalizePackageName } from '../utils';

/**
* Pip list direct names command.
Expand Down
34 changes: 0 additions & 34 deletions src/managers/builtin/pipListUtils.ts

This file was deleted.

Loading
Loading