Skip to content

Conversation

@felipecrs
Copy link
Contributor

Changes

Fixes handling of v-prefixed versions (e.g., v0.7.15) in pep440 versioning that were previously causing Invalid pep440 currentValue errors. The fix treats v-prefixed bare versions as pinned versions, bypassing the range parser which doesn't support them, even though Poetry handles them correctly.

Context

Please select one of the following:

  • This closes an existing Issue, Closes: #
  • This doesn't close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

Please select one option and, if yes, briefly describe how AI was used (e.g., code, tests, docs) and which tool(s) you used.

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non‑trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Claude Opus 4.6 was used to research the issue, implement the fix, and add tests. Manual review and testing were performed to ensure correctness.

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please select one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests, but ran on a real repository, or
  • Both unit tests + ran on a real repository

The public repository:

@github-actions github-actions bot requested a review from viceice February 6, 2026 19:43
@felipecrs felipecrs requested a review from viceice February 7, 2026 15:35
Copy link
Member

@viceice viceice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs test to get full coverage

@felipecrs felipecrs requested a review from viceice February 8, 2026 18:37
Comment on lines +49 to +56
it('handles bare version that differs from currentVersion without v-prefix', () => {
const res = getNewValue({
currentValue: '1.0.0.0',
rangeStrategy: 'auto',
newVersion: '1.2.3',
currentVersion: '1.0.0',
});
expect(res).toBe('1.2.3');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing from 4 to 3 parts?

Copy link
Contributor Author

@felipecrs felipecrs Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that's a bit weird.

But I think it would be even more weird add a .0 to the version found in the datasource.

Don't you think?

In that sense, it may make sense to also drop the v prefix.

@viceice any thoughts?

Both cases are human mistakes that Poetry tolerates, from what I can tell. Maybe Renovate should just "fix" it (i.e. drop the v prefix and drop the fourth digit).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants