Skip to content

Commit 718727a

Browse files
jxnkwlpcursoragent
andauthored
Multi-target net9/net10, serialization fixes, and unit tests (#18)
* Add net9/net10 targets, fix serialization bugs, and add unit tests - Multi-target library: netstandard2.0/2.1 + net9.0 + net10.0 - Upgrade demo and new xUnit project to net10.0; CI uses .NET 10 - Preserve token order on write; default Save to UTF-8 without BOM - Fix GetTokensFromPath NRE, Remove index handling, parser errors Co-authored-by: Passingwind <jxnkwlp@users.noreply.github.com> * Expand unit tests with common nginx.conf directives Add coverage for SSL, proxy, upstream, map, gzip, limit_req, fastcgi, rewrite/try_files, types, and deeper test.conf assertions. Co-authored-by: Passingwind <jxnkwlp@users.noreply.github.com> * Fix #15: ignore semicolons inside quoted nginx values ParseLine now scans with quote awareness so ; # { inside single/double quotes do not terminate statements. Adds regression tests for add_header and related cases. Co-authored-by: Passingwind <jxnkwlp@users.noreply.github.com> * Document NginxConfig public API with brief English XML comments Co-authored-by: Passingwind <jxnkwlp@users.noreply.github.com> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
1 parent 1861805 commit 718727a

19 files changed

Lines changed: 1801 additions & 138 deletions

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@ jobs:
1515
- name: Setup .NET
1616
uses: actions/setup-dotnet@v4
1717
with:
18-
dotnet-version: 8.0.x
18+
dotnet-version: 10.0.x
1919

2020
- name: Restore dependencies
2121
run: dotnet restore
2222

2323
- name: Build
2424
run: dotnet build --no-restore -c Release
25+
26+
- name: Test
27+
run: dotnet test --no-build -c Release --verbosity normal

.github/workflows/pack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup .NET
1717
uses: actions/setup-dotnet@v4
1818
with:
19-
dotnet-version: 8.0.x
19+
dotnet-version: 10.0.x
2020

2121
- name: Install Dotnet Tool
2222
run: |

NginxConfigParser.sln

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,54 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
README.md = README.md
1414
EndProjectSection
1515
EndProject
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NginxConfigParserUnitTests", "NginxConfigParserUnitTests\NginxConfigParserUnitTests.csproj", "{A16D4B71-0B10-4355-8445-22A47A7DA945}"
17+
EndProject
1618
Global
1719
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1820
Debug|Any CPU = Debug|Any CPU
21+
Debug|x64 = Debug|x64
22+
Debug|x86 = Debug|x86
1923
Release|Any CPU = Release|Any CPU
24+
Release|x64 = Release|x64
25+
Release|x86 = Release|x86
2026
EndGlobalSection
2127
GlobalSection(ProjectConfigurationPlatforms) = postSolution
2228
{ED1C5B3D-DE74-4A13-9147-D549A9F5B38E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2329
{ED1C5B3D-DE74-4A13-9147-D549A9F5B38E}.Debug|Any CPU.Build.0 = Debug|Any CPU
30+
{ED1C5B3D-DE74-4A13-9147-D549A9F5B38E}.Debug|x64.ActiveCfg = Debug|Any CPU
31+
{ED1C5B3D-DE74-4A13-9147-D549A9F5B38E}.Debug|x64.Build.0 = Debug|Any CPU
32+
{ED1C5B3D-DE74-4A13-9147-D549A9F5B38E}.Debug|x86.ActiveCfg = Debug|Any CPU
33+
{ED1C5B3D-DE74-4A13-9147-D549A9F5B38E}.Debug|x86.Build.0 = Debug|Any CPU
2434
{ED1C5B3D-DE74-4A13-9147-D549A9F5B38E}.Release|Any CPU.ActiveCfg = Release|Any CPU
2535
{ED1C5B3D-DE74-4A13-9147-D549A9F5B38E}.Release|Any CPU.Build.0 = Release|Any CPU
36+
{ED1C5B3D-DE74-4A13-9147-D549A9F5B38E}.Release|x64.ActiveCfg = Release|Any CPU
37+
{ED1C5B3D-DE74-4A13-9147-D549A9F5B38E}.Release|x64.Build.0 = Release|Any CPU
38+
{ED1C5B3D-DE74-4A13-9147-D549A9F5B38E}.Release|x86.ActiveCfg = Release|Any CPU
39+
{ED1C5B3D-DE74-4A13-9147-D549A9F5B38E}.Release|x86.Build.0 = Release|Any CPU
2640
{2BBCF05E-1BE5-47E7-A314-1C7D6591704D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
2741
{2BBCF05E-1BE5-47E7-A314-1C7D6591704D}.Debug|Any CPU.Build.0 = Debug|Any CPU
42+
{2BBCF05E-1BE5-47E7-A314-1C7D6591704D}.Debug|x64.ActiveCfg = Debug|Any CPU
43+
{2BBCF05E-1BE5-47E7-A314-1C7D6591704D}.Debug|x64.Build.0 = Debug|Any CPU
44+
{2BBCF05E-1BE5-47E7-A314-1C7D6591704D}.Debug|x86.ActiveCfg = Debug|Any CPU
45+
{2BBCF05E-1BE5-47E7-A314-1C7D6591704D}.Debug|x86.Build.0 = Debug|Any CPU
2846
{2BBCF05E-1BE5-47E7-A314-1C7D6591704D}.Release|Any CPU.ActiveCfg = Release|Any CPU
2947
{2BBCF05E-1BE5-47E7-A314-1C7D6591704D}.Release|Any CPU.Build.0 = Release|Any CPU
48+
{2BBCF05E-1BE5-47E7-A314-1C7D6591704D}.Release|x64.ActiveCfg = Release|Any CPU
49+
{2BBCF05E-1BE5-47E7-A314-1C7D6591704D}.Release|x64.Build.0 = Release|Any CPU
50+
{2BBCF05E-1BE5-47E7-A314-1C7D6591704D}.Release|x86.ActiveCfg = Release|Any CPU
51+
{2BBCF05E-1BE5-47E7-A314-1C7D6591704D}.Release|x86.Build.0 = Release|Any CPU
52+
{A16D4B71-0B10-4355-8445-22A47A7DA945}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
53+
{A16D4B71-0B10-4355-8445-22A47A7DA945}.Debug|Any CPU.Build.0 = Debug|Any CPU
54+
{A16D4B71-0B10-4355-8445-22A47A7DA945}.Debug|x64.ActiveCfg = Debug|Any CPU
55+
{A16D4B71-0B10-4355-8445-22A47A7DA945}.Debug|x64.Build.0 = Debug|Any CPU
56+
{A16D4B71-0B10-4355-8445-22A47A7DA945}.Debug|x86.ActiveCfg = Debug|Any CPU
57+
{A16D4B71-0B10-4355-8445-22A47A7DA945}.Debug|x86.Build.0 = Debug|Any CPU
58+
{A16D4B71-0B10-4355-8445-22A47A7DA945}.Release|Any CPU.ActiveCfg = Release|Any CPU
59+
{A16D4B71-0B10-4355-8445-22A47A7DA945}.Release|Any CPU.Build.0 = Release|Any CPU
60+
{A16D4B71-0B10-4355-8445-22A47A7DA945}.Release|x64.ActiveCfg = Release|Any CPU
61+
{A16D4B71-0B10-4355-8445-22A47A7DA945}.Release|x64.Build.0 = Release|Any CPU
62+
{A16D4B71-0B10-4355-8445-22A47A7DA945}.Release|x86.ActiveCfg = Release|Any CPU
63+
{A16D4B71-0B10-4355-8445-22A47A7DA945}.Release|x86.Build.0 = Release|Any CPU
3064
EndGlobalSection
3165
GlobalSection(SolutionProperties) = preSolution
3266
HideSolutionNode = FALSE

0 commit comments

Comments
 (0)