diff --git a/paket.dependencies b/paket.dependencies index d0f05b034fb..8d34715ff03 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -40,7 +40,6 @@ group fakerunner nuget Microsoft.TestPlatform.TestHost nuget FsCheck nuget FParsec - nuget Newtonsoft.Json group fakemodule source https://api.nuget.org/v3/index.json @@ -68,4 +67,4 @@ group fakemodule nuget BlackFox.VsWhere nuget System.Runtime.Loader nuget System.Collections.Immutable - nuget System.Data.SqlClient + nuget System.Data.SqlClient \ No newline at end of file diff --git a/paket.lock b/paket.lock index 9e2609cd99b..66f2251d51d 100644 --- a/paket.lock +++ b/paket.lock @@ -1046,7 +1046,7 @@ NUGET System.Runtime.Extensions (>= 4.3) - restriction: || (&& (== net472) (< net45)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) System.Memory (4.5.5) System.Buffers (>= 4.5.1) - restriction: || (== net472) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (< netstandard1.1)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== netcoreapp2.1) (>= monotouch)) (&& (== netcoreapp2.1) (>= net461)) (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (< netstandard1.1)) (&& (== netcoreapp2.1) (< netstandard2.0)) (&& (== netcoreapp2.1) (>= xamarinios)) (&& (== netcoreapp2.1) (>= xamarinmac)) (&& (== netcoreapp2.1) (>= xamarintvos)) (&& (== netcoreapp2.1) (>= xamarinwatchos)) (== netstandard2.0) - System.Numerics.Vectors (>= 4.4) - restriction: || (&& (== net472) (< net45)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (< netcoreapp2.0)) (== netstandard2.0) + System.Numerics.Vectors (>= 4.4) - restriction: || (&& (== net472) (== net6.0)) (&& (== net472) (== netcoreapp2.1)) (&& (== net472) (< net45)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (< netcoreapp2.0)) (== netstandard2.0) System.Numerics.Vectors (>= 4.5) - restriction: || (== net472) (&& (== net6.0) (>= net461)) (&& (== netcoreapp2.1) (>= net461)) (&& (== netstandard2.0) (>= net461)) System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (== net472) (&& (== net6.0) (>= monotouch)) (&& (== net6.0) (>= net461)) (&& (== net6.0) (< netcoreapp2.0)) (&& (== net6.0) (< netcoreapp2.1)) (&& (== net6.0) (< netstandard1.1)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= uap10.1)) (&& (== net6.0) (>= xamarinios)) (&& (== net6.0) (>= xamarinmac)) (&& (== net6.0) (>= xamarintvos)) (&& (== net6.0) (>= xamarinwatchos)) (&& (== netcoreapp2.1) (>= monotouch)) (&& (== netcoreapp2.1) (>= net461)) (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (< netstandard1.1)) (&& (== netcoreapp2.1) (< netstandard2.0)) (&& (== netcoreapp2.1) (>= uap10.1)) (&& (== netcoreapp2.1) (>= xamarinios)) (&& (== netcoreapp2.1) (>= xamarinmac)) (&& (== netcoreapp2.1) (>= xamarintvos)) (&& (== netcoreapp2.1) (>= xamarinwatchos)) (== netstandard2.0) System.Net.Http (4.3.4) - restriction: || (&& (== net472) (< net461)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) @@ -1092,7 +1092,7 @@ NUGET System.Reflection.Primitives (>= 4.3) - restriction: || (&& (== net472) (< net45)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) System.Runtime (>= 4.3) - restriction: || (&& (== net472) (< net45)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) System.Reflection.Emit (4.7) - System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (== net472) (< net45)) (&& (== net472) (< netstandard1.1)) (&& (== net472) (< netstandard2.0) (>= wpa81)) (&& (== net472) (>= uap10.1)) (&& (== net6.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (== net6.0) (< netstandard1.1)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= uap10.1)) (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (< netstandard1.1)) (&& (== netcoreapp2.1) (< netstandard2.0)) (&& (== netcoreapp2.1) (>= uap10.1)) (== netstandard2.0) + System.Reflection.Emit.ILGeneration (>= 4.7) - restriction: || (&& (== net472) (== net6.0)) (&& (== net472) (== netcoreapp2.1)) (&& (== net472) (< net45)) (&& (== net472) (< netstandard1.1)) (&& (== net472) (< netstandard2.0) (>= wpa81)) (&& (== net472) (>= uap10.1)) (&& (== net6.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (== net6.0) (< netstandard1.1)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= uap10.1)) (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (< netstandard1.1)) (&& (== netcoreapp2.1) (< netstandard2.0)) (&& (== netcoreapp2.1) (>= uap10.1)) (== netstandard2.0) System.Reflection.Emit.ILGeneration (4.7) - restriction: || (&& (== net472) (== net6.0)) (&& (== net472) (== netcoreapp2.1)) (&& (== net472) (< net45)) (&& (== net472) (< netstandard1.1)) (&& (== net472) (< netstandard2.0) (>= wpa81)) (&& (== net472) (>= uap10.1)) (&& (== net6.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (== net6.0) (< netstandard1.1)) (&& (== net6.0) (< netstandard2.0)) (&& (== net6.0) (>= uap10.1)) (&& (== netcoreapp2.1) (< netcoreapp2.0)) (&& (== netcoreapp2.1) (< netstandard1.1)) (&& (== netcoreapp2.1) (< netstandard2.0)) (&& (== netcoreapp2.1) (>= uap10.1)) (== netstandard2.0) System.Reflection.Metadata (8.0) System.Collections.Immutable (>= 8.0) @@ -1178,10 +1178,10 @@ NUGET System.Security.Cryptography.OpenSsl (5.0) - restriction: || (&& (== net472) (< net45)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) System.Formats.Asn1 (>= 5.0) - restriction: || (&& (== net472) (>= netcoreapp3.0)) (== net6.0) (&& (== netcoreapp2.1) (>= netcoreapp3.0)) (&& (== netstandard2.0) (>= netcoreapp3.0)) System.Security.Cryptography.Pkcs (7.0.3) - restriction: || (&& (== net472) (>= net5.0)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) - System.Buffers (>= 4.5.1) - restriction: || (&& (== net472) (< net462)) (&& (== net6.0) (< netstandard2.1)) (== netcoreapp2.1) (== netstandard2.0) + System.Buffers (>= 4.5.1) - restriction: || (&& (== net472) (== net6.0)) (&& (== net472) (< net462)) (&& (== net6.0) (< netstandard2.1)) (== netcoreapp2.1) (== netstandard2.0) System.Formats.Asn1 (>= 7.0) - restriction: || (&& (== net472) (< net462)) (&& (== net472) (>= netstandard2.1)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) - System.Memory (>= 4.5.5) - restriction: || (&& (== net472) (< net462)) (&& (== net6.0) (< netstandard2.1)) (== netcoreapp2.1) (== netstandard2.0) - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (== net472) (< net462)) (&& (== net472) (>= netstandard2.1)) (&& (== net6.0) (< netstandard2.1)) (== netcoreapp2.1) (== netstandard2.0) + System.Memory (>= 4.5.5) - restriction: || (&& (== net472) (== net6.0)) (&& (== net472) (< net462)) (&& (== net6.0) (< netstandard2.1)) (== netcoreapp2.1) (== netstandard2.0) + System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (== net472) (== net6.0)) (&& (== net472) (< net462)) (&& (== net472) (>= netstandard2.1)) (&& (== net6.0) (< netstandard2.1)) (== netcoreapp2.1) (== netstandard2.0) System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (== net472) (< net45)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) System.Diagnostics.Debug (>= 4.3) - restriction: || (&& (== net472) (< net46)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) System.Globalization (>= 4.3) - restriction: || (&& (== net472) (< net46)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) @@ -1191,7 +1191,7 @@ NUGET System.Threading (>= 4.3) - restriction: || (&& (== net472) (< net46)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) System.Threading.Tasks (>= 4.3) - restriction: || (&& (== net472) (< net46)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) System.Security.Cryptography.ProtectedData (6.0) - System.Memory (>= 4.5.4) - restriction: || (&& (== net472) (< net461)) (== netcoreapp2.1) (== netstandard2.0) + System.Memory (>= 4.5.4) - restriction: || (&& (== net472) (== net6.0)) (&& (== net472) (< net461)) (== netcoreapp2.1) (== netstandard2.0) System.Security.Cryptography.X509Certificates (4.3.2) - restriction: || (&& (== net472) (< net45)) (&& (== net472) (< net461)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) Microsoft.NETCore.Platforms (>= 1.1) - restriction: || (&& (== net472) (< net46)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) runtime.native.System (>= 4.3) - restriction: || (&& (== net472) (< net46)) (== net6.0) (== netcoreapp2.1) (== netstandard2.0) diff --git a/src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs b/src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs index f335334e48f..72b5eb2ecdc 100644 --- a/src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs +++ b/src/test/Fake.Core.IntegrationTests/SimpleHelloWorldTests.fs @@ -5,7 +5,7 @@ open Expecto open Expecto.Flip open System open System.IO -open Newtonsoft.Json.Linq +open System.Text.Json open Fake.Core let fail s = Expect.isTrue s false @@ -216,30 +216,33 @@ let tests = |> ignProc let json = File.ReadAllText tempFile - let obj = JObject.Parse json - let targets = obj["targets"] :?> JArray - - let parseDecl (t: JToken) = - { File = string t["file"] - Line = int t["line"] - Column = int t["column"] - ErrorDetail = string t["errorDetail"] } - - let parseDep (t: JToken) = - { Name = string t["name"] - Declaration = parseDecl t["declaration"] } - - let parseArray parseItem (a: JToken) = - (a :?> JArray) |> Seq.map parseItem |> Seq.toList - - let parseTarget (t: JToken) = - { Name = string t["name"] - Declaration = parseDecl t["declaration"] - HardDependencies = parseArray parseDep t["hardDependencies"] - SoftDependencies = parseArray parseDep t["softDependencies"] - Description = string t["description"] } - - let dict = targets |> Seq.map (fun t -> let t = parseTarget t in t.Name, t) |> dict + let obj = JsonDocument.Parse(json) + let targets = obj.RootElement.GetProperty("targets") + + let parseDecl (t: JsonElement) = + { File = string (t.GetProperty("file")) + Line = t.GetProperty("line").GetInt32() + Column = t.GetProperty("column").GetInt32() + ErrorDetail = string (t.GetProperty("errorDetail")) } + + let parseDep (t: JsonElement) = + { Name = string (t.GetProperty("name")) + Declaration = parseDecl (t.GetProperty("declaration")) } + + let parseArray parseItem (a: JsonElement) = + a.EnumerateArray() |> Seq.map parseItem |> Seq.toList + + let parseTarget (t: JsonElement) = + { Name = string (t.GetProperty("name")) + Declaration = parseDecl (t.GetProperty("declaration")) + HardDependencies = parseArray parseDep (t.GetProperty("hardDependencies")) + SoftDependencies = parseArray parseDep (t.GetProperty("softDependencies")) + Description = string (t.GetProperty("description")) } + + let dict = + targets.EnumerateArray() + |> Seq.map (fun t -> let t = parseTarget t in t.Name, t) + |> dict Expect.equal "Expected correct number of targets" 4 dict.Count diff --git a/src/test/Fake.Core.IntegrationTests/paket.references b/src/test/Fake.Core.IntegrationTests/paket.references index 532ffd2745d..54a2f308858 100644 --- a/src/test/Fake.Core.IntegrationTests/paket.references +++ b/src/test/Fake.Core.IntegrationTests/paket.references @@ -1,9 +1,7 @@ group fakerunner - YoloDev.Expecto.TestSdk Microsoft.TestPlatform.TestHost FSharp.Core NETStandard.Library Expecto -FParsec -Newtonsoft.Json +FParsec \ No newline at end of file