Skip to content

Commit d5ccfc3

Browse files
committed
#192 - migrate to stable System.CommandLine 2.0.0 and remove unused NuGet.config file
1 parent 70c1c55 commit d5ccfc3

File tree

5 files changed

+8
-27
lines changed

5 files changed

+8
-27
lines changed

Directory.Packages.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageVersion Include="Microsoft.Extensions.Logging" Version="9.0.9" />
1111
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="9.0.9" />
1212
<PackageVersion Include="Microsoft.Extensions.Options" Version="9.0.9" />
13-
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.24126.1" />
13+
<PackageVersion Include="System.CommandLine" Version="2.0.0" />
1414
<PackageVersion Include="System.IO.Abstractions" Version="22.0.16" />
1515
<PackageVersion Include="Visitor.NET" Version="4.2.0" />
1616
<PackageVersion Include="Visitor.NET.AutoVisitableGen" Version="1.5.2" />

ExtendedJavaScriptSubset.slnx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Solution>
22
<Folder Name="/Benchmarks/">
3-
<Project Path="benchmarks\HydraScript.Benchmarks\HydraScript.Benchmarks.csproj" Type="Classic C#" />
3+
<Project Path="benchmarks\HydraScript.Benchmarks\HydraScript.Benchmarks.csproj" Type="C#" />
44
<File Path="benchmarks\Readme.md" />
55
</Folder>
66
<Folder Name="/SolutionItems/">
@@ -12,7 +12,6 @@
1212
<File Path="GitVersion.yml" />
1313
<File Path="hydrascript-logo.jpg" />
1414
<File Path="LICENSE" />
15-
<File Path="NuGet.config" />
1615
<File Path="Readme.md" />
1716
<File Path="SECURITY.md" />
1817
</Folder>

NuGet.config

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/HydraScript/ExecuteCommand.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,24 @@
44
namespace HydraScript;
55

66
[ExcludeFromCodeCoverage]
7-
internal class ExecuteCommand : CliRootCommand
7+
internal class ExecuteCommand : RootCommand
88
{
99
internal ExecuteCommand() : base("HydraScript interpreter")
1010
{
11-
PathArgument = new CliArgument<FileInfo>(name: "path")
11+
PathArgument = new Argument<FileInfo>(name: "path")
1212
{
1313
Description = "Path to input file"
1414
};
1515
Add(PathArgument);
1616

17-
DumpOption = new CliOption<bool>(name: "--dump", aliases: ["-d", "/d"])
17+
DumpOption = new Option<bool>(name: "--dump", aliases: ["-d", "/d"])
1818
{
1919
Description = "Show dump data of interpreter",
2020
DefaultValueFactory = _ => false
2121
};
2222
Add(DumpOption);
2323
}
2424

25-
internal CliArgument<FileInfo> PathArgument { get; }
26-
internal CliOption<bool> DumpOption { get; }
25+
internal Argument<FileInfo> PathArgument { get; }
26+
internal Option<bool> DumpOption { get; }
2727
}

src/HydraScript/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
using Microsoft.Extensions.Logging;
77
using ZLogger;
88

9-
return CliParser.Parse(GetCommand(), args).Invoke();
9+
return CommandLineParser.Parse(GetCommand(), args).Invoke();
1010

1111
[ExcludeFromCodeCoverage]
1212
internal static partial class Program

0 commit comments

Comments
 (0)