From 558b8cbbc4434ace79f700dc6dc6cb7fca219859 Mon Sep 17 00:00:00 2001 From: Martin Tracey Date: Wed, 15 Nov 2023 04:08:42 -0800 Subject: [PATCH 01/12] move sln file up to project root --- .github/workflows/build-and-test.yaml | 2 +- ...ch.sln => SystemTextJson.JsonDiffPatch.sln | 48 +++++++++---------- 2 files changed, 25 insertions(+), 25 deletions(-) rename src/SystemTextJson.JsonDiffPatch.sln => SystemTextJson.JsonDiffPatch.sln (69%) diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 0edd1ac..29f0e84 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -5,7 +5,7 @@ on: pull_request: branches: [ main ] env: - JsonDiffPatchSolutionPath: src/SystemTextJson.JsonDiffPatch.sln + JsonDiffPatchSolutionPath: ./SystemTextJson.JsonDiffPatch.sln jobs: build: strategy: diff --git a/src/SystemTextJson.JsonDiffPatch.sln b/SystemTextJson.JsonDiffPatch.sln similarity index 69% rename from src/SystemTextJson.JsonDiffPatch.sln rename to SystemTextJson.JsonDiffPatch.sln index 0d39a41..4377ac3 100644 --- a/src/SystemTextJson.JsonDiffPatch.sln +++ b/SystemTextJson.JsonDiffPatch.sln @@ -1,27 +1,27 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31829.152 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34309.116 MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch", "SystemTextJson.JsonDiffPatch\SystemTextJson.JsonDiffPatch.csproj", "{2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch", "src\SystemTextJson.JsonDiffPatch\SystemTextJson.JsonDiffPatch.csproj", "{2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}" EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{AE524BA2-D5E2-4D5F-BC95-9AA064D46234}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.Xunit", "src\SystemTextJson.JsonDiffPatch.Xunit\SystemTextJson.JsonDiffPatch.Xunit.csproj", "{8CC0FE2E-297C-4427-8B66-B50E867823C3}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.UnitTests", "..\test\SystemTextJson.JsonDiffPatch.UnitTests\SystemTextJson.JsonDiffPatch.UnitTests.csproj", "{832E60B1-0225-48B3-9AAD-638A0F5AA15E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.MSTest", "src\SystemTextJson.JsonDiffPatch.MSTest\SystemTextJson.JsonDiffPatch.MSTest.csproj", "{B2E4B8B6-9F55-4C99-8968-43144BEB809B}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.Benchmark", "..\test\SystemTextJson.JsonDiffPatch.Benchmark\SystemTextJson.JsonDiffPatch.Benchmark.csproj", "{0F173CC9-EA04-4243-A506-E2C59C905A5E}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.NUnit", "src\SystemTextJson.JsonDiffPatch.NUnit\SystemTextJson.JsonDiffPatch.NUnit.csproj", "{194DF788-2210-444E-826B-C3A6C10F14F7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.Xunit", "SystemTextJson.JsonDiffPatch.Xunit\SystemTextJson.JsonDiffPatch.Xunit.csproj", "{8CC0FE2E-297C-4427-8B66-B50E867823C3}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{AE524BA2-D5E2-4D5F-BC95-9AA064D46234}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.MSTest", "SystemTextJson.JsonDiffPatch.MSTest\SystemTextJson.JsonDiffPatch.MSTest.csproj", "{B2E4B8B6-9F55-4C99-8968-43144BEB809B}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.UnitTests", "test\SystemTextJson.JsonDiffPatch.UnitTests\SystemTextJson.JsonDiffPatch.UnitTests.csproj", "{832E60B1-0225-48B3-9AAD-638A0F5AA15E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.Xunit.Tests", "..\test\SystemTextJson.JsonDiffPatch.Xunit.Tests\SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj", "{5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.Benchmark", "test\SystemTextJson.JsonDiffPatch.Benchmark\SystemTextJson.JsonDiffPatch.Benchmark.csproj", "{0F173CC9-EA04-4243-A506-E2C59C905A5E}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.MSTest.Tests", "..\test\SystemTextJson.JsonDiffPatch.MSTest.Tests\SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj", "{B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.Xunit.Tests", "test\SystemTextJson.JsonDiffPatch.Xunit.Tests\SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj", "{5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.NUnit", "SystemTextJson.JsonDiffPatch.NUnit\SystemTextJson.JsonDiffPatch.NUnit.csproj", "{194DF788-2210-444E-826B-C3A6C10F14F7}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.MSTest.Tests", "test\SystemTextJson.JsonDiffPatch.MSTest.Tests\SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj", "{B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SystemTextJson.JsonDiffPatch.NUnit.Tests", "..\test\SystemTextJson.JsonDiffPatch.NUnit.Tests\SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj", "{7FAB51DE-6ED6-4CCA-887C-DB8274237E92}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.NUnit.Tests", "test\SystemTextJson.JsonDiffPatch.NUnit.Tests\SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj", "{7FAB51DE-6ED6-4CCA-887C-DB8274237E92}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -33,14 +33,6 @@ Global {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}.Debug|Any CPU.Build.0 = Debug|Any CPU {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}.Release|Any CPU.ActiveCfg = Release|Any CPU {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}.Release|Any CPU.Build.0 = Release|Any CPU - {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Release|Any CPU.Build.0 = Release|Any CPU - {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Release|Any CPU.Build.0 = Release|Any CPU {8CC0FE2E-297C-4427-8B66-B50E867823C3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {8CC0FE2E-297C-4427-8B66-B50E867823C3}.Debug|Any CPU.Build.0 = Debug|Any CPU {8CC0FE2E-297C-4427-8B66-B50E867823C3}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -49,6 +41,18 @@ Global {B2E4B8B6-9F55-4C99-8968-43144BEB809B}.Debug|Any CPU.Build.0 = Debug|Any CPU {B2E4B8B6-9F55-4C99-8968-43144BEB809B}.Release|Any CPU.ActiveCfg = Release|Any CPU {B2E4B8B6-9F55-4C99-8968-43144BEB809B}.Release|Any CPU.Build.0 = Release|Any CPU + {194DF788-2210-444E-826B-C3A6C10F14F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {194DF788-2210-444E-826B-C3A6C10F14F7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {194DF788-2210-444E-826B-C3A6C10F14F7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {194DF788-2210-444E-826B-C3A6C10F14F7}.Release|Any CPU.Build.0 = Release|Any CPU + {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {832E60B1-0225-48B3-9AAD-638A0F5AA15E}.Release|Any CPU.Build.0 = Release|Any CPU + {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0F173CC9-EA04-4243-A506-E2C59C905A5E}.Release|Any CPU.Build.0 = Release|Any CPU {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}.Debug|Any CPU.Build.0 = Debug|Any CPU {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7}.Release|Any CPU.ActiveCfg = Release|Any CPU @@ -57,10 +61,6 @@ Global {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}.Debug|Any CPU.Build.0 = Debug|Any CPU {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}.Release|Any CPU.ActiveCfg = Release|Any CPU {B3AF3E1B-7FAE-4105-97DD-B7635CD2A6CD}.Release|Any CPU.Build.0 = Release|Any CPU - {194DF788-2210-444E-826B-C3A6C10F14F7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {194DF788-2210-444E-826B-C3A6C10F14F7}.Debug|Any CPU.Build.0 = Debug|Any CPU - {194DF788-2210-444E-826B-C3A6C10F14F7}.Release|Any CPU.ActiveCfg = Release|Any CPU - {194DF788-2210-444E-826B-C3A6C10F14F7}.Release|Any CPU.Build.0 = Release|Any CPU {7FAB51DE-6ED6-4CCA-887C-DB8274237E92}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {7FAB51DE-6ED6-4CCA-887C-DB8274237E92}.Debug|Any CPU.Build.0 = Debug|Any CPU {7FAB51DE-6ED6-4CCA-887C-DB8274237E92}.Release|Any CPU.ActiveCfg = Release|Any CPU From f616e418c2ae1c76910a74bdc2b7013131af24eb Mon Sep 17 00:00:00 2001 From: Martin Tracey Date: Wed, 15 Nov 2023 04:13:01 -0800 Subject: [PATCH 02/12] add missing loose items to sln file --- SystemTextJson.JsonDiffPatch.sln | 53 ++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/SystemTextJson.JsonDiffPatch.sln b/SystemTextJson.JsonDiffPatch.sln index 4377ac3..58a5007 100644 --- a/SystemTextJson.JsonDiffPatch.sln +++ b/SystemTextJson.JsonDiffPatch.sln @@ -3,6 +3,36 @@ Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio Version 17 VisualStudioVersion = 17.8.34309.116 MinimumVisualStudioVersion = 10.0.40219.1 +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{3707B7E8-C345-4F67-9C37-56FF2A62B720}" + ProjectSection(SolutionItems) = preProject + .gitignore = .gitignore + Benchmark.md = Benchmark.md + icon.png = icon.png + LICENSE = LICENSE + README.md = README.md + ReleaseNotes.md = ReleaseNotes.md + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".config", ".config", "{E9160ECA-64C8-44AC-8172-3CE535FCF02C}" + ProjectSection(SolutionItems) = preProject + .config\dotnet-tools.json = .config\dotnet-tools.json + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{2E4C38DE-0426-40A2-AB0B-507BF6F5B0A6}" + ProjectSection(SolutionItems) = preProject + .github\CODEOWNERS = .github\CODEOWNERS + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{3B8ADCDE-F7B8-41BD-8415-B0C1DEF1BB93}" + ProjectSection(SolutionItems) = preProject + .github\workflows\build-and-test.yaml = .github\workflows\build-and-test.yaml + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{29B23CE8-F9BF-49CD-873D-4786A081A29B}" + ProjectSection(SolutionItems) = preProject + src\Directory.Build.props = src\Directory.Build.props + EndProjectSection +EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch", "src\SystemTextJson.JsonDiffPatch\SystemTextJson.JsonDiffPatch.csproj", "{2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC}" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.Xunit", "src\SystemTextJson.JsonDiffPatch.Xunit\SystemTextJson.JsonDiffPatch.Xunit.csproj", "{8CC0FE2E-297C-4427-8B66-B50E867823C3}" @@ -12,6 +42,23 @@ EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.NUnit", "src\SystemTextJson.JsonDiffPatch.NUnit\SystemTextJson.JsonDiffPatch.NUnit.csproj", "{194DF788-2210-444E-826B-C3A6C10F14F7}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{AE524BA2-D5E2-4D5F-BC95-9AA064D46234}" + ProjectSection(SolutionItems) = preProject + test\Directory.Build.props = test\Directory.Build.props + EndProjectSection +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{2066569A-C60A-42F6-B10A-C2F0D80143A3}" + ProjectSection(SolutionItems) = preProject + test\Examples\demo_diff.json = test\Examples\demo_diff.json + test\Examples\demo_diff_jsonpatch.json = test\Examples\demo_diff_jsonpatch.json + test\Examples\demo_diff_notext.json = test\Examples\demo_diff_notext.json + test\Examples\demo_left.json = test\Examples\demo_left.json + test\Examples\demo_right.json = test\Examples\demo_right.json + test\Examples\large_diff.json = test\Examples\large_diff.json + test\Examples\large_diff_jsonpatch.json = test\Examples\large_diff_jsonpatch.json + test\Examples\large_diff_notext.json = test\Examples\large_diff_notext.json + test\Examples\large_left.json = test\Examples\large_left.json + test\Examples\large_right.json = test\Examples\large_right.json + EndProjectSection EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SystemTextJson.JsonDiffPatch.UnitTests", "test\SystemTextJson.JsonDiffPatch.UnitTests\SystemTextJson.JsonDiffPatch.UnitTests.csproj", "{832E60B1-0225-48B3-9AAD-638A0F5AA15E}" EndProject @@ -70,6 +117,12 @@ Global HideSolutionNode = FALSE EndGlobalSection GlobalSection(NestedProjects) = preSolution + {3B8ADCDE-F7B8-41BD-8415-B0C1DEF1BB93} = {2E4C38DE-0426-40A2-AB0B-507BF6F5B0A6} + {2F8D59B0-53DE-4EE7-A704-D3F89A00D9DC} = {29B23CE8-F9BF-49CD-873D-4786A081A29B} + {8CC0FE2E-297C-4427-8B66-B50E867823C3} = {29B23CE8-F9BF-49CD-873D-4786A081A29B} + {B2E4B8B6-9F55-4C99-8968-43144BEB809B} = {29B23CE8-F9BF-49CD-873D-4786A081A29B} + {194DF788-2210-444E-826B-C3A6C10F14F7} = {29B23CE8-F9BF-49CD-873D-4786A081A29B} + {2066569A-C60A-42F6-B10A-C2F0D80143A3} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} {832E60B1-0225-48B3-9AAD-638A0F5AA15E} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} {0F173CC9-EA04-4243-A506-E2C59C905A5E} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} {5AEAC978-7DD8-43BA-880E-D5B8B27EF7E7} = {AE524BA2-D5E2-4D5F-BC95-9AA064D46234} From f4ef2d559b5913768abe64e6aee054efd413a13c Mon Sep 17 00:00:00 2001 From: Martin Tracey Date: Thu, 16 Nov 2023 18:05:09 -0800 Subject: [PATCH 03/12] add recommended VS Code extensions to extensions.json --- .vscode/extensions.json | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..4c8b8b0 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,13 @@ +{ + "recommendations": [ + "davidanson.vscode-markdownlint", + "dotjoshjohnson.xml", + "editorconfig.editorconfig", + "esbenp.prettier-vscode", + "github.vscode-pull-request-github", + "jebbs.markdown-extended", + "jrieken.md-navigate", + "ms-dotnettools.csdevkit", + "yzhang.markdown-all-in-one" + ] +} From 8cecd4940977f8dda48d1ad3f3eecd31661929ea Mon Sep 17 00:00:00 2001 From: Martin Tracey Date: Thu, 16 Nov 2023 19:26:30 -0800 Subject: [PATCH 04/12] update gitignore using dotnet new gitignore --- .gitignore | 139 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 135 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index c6347b5..104b544 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,10 @@ ## Ignore Visual Studio temporary files, build results, and ## files generated by popular Visual Studio add-ons. ## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +## Get latest from `dotnet new gitignore` + +# dotenv files +.env # User-specific files *.rsuser @@ -23,6 +26,7 @@ mono_crash.* [Rr]eleases/ x64/ x86/ +[Ww][Ii][Nn]32/ [Aa][Rr][Mm]/ [Aa][Rr][Mm]64/ bld/ @@ -56,11 +60,17 @@ dlldata.c # Benchmark Results BenchmarkDotNet.Artifacts/ -# .NET Core +# .NET project.lock.json project.fragment.lock.json artifacts/ +# Tye +.tye/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + # StyleCop StyleCopReport.xml @@ -86,6 +96,7 @@ StyleCopReport.xml *.tmp_proj *_wpftmp.csproj *.log +*.tlog *.vspscc *.vssscc .builds @@ -137,6 +148,11 @@ _TeamCity* .axoCover/* !.axoCover/settings.json +# Coverlet is a free, cross platform Code Coverage Tool +coverage*.json +coverage*.xml +coverage*.info + # Visual Studio code coverage results *.coverage *.coveragexml @@ -284,6 +300,17 @@ node_modules/ # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) *.vbw +# Visual Studio 6 auto-generated project file (contains which files were open etc.) +*.vbp + +# Visual Studio 6 workspace and project file (working project files containing files to include in project) +*.dsw +*.dsp + +# Visual Studio 6 technical files +*.ncb +*.aps + # Visual Studio LightSwitch build output **/*.HTMLClient/GeneratedArtifacts **/*.DesktopClient/GeneratedArtifacts @@ -340,6 +367,9 @@ ASALocalRun/ # Local History for Visual Studio .localhistory/ +# Visual Studio History (VSHistory) files +.vshistory/ + # BeatPulse healthcheck temp database healthchecksdb @@ -349,5 +379,106 @@ MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ -# Rider -.idea/ +# Fody - auto-generated XML schema +FodyWeavers.xsd + +# VS Code files for those working on multiple tools +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +# Windows Installer files from build outputs +*.cab +*.msi +*.msix +*.msm +*.msp + +# JetBrains Rider +*.sln.iml +.idea + +## +## Visual studio for Mac +## + + +# globs +Makefile.in +*.userprefs +*.usertasks +config.make +config.status +aclocal.m4 +install-sh +autom4te.cache/ +*.tar.gz +tarballs/ +test-results/ + +# Mac bundle stuff +*.dmg +*.app + +# content below from: https://github.com/github/gitignore/blob/master/Global/macOS.gitignore +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +# content below from: https://github.com/github/gitignore/blob/master/Global/Windows.gitignore +# Windows thumbnail cache files +Thumbs.db +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# Vim temporary swap files +*.swp From 7b1e292f898379be96069fc33672db858b1a3166 Mon Sep 17 00:00:00 2001 From: Martin Tracey Date: Thu, 16 Nov 2023 19:32:43 -0800 Subject: [PATCH 05/12] add global.json with SDK version configuration --- SystemTextJson.JsonDiffPatch.sln | 1 + global.json | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 global.json diff --git a/SystemTextJson.JsonDiffPatch.sln b/SystemTextJson.JsonDiffPatch.sln index 58a5007..2a6568a 100644 --- a/SystemTextJson.JsonDiffPatch.sln +++ b/SystemTextJson.JsonDiffPatch.sln @@ -7,6 +7,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution ProjectSection(SolutionItems) = preProject .gitignore = .gitignore Benchmark.md = Benchmark.md + global.json = global.json icon.png = icon.png LICENSE = LICENSE README.md = README.md diff --git a/global.json b/global.json new file mode 100644 index 0000000..c0838a7 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "8.0.100", + "rollForward": "minor", + "allowPrerelease": true + } +} From d554044c5edb6da9ad65ca1c1637b636f070ba5e Mon Sep 17 00:00:00 2001 From: Martin Tracey Date: Thu, 16 Nov 2023 20:39:51 -0800 Subject: [PATCH 06/12] add IsTestProject property to Directory.Build.props for test folder --- test/Directory.Build.props | 1 + .../SystemTextJson.JsonDiffPatch.Benchmark.csproj | 1 + .../SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj | 2 +- .../SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj | 2 +- .../SystemTextJson.JsonDiffPatch.UnitTests.csproj | 2 +- .../SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj | 2 +- 6 files changed, 6 insertions(+), 4 deletions(-) diff --git a/test/Directory.Build.props b/test/Directory.Build.props index 6c40006..0cbaabe 100644 --- a/test/Directory.Build.props +++ b/test/Directory.Build.props @@ -8,6 +8,7 @@ false enable latest + true diff --git a/test/SystemTextJson.JsonDiffPatch.Benchmark/SystemTextJson.JsonDiffPatch.Benchmark.csproj b/test/SystemTextJson.JsonDiffPatch.Benchmark/SystemTextJson.JsonDiffPatch.Benchmark.csproj index c13337c..554ea98 100644 --- a/test/SystemTextJson.JsonDiffPatch.Benchmark/SystemTextJson.JsonDiffPatch.Benchmark.csproj +++ b/test/SystemTextJson.JsonDiffPatch.Benchmark/SystemTextJson.JsonDiffPatch.Benchmark.csproj @@ -3,6 +3,7 @@ Exe true + false diff --git a/test/SystemTextJson.JsonDiffPatch.MSTest.Tests/SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj b/test/SystemTextJson.JsonDiffPatch.MSTest.Tests/SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj index 644d848..c1c98e1 100644 --- a/test/SystemTextJson.JsonDiffPatch.MSTest.Tests/SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj +++ b/test/SystemTextJson.JsonDiffPatch.MSTest.Tests/SystemTextJson.JsonDiffPatch.MSTest.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj b/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj index 8e84012..477f29d 100644 --- a/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj +++ b/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj @@ -1,4 +1,4 @@ - + diff --git a/test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj b/test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj index 729edcd..8349ad2 100644 --- a/test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj +++ b/test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj @@ -1,4 +1,4 @@ - + diff --git a/test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj b/test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj index 08aef5c..e2905d2 100644 --- a/test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj +++ b/test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj @@ -1,4 +1,4 @@ - + From 522be95ba371ab05c80eec00effa71d4cff17ffb Mon Sep 17 00:00:00 2001 From: Martin Tracey Date: Thu, 16 Nov 2023 20:40:08 -0800 Subject: [PATCH 07/12] add debug symbols and explicit packable configuration to src/Directory.build.props --- src/Directory.Build.props | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 8cb48b8..37b6c89 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -1,4 +1,4 @@ - + net8.0;net7.0;net6.0;netstandard2.0;net462 @@ -6,9 +6,12 @@ latest true $(NoWarn);CS1591 + Embedded + True + true 2.0.0 Wei Chen https://github.com/weichch/system-text-json-jsondiffpatch From f1fd5d75268b66e408847b707e1a341ec9586894 Mon Sep 17 00:00:00 2001 From: Martin Tracey Date: Thu, 16 Nov 2023 20:40:37 -0800 Subject: [PATCH 08/12] add explicit SourceLink.GitHub package reference --- .../SystemTextJson.JsonDiffPatch.MSTest.csproj | 4 ++++ .../SystemTextJson.JsonDiffPatch.NUnit.csproj | 4 ++++ .../SystemTextJson.JsonDiffPatch.Xunit.csproj | 6 +++++- .../SystemTextJson.JsonDiffPatch.csproj | 6 +++++- 4 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj b/src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj index 37525ba..2e1b366 100644 --- a/src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj +++ b/src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj @@ -15,6 +15,10 @@ + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + diff --git a/src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj b/src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj index 0d35609..3fbca8d 100644 --- a/src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj +++ b/src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj @@ -15,6 +15,10 @@ + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + diff --git a/src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj b/src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj index 2f3bba2..3b192d8 100644 --- a/src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj +++ b/src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj @@ -15,7 +15,11 @@ + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + - + diff --git a/src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj b/src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj index a92ba95..3ecdbee 100644 --- a/src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj +++ b/src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj @@ -15,6 +15,10 @@ + + runtime; build; native; contentfiles; analyzers; buildtransitive + all + @@ -22,5 +26,5 @@ - + From 31bd6486bf6c368b3bed16e21e57be8ec37dcdf0 Mon Sep 17 00:00:00 2001 From: Martin Tracey Date: Thu, 16 Nov 2023 20:54:13 -0800 Subject: [PATCH 09/12] add msbuild properties for SourceLink --- src/Directory.Build.props | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 37b6c89..5d04afa 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -16,9 +16,14 @@ Wei Chen https://github.com/weichch/system-text-json-jsondiffpatch Copyright © Wei Chen 2024 + https://github.com/weichch/system-text-json-jsondiffpatch.git + git + Copyright © Wei Chen 2022 icon.png LICENSE https://github.com/weichch/system-text-json-jsondiffpatch/blob/$(JsonDiffPatchPackageVersion)/ReleaseNotes.md + true + true @@ -30,7 +35,7 @@ - + - + From 5ea3667b212ff4f4674111db52a40f61ee2546c5 Mon Sep 17 00:00:00 2001 From: Martin Tracey Date: Fri, 17 Nov 2023 03:05:23 -0800 Subject: [PATCH 10/12] update AssemblyVersion and FileVersion to use JsonDiffPatchPackageVersion --- src/Directory.Build.props | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 5d04afa..ce6b8b6 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -28,8 +28,8 @@ $(JsonDiffPatchPackageVersion) - 1.0.0.0 - 1.0.0.0 + $(JsonDiffPatchPackageVersion).0 + $(JsonDiffPatchPackageVersion).0 From 534a5ae5ae05b568677ec44827a6c6d7c44a83ea Mon Sep 17 00:00:00 2001 From: Martin Tracey Date: Fri, 17 Nov 2023 04:06:18 -0800 Subject: [PATCH 11/12] upgrade packages to latest versions --- .../SystemTextJson.JsonDiffPatch.MSTest.csproj | 2 +- .../SystemTextJson.JsonDiffPatch.NUnit.csproj | 2 +- .../SystemTextJson.JsonDiffPatch.Xunit.csproj | 2 +- .../SystemTextJson.JsonDiffPatch.csproj | 2 +- .../SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj | 4 ++-- .../SystemTextJson.JsonDiffPatch.UnitTests.csproj | 2 +- .../SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj b/src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj index 2e1b366..d45059c 100644 --- a/src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj +++ b/src/SystemTextJson.JsonDiffPatch.MSTest/SystemTextJson.JsonDiffPatch.MSTest.csproj @@ -19,7 +19,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj b/src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj index 3fbca8d..ca5a97f 100644 --- a/src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj +++ b/src/SystemTextJson.JsonDiffPatch.NUnit/SystemTextJson.JsonDiffPatch.NUnit.csproj @@ -19,7 +19,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj b/src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj index 3b192d8..d811277 100644 --- a/src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj +++ b/src/SystemTextJson.JsonDiffPatch.Xunit/SystemTextJson.JsonDiffPatch.Xunit.csproj @@ -19,7 +19,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj b/src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj index 3ecdbee..e4c1253 100644 --- a/src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj +++ b/src/SystemTextJson.JsonDiffPatch/SystemTextJson.JsonDiffPatch.csproj @@ -19,7 +19,7 @@ runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj b/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj index 477f29d..0d40931 100644 --- a/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj +++ b/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/SystemTextJson.JsonDiffPatch.NUnit.Tests.csproj @@ -2,8 +2,8 @@ - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj b/test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj index 8349ad2..b6208f5 100644 --- a/test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj +++ b/test/SystemTextJson.JsonDiffPatch.UnitTests/SystemTextJson.JsonDiffPatch.UnitTests.csproj @@ -2,7 +2,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj b/test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj index e2905d2..d00c1a1 100644 --- a/test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj +++ b/test/SystemTextJson.JsonDiffPatch.Xunit.Tests/SystemTextJson.JsonDiffPatch.Xunit.Tests.csproj @@ -2,7 +2,7 @@ - + runtime; build; native; contentfiles; analyzers; buildtransitive all From 9f290134d66fa3fd9379f231d5c5bc72f3aa7391 Mon Sep 17 00:00:00 2001 From: Martin Tracey Date: Mon, 22 Jan 2024 14:49:07 -0800 Subject: [PATCH 12/12] migrate NUnit JsonAssertTests to constraint model --- .../JsonAssertTests.cs | 34 +++++++++++-------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/JsonAssertTests.cs b/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/JsonAssertTests.cs index 797edd0..31cf1b0 100644 --- a/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/JsonAssertTests.cs +++ b/test/SystemTextJson.JsonDiffPatch.NUnit.Tests/JsonAssertTests.cs @@ -10,8 +10,8 @@ public class JsonAssertTests [Test] public void AreEqual_String() { - var json1 = "{\"foo\":\"bar\",\"baz\":\"qux\"}"; - var json2 = "{\"baz\":\"qux\",\"foo\":\"bar\"}"; + const string json1 = "{\"foo\":\"bar\",\"baz\":\"qux\"}"; + const string json2 = "{\"baz\":\"qux\",\"foo\":\"bar\"}"; JsonAssert.AreEqual(json1, json2); } @@ -43,7 +43,7 @@ public void AreEqual_FailWithMessage() var error = Assert.Throws( () => JsonAssert.AreEqual(json1, json2)); - StringAssert.Contains("JsonAssert.AreEqual() failure.", error!.Message); + Assert.That(error!.Message, Does.Contain("JsonAssert.AreEqual() failure.")); } [Test] @@ -55,10 +55,13 @@ public void AreEqual_FailWithDefaultOutput() var error = Assert.Throws( () => JsonAssert.AreEqual(json1, json2, true)); - StringAssert.Contains("JsonAssert.AreEqual() failure.", error!.Message); - StringAssert.Contains("Expected:", error.Message); - StringAssert.Contains("Actual:", error.Message); - StringAssert.Contains("Delta:", error.Message); + Assert.Multiple(() => + { + Assert.That(error!.Message, Does.Contain("JsonAssert.AreEqual() failure.")); + Assert.That(error.Message, Does.Contain("Expected:")); + Assert.That(error.Message, Does.Contain("Actual:")); + Assert.That(error.Message, Does.Contain("Delta:")); + }); } [Test] @@ -70,15 +73,18 @@ public void AreEqual_FailWithCustomOutput() var error = Assert.Throws(() => JsonAssert.AreEqual(json1, json2, _ => "Custom message")); - StringAssert.Contains("JsonAssert.AreEqual() failure.", error!.Message); - StringAssert.Contains("Custom message", error.Message); + Assert.Multiple(() => + { + Assert.That(error!.Message, Does.Contain("JsonAssert.AreEqual() failure.")); + Assert.That(error.Message, Does.Contain("Custom message")); + }); } [Test] public void AreNotEqual_String() { - var json1 = "{\"foo\":\"bar\",\"baz\":\"qux\"}"; - var json2 = "{\"foo\":\"baz\"}"; + const string json1 = "{\"foo\":\"bar\",\"baz\":\"qux\"}"; + const string json2 = "{\"foo\":\"baz\"}"; JsonAssert.AreNotEqual(json1, json2); } @@ -100,8 +106,8 @@ public void AreNotEqual_Nulls() var error = Assert.Throws( () => JsonAssert.AreNotEqual(json1, json2)); - - Assert.IsNotNull(error); + + Assert.That(error, Is.Not.Null); } [Test] @@ -113,7 +119,7 @@ public void AreNotEqual_FailWithMessage() var error = Assert.Throws( () => JsonAssert.AreNotEqual(json1, json2)); - StringAssert.Contains("JsonAssert.AreNotEqual() failure.", error!.Message); + Assert.That(error!.Message, Does.Contain("JsonAssert.AreNotEqual() failure.")); } } } \ No newline at end of file