Skip to content

Version sorting #1045

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 7, 2025
Merged

Version sorting #1045

merged 3 commits into from
Jul 7, 2025

Conversation

lukaszlenart
Copy link
Member

@lukaszlenart lukaszlenart commented Jul 7, 2025

Closes #1009

lukaszlenart and others added 3 commits July 4, 2025 10:23
Fixes incorrect version resolution when multiple versions are returned
from Sonatype Central and Maven Central APIs. Previously, the service
would fail to correctly identify the latest version due to:

1. Array access bug: accessing sorted.docs[0] instead of sorted[0]
2. Inconsistent test mocks between Maven Central and Sonatype Central
3. Missing proper Maven semantic version comparison

Changes:
- Extract ComparableVersion class to dedicated module with proper Maven version ordering
- Fix version array access after sorting in solrsearch.ts
- Update test mocks to match actual API request URLs
- Implement proper Maven version comparison (alpha < beta < rc < release < sp)
- Use kebab-case naming convention for new files

Closes #1009

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Add CLAUDE.md with comprehensive development rules and technical specifications
- Include testing guidelines, code change procedures, and debugging instructions
- Document Maven version comparison logic and API specifications
- Add file naming conventions (kebab-case for consistency)
- Update .gitignore to exclude .claude folder from version control

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@lukaszlenart lukaszlenart force-pushed the fix/version-sorting branch from 1b61435 to 4470828 Compare July 7, 2025 08:59
@lukaszlenart lukaszlenart marked this pull request as ready for review July 7, 2025 09:00
@lukaszlenart lukaszlenart merged commit 77279bc into master Jul 7, 2025
3 checks passed
@lukaszlenart lukaszlenart deleted the fix/version-sorting branch July 7, 2025 09:00
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.

sonatype-central: latest version not properly resolved
1 participant