Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
renovate
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GitHub Mirror
Renovate Bot
renovate
Commits
ca80f6c2
Unverified
Commit
ca80f6c2
authored
1 year ago
by
Johannes Feichtner
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
feat(manager/pep621): set currentVersion field for exact dependency versions (#27061)
parent
b2bc5919
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/modules/manager/pep621/extract.spec.ts
+6
-0
6 additions, 0 deletions
lib/modules/manager/pep621/extract.spec.ts
lib/modules/manager/pep621/utils.ts
+4
-0
4 additions, 0 deletions
lib/modules/manager/pep621/utils.ts
with
10 additions
and
0 deletions
lib/modules/manager/pep621/extract.spec.ts
+
6
−
0
View file @
ca80f6c2
...
...
@@ -62,6 +62,7 @@ describe('modules/manager/pep621/extract', () => {
datasource
:
'
pypi
'
,
depType
:
'
project.dependencies
'
,
currentValue
:
'
==20.0.0
'
,
currentVersion
:
'
20.0.0
'
,
},
{
packageName
:
'
pyproject-hooks
'
,
...
...
@@ -276,6 +277,7 @@ describe('modules/manager/pep621/extract', () => {
expect
(
result
?.
deps
).
toEqual
([
{
currentValue
:
'
==2.30.0
'
,
currentVersion
:
'
2.30.0
'
,
datasource
:
'
pypi
'
,
depName
:
'
requests
'
,
depType
:
'
project.dependencies
'
,
...
...
@@ -290,6 +292,7 @@ describe('modules/manager/pep621/extract', () => {
},
{
currentValue
:
'
==6.5
'
,
currentVersion
:
'
6.5
'
,
datasource
:
'
pypi
'
,
depName
:
'
coverage
'
,
depType
:
'
tool.hatch.envs.default
'
,
...
...
@@ -347,6 +350,7 @@ describe('modules/manager/pep621/extract', () => {
expect
(
result
?.
deps
).
toEqual
([
{
currentValue
:
'
==2.30.0
'
,
currentVersion
:
'
2.30.0
'
,
datasource
:
'
pypi
'
,
depName
:
'
requests
'
,
depType
:
'
project.dependencies
'
,
...
...
@@ -354,6 +358,7 @@ describe('modules/manager/pep621/extract', () => {
},
{
currentValue
:
'
==1.18.0
'
,
currentVersion
:
'
1.18.0
'
,
datasource
:
'
pypi
'
,
depName
:
'
hatchling
'
,
depType
:
'
build-system.requires
'
,
...
...
@@ -361,6 +366,7 @@ describe('modules/manager/pep621/extract', () => {
},
{
currentValue
:
'
==69.0.3
'
,
currentVersion
:
'
69.0.3
'
,
datasource
:
'
pypi
'
,
depName
:
'
setuptools
'
,
depType
:
'
build-system.requires
'
,
...
...
This diff is collapsed.
Click to expand it.
lib/modules/manager/pep621/utils.ts
+
4
−
0
View file @
ca80f6c2
...
...
@@ -70,6 +70,10 @@ export function pep508ToPackageDependency(
dep
.
skipReason
=
'
unspecified-version
'
;
}
else
{
dep
.
currentValue
=
parsed
.
currentValue
;
if
(
parsed
.
currentValue
.
startsWith
(
'
==
'
))
{
dep
.
currentVersion
=
parsed
.
currentValue
.
replace
(
regEx
(
/^==
\s
*/
),
''
);
}
}
return
dep
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment