renovate
renovate copied to clipboard
feat(nuget): Support version ranges
Changes
Reimplement nuget versioning with support for ranges.
Context
- Ref: #26140
Documentation (please check one with an [x])
- [ ] I have updated the documentation, or
- [x] No documentation update is required
How I've tested my work (please select one)
I have verified these changes via:
- [x] 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
Results from log:
{
"datasource": "nuget",
"depType": "nuget",
"depName": "Microsoft.Extensions.Configuration",
"currentValue": "6.0.*",
"updates": [
{
"bucket": "major",
"newVersion": "8.0.0",
"newValue": "8.0.*",
"releaseTimestamp": "2023-11-14T13:22:38.957Z",
"newMajor": 8,
"newMinor": 0,
"updateType": "major",
"isRange": true,
"branchName": "renovate/major-dotnet-monorepo"
}
],
"packageName": "Microsoft.Extensions.Configuration",
"versioning": "nuget",
"warnings": [],
"sourceUrl": "https://github.com/dotnet/runtime",
"registryUrl": "https://api.nuget.org/v3/index.json",
"homepage": "https://dot.net/",
"currentVersion": "6.0.1",
"isSingleVersion": false
}
@zharinov @viceice @rarkins would be great to complete this!
Will it respect the exact version? [2.3.1]
We need to port relevant tests from Nuget:
- [x] FloatingRangeTests.cs
- [x] NuGetVersionTest.cs
- [ ] SemVer201SpecTests.cs
- [ ] SemanticVersionConverterTests.cs
- [ ] SemanticVersionTests.cs
- [ ] VersionComparerTests.cs
- [ ] VersionExtensionsTests.cs
- [ ] VersionFormatterTests.cs
- [ ] VersionParsingTests.cs
- [ ] VersionRangeComparerTests.cs
- [ ] VersionRangeFloatParsingTests.cs
- [ ] VersionRangeOperationTests.cs
- [ ] VersionRangeTests.cs
Once this is done, we need to figure out the failed ones.
Don't close, I'll continue
isn't
1.2.3.4.5
also a valid nuget version? 🤔
no
https://github.com/NuGet/NuGet.Client/blob/46f80a3f1a83f3c5f33a20fa9fb72871e1e2d4eb/test/NuGet.Core.Tests/NuGet.Versioning.Test/NuGetVersionTest.cs#L111
There is a tool for verification:
https://nugettools.azurewebsites.net/6.11.0-preview.2/parse-version?version=1.2.3.4.5
@rarkins please review or approve