File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed
tests/Paket.Tests/DependenciesFile Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -326,6 +326,8 @@ module DependenciesFileParser =
326326 let setting =
327327 match trimmed.Replace( " :" , " " ) .Trim() with
328328 | String.EqualsIC " max" -> Some ResolverStrategy.Max
329+ | String.EqualsIC " latest-patch" -> Some ResolverStrategy.LatestPatch
330+ | String.EqualsIC " latest-minor" -> Some ResolverStrategy.LatestMinor
329331 | String.EqualsIC " min" -> Some ResolverStrategy.Min
330332 | _ -> None
331333
Original file line number Diff line number Diff line change @@ -389,4 +389,6 @@ type VersionRequirement =
389389[<RequireQualifiedAccess>]
390390type ResolverStrategy =
391391| Max
392- | Min
392+ | LatestPatch
393+ | LatestMinor
394+ | Min
Original file line number Diff line number Diff line change @@ -1086,6 +1086,15 @@ let ``should read config with min and max strategy``() =
10861086 cfg.Groups.[ GroupName " Test" ]. Options.ResolverStrategyForTransitives |> shouldEqual ( Some ResolverStrategy.Max)
10871087
10881088 cfg.Groups.[ Constants.MainDependencyGroup]. Sources |> shouldEqual [ PackageSource.NuGetV2Source " http://www.nuget.org/api/v2" ]
1089+
1090+
1091+ [<Test>]
1092+ let ``should read config with latest - patch and latest - minor strategy`` () =
1093+ let cfg = DependenciesFile.FromSource( strategyConfig " latest-patch" " latest-minor" )
1094+ cfg.Groups.[ Constants.MainDependencyGroup]. Options.ResolverStrategyForTransitives |> shouldEqual ( Some ResolverStrategy.LatestPatch)
1095+ cfg.Groups.[ GroupName " Test" ]. Options.ResolverStrategyForTransitives |> shouldEqual ( Some ResolverStrategy.LatestMinor)
1096+
1097+ cfg.Groups.[ Constants.MainDependencyGroup]. Sources |> shouldEqual [ PackageSource.NuGetV2Source " http://www.nuget.org/api/v2" ]
10891098
10901099let noStrategyConfig = sprintf """
10911100strategy %s
You can’t perform that action at this time.
0 commit comments