Skip to content

Commit 991cc45

Browse files
committed
feat: Add Semantic Versioning (SemVer) support for dependency resolution (#11)
Implement automatic version resolution based on Semantic Versioning 2.0.0 rules, eliminating the need for explicit API Compatible Tags lists. Key features: - New "SemVer" dependency resolution mode with automatic compatibility checking - Version field for specifying minimum version requirements (e.g., "2.1.0") - Custom version tag regex support for non-standard tag formats - Intelligent conflict detection across the entire dependency tree - Mixed mode support (Agnostic and SemVer in same tree) - Proper handling of 0.x.y versions per SemVer specification Configuration example: { "Dependency Resolution": "SemVer", "Version": "2.1.0", "Version Regex": "^v(\\d+)\\.(\\d+)\\.(\\d+)$" // Optional } The implementation selects the lowest compatible version for predictability and provides detailed conflict reporting when version requirements cannot be satisfied. Maintains full backward compatibility with existing Agnostic mode.
1 parent 80ab69e commit 991cc45

10 files changed

+1122
-269
lines changed

CHANGELOG.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,43 @@ All notable changes to LsiGitCheckout will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [7.0.0] - 2025-01-27
9+
10+
### Added
11+
- **Semantic Versioning (SemVer) Support** - New dependency resolution mode based on SemVer 2.0.0 rules
12+
- Automatic version compatibility resolution without explicit API Compatible Tags lists
13+
- `"Dependency Resolution"` field to specify resolution mode (`"Agnostic"` or `"SemVer"`)
14+
- `"Version"` field for specifying SemVer requirements (e.g., `"2.1.0"`)
15+
- `"Version Regex"` field for custom version tag patterns (optional)
16+
- Intelligent version selection (chooses lowest compatible version)
17+
- Comprehensive conflict detection and reporting across the dependency tree
18+
- Support for 0.x.y version handling per SemVer 2.0.0 specification
19+
20+
- **Mixed Mode Support** - Ability to use both Agnostic and SemVer repositories in the same dependency tree
21+
- Each repository's resolution mode is immutable once established
22+
- Seamless integration between different resolution strategies
23+
24+
- **Enhanced Version Parsing**
25+
- One-time tag parsing with caching for performance
26+
- Support for custom version tag formats via regex patterns
27+
- Built-in validation for regex patterns (requires 3 capture groups)
28+
29+
- **Improved Conflict Reporting**
30+
- Detailed conflict messages showing all requestors and their requirements
31+
- Clear indication of which versions would satisfy each requirement
32+
- Enhanced error context with full stack traces for debugging
33+
34+
### Changed
35+
- Repository dictionary now tracks dependency resolution mode for each repository
36+
- Version information stored separately from tag information for SemVer repositories
37+
- Error handling enhanced to provide better context for SemVer conflicts
38+
39+
### Technical Details
40+
- New functions: `Test-SemVerCompatibility`, `Parse-RepositoryVersions`, `Get-CompatibleSemVersions`, `Get-SemVersionIntersection`, `Format-SemVersion`, `Update-SemVerRepository`
41+
- Modified `Update-RepositoryDictionary` to handle both Agnostic and SemVer modes
42+
- Extended repository dictionary structure to include SemVer-specific fields
43+
- Maintained backward compatibility with existing Agnostic mode configurations
44+
845
## [6.2.1] - 2025-01-27
946

1047
### Added

0 commit comments

Comments
 (0)