Skip to content

Commit

Permalink
Remove explicit Newtonsoft.Json package reference (#1799)
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeAlhayek authored Mar 8, 2024
1 parent 107f543 commit a506d91
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 13 deletions.
1 change: 0 additions & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="8.0.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageVersion Include="MongoDB.Bson.signed" Version="2.19.0" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NiL.JS" Version="2.5.1677" />
<PackageVersion Include="NodaTime" Version="3.1.9" />
<PackageVersion Include="NUnit" Version="4.0.1" />
Expand Down
1 change: 0 additions & 1 deletion Jint.Benchmark/Jint.Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="Jurassic" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NiL.JS" />
<PackageReference Include="YantraJS.Core" />
</ItemGroup>
Expand Down
14 changes: 5 additions & 9 deletions Jint.Benchmark/UncacheableExpressionsBenchmark.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System.Text;
using System.Text.Json;
using BenchmarkDotNet.Attributes;
using Jint.Native;
using Newtonsoft.Json;

namespace Jint.Benchmark;

Expand Down Expand Up @@ -64,14 +64,10 @@ public void Setup()

using (var stream = new MemoryStream())
{
using (var writer = new StreamWriter(stream))
{
JsonSerializer.CreateDefault().Serialize(writer, doc);
writer.Flush();
JsonSerializer.Serialize(stream, doc);

var targetObjectJson = Encoding.UTF8.GetString(stream.ToArray());
targetObject = $"var d = {targetObjectJson};";
}
var targetObjectJson = Encoding.UTF8.GetString(stream.ToArray());
targetObject = $"var d = {targetObjectJson};";
}

CreateEngine(Arrow ? ArrowFunctionScript : NonArrowFunctionScript);
Expand Down Expand Up @@ -107,6 +103,6 @@ private void CreateEngine(string script)
engine = new Engine(InitializeEngine);
engine.Execute(script);
engine.Execute(targetObject);
targetJsObject = new[] {engine.GetValue("d")};
targetJsObject = new[] { engine.GetValue("d") };
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
<PackageReference Include="Flurl.Http.Signed" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MongoDB.Bson.signed" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="NodaTime" />
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" />
<PackageReference Include="System.Text.Json" />
Expand Down
1 change: 0 additions & 1 deletion Jint.Tests/Jint.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
<PackageReference Include="Microsoft.Extensions.DependencyInjection" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="MongoDB.Bson.signed" />
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="System.Text.Json" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio" />
Expand Down

0 comments on commit a506d91

Please sign in to comment.