feat(pip-compile): handle --strip-extras argument (#18486)

This commit is contained in:
Mathieu Kniewallner 2022-10-23 19:39:24 +02:00 committed by GitHub
parent 96bb97914b
commit e2a42d3b2b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 3 deletions

View file

@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
#
# pip-compile --allow-unsafe --generate-hashes --no-emit-index-url --output-file=requirements.txt requirements.in
# pip-compile --allow-unsafe --generate-hashes --no-emit-index-url --strip-extras --output-file=requirements.txt requirements.in
#
attrs==21.2.0 \
--hash=sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1 \

View file

@ -200,7 +200,7 @@ describe('modules/manager/pip-compile/artifacts', () => {
]);
});
it('uses pipenv version from config', async () => {
it('uses pip-compile version from config', async () => {
GlobalConfig.set(dockerAdminConfig);
const execSnapshots = mockExecAll();
git.getRepoStatus.mockResolvedValue({
@ -263,7 +263,7 @@ describe('modules/manager/pip-compile/artifacts', () => {
'subdir/requirements.txt'
)
).toBe(
'pip-compile --allow-unsafe --generate-hashes --no-emit-index-url --output-file=requirements.txt requirements.in'
'pip-compile --allow-unsafe --generate-hashes --no-emit-index-url --strip-extras --output-file=requirements.txt requirements.in'
);
});

View file

@ -52,6 +52,7 @@ const allowedPipArguments = [
'--allow-unsafe',
'--generate-hashes',
'--no-emit-index-url',
'--strip-extras',
];
export function constructPipCompileCmd(

View file

@ -47,3 +47,4 @@ Renovate reads the `requirements.txt` file and extracts these `pip-compile` argu
- `--generate-hashes`
- `--allow-unsafe`
- `--no-emit-index-url`
- `--strip-extras`