Skip to content

Commit

Permalink
Update to NET 8 (#423)
Browse files Browse the repository at this point in the history
* Update to NET 8

* samples and tests run on NET 8
* packages updated

* Regenerate regexp test cases

---------

Co-authored-by: Adam Simon <[email protected]>
  • Loading branch information
lahma and adams85 authored Nov 28, 2023
1 parent 9b2487b commit 71c9677
Show file tree
Hide file tree
Showing 14 changed files with 110 additions and 109 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Generate test cases
working-directory: ./test/Esprima.Tests.Test262
run: dotnet tool restore && dotnet test262 generate && dotnet run -c Release --framework net6.0 -- --update-allow-list
run: dotnet tool restore && dotnet test262 generate && dotnet run -c Release -- --update-allow-list

- name: Test
run: dotnet test --configuration Release --logger GitHubActions
Expand All @@ -39,7 +39,7 @@ jobs:

- name: Generate test cases
working-directory: ./test/Esprima.Tests.Test262
run: dotnet tool restore && dotnet test262 generate && dotnet run -c Release --framework net6.0 -- --update-allow-list
run: dotnet tool restore && dotnet test262 generate && dotnet run -c Release -- --update-allow-list

- name: Test
run: dotnet test --configuration Release --framework net6.0 --logger GitHubActions
run: dotnet test --configuration Release --logger GitHubActions
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:

- name: Generate test cases
working-directory: ./test/Esprima.Tests.Test262
run: dotnet tool restore && dotnet test262 generate && dotnet run -c Release --framework net6.0
run: dotnet tool restore && dotnet test262 generate && dotnet run -c Release

- name: Test
run: dotnet test --configuration Release --framework net6.0 --logger GitHubActions
run: dotnet test --configuration Release --logger GitHubActions

- name: Pack with dotnet
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:

- name: Generate test cases
working-directory: ./test/Esprima.Tests.Test262
run: dotnet tool restore && dotnet test262 generate && dotnet run -c Release --framework net6.0
run: dotnet tool restore && dotnet test262 generate && dotnet run -c Release

- name: Test
run: dotnet test --configuration Release --logger GitHubActions
Expand Down
28 changes: 14 additions & 14 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="BenchmarkDotNet" Version="0.13.9" />
<PackageVersion Include="DiffEngine" Version="12.4.0" />
<PackageVersion Include="BenchmarkDotNet" Version="0.13.10" />
<PackageVersion Include="DiffEngine" Version="13.0.1" />
<PackageVersion Include="McMaster.Extensions.CommandLineUtils" Version="4.1.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.7.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.8.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NUnit" Version="3.13.3" />
<PackageVersion Include="NUnit" Version="3.14.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageVersion Include="PolySharp" Version="1.13.2" />
<PackageVersion Include="Spectre.Console" Version="0.47.0" />
<PackageVersion Include="System.Memory" Version="4.5.4" />
<PackageVersion Include="System.Text.Json" Version="7.0.3" />
<PackageVersion Include="Spectre.Console" Version="0.48.0" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="System.Text.Json" Version="8.0.0" />
<PackageVersion Include="Test262Harness" Version="0.0.22" />
<PackageVersion Include="UnicodeInformation" Version="2.7.1" />
<PackageVersion Include="Verify.SourceGenerators" Version="2.1.0" />
<PackageVersion Include="Verify.XUnit" Version="20.6.0" />
<PackageVersion Include="xunit" Version="2.5.3" />
<PackageVersion Include="xunit.analyzers" Version="1.4.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.3" />
<PackageVersion Include="Verify.SourceGenerators" Version="2.2.0" />
<PackageVersion Include="Verify.XUnit" Version="22.5.0" />
<PackageVersion Include="xunit" Version="2.6.2" />
<PackageVersion Include="xunit.analyzers" Version="1.6.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.5.4" />
</ItemGroup>
<ItemGroup>
<GlobalPackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<GlobalPackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
</ItemGroup>
</Project>
6 changes: 0 additions & 6 deletions global.json

This file was deleted.

2 changes: 1 addition & 1 deletion samples/Esprima.Benchmark/Esprima.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<AssemblyName>Esprima.Benchmark</AssemblyName>
<OutputType>Exe</OutputType>
<IsPackable>false</IsPackable>
<TargetFrameworks>net462;net6.0</TargetFrameworks>
<TargetFrameworks>net462;net8.0</TargetFrameworks>
<LangVersion>latest</LangVersion>
<AssemblyOriginatorKeyFile>../../src/Esprima.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
Expand Down
2 changes: 1 addition & 1 deletion samples/Esprima.Sample/Esprima.Sample.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<AssemblyName>esprimatest</AssemblyName>
<RootNamespace>Esprima.Sample</RootNamespace>
<OutputType>Exe</OutputType>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
Expand Down
2 changes: 1 addition & 1 deletion test/Esprima.Tests.Test262/Esprima.Tests.Test262.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<GenerateProgramFile>false</GenerateProgramFile>
<GeneratedTestSuiteDir>Generated</GeneratedTestSuiteDir>
Expand Down
2 changes: 1 addition & 1 deletion test/Esprima.Tests/Esprima.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net6.0</TargetFrameworks>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks Condition="'$(OS)' == 'Windows_NT'">net462;$(TargetFrameworks)</TargetFrameworks>
<AssemblyName>Esprima.Tests</AssemblyName>
<PackageId>Esprima.Tests</PackageId>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<PropertyGroup>
<UseArtifactsOutput>false</UseArtifactsOutput>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<AssemblyName>Esprima.Tests</AssemblyName>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<AssemblyOriginatorKeyFile>..\..\..\..\src\Esprima.snk</AssemblyOriginatorKeyFile>
Expand Down
152 changes: 76 additions & 76 deletions test/Esprima.Tests/Fixtures.RegExp/testcases.txt

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion test/Esprima.Tests/JavaScriptParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public void CanHandleDeepNestingWithoutStackOverflow()
#if DEBUG
const int Depth = 205;
#else
const int Depth = 450;
const int Depth = 385;
#endif
var input = $"if ({new string('(', Depth)}true{new string(')', Depth)}) {{ }}";
parser.ParseScript(input);
Expand Down

0 comments on commit 71c9677

Please sign in to comment.