From 30a09b369c46d812b4b05a06a67dc8cb420a2631 Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Sat, 5 Sep 2026 08:00:07 +0100 Subject: [PATCH 1/9] refactor: updated code writer structured api --- .agents/agents/test-author-writer.agent.md | 50 + ...odernize-test-to-codequery-tunit.prompt.md | 48 + ...r-source-generator-to-codewriter.prompt.md | 6 +- .../source-generator-testing/.gitignore | 8 + .../skills/tunit-test-authoring/.gitignore | 8 + .github/workflows/ci.yml | 2 +- .github/workflows/publish.yml | 2 +- Directory.Packages.props | 9 +- README.md | 19 +- global.json | 2 +- src/Directory.Build.props | 9 - src/src/AspNetCore/packages.lock.json | 107 --- src/src/Examples.CLI/packages.lock.json | 200 ---- src/src/NewtonsoftJson/packages.lock.json | 152 ---- .../Helpers/AttributeGenHelper.cs | 18 +- .../Helpers/CodeGenHelpers.cs | 17 +- .../Helpers/SourceGenLibrary.cs | 28 +- .../GeneratedAttributeDataModels.cs | 2 +- .../ZodSchemaGenerator.BuildSchema.cs | 390 ++++---- ...ZodSchemaGenerator.CollectionValidators.cs | 22 +- ...SchemaGenerator.LengthValidationHelpers.cs | 36 +- .../ZodSchemaGenerator.NumericValidators.cs | 12 +- .../ZodSchemaGenerator.StringValidators.cs | 70 +- .../ZodSchemaGenerator.ValueValidators.cs | 27 +- src/src/SourceGenerators/packages.lock.json | 127 --- src/src/SystemTextJson/packages.lock.json | 134 --- src/src/ZodSharp/packages.lock.json | 116 --- .../AspNetCore.UnitTests/packages.lock.json | 473 ---------- .../packages.lock.json | 485 ---------- .../Infra/ZodSourceGeneratorTestOptions.cs | 2 + ...odSchemaGeneratorTests.ValidatorAdapter.cs | 18 +- .../packages.lock.json | 853 ------------------ .../packages.lock.json | 464 ---------- .../packages.lock.json | 643 ------------- .../ZodSharp.UnitTests/packages.lock.json | 446 --------- 35 files changed, 465 insertions(+), 4540 deletions(-) create mode 100644 .agents/agents/test-author-writer.agent.md create mode 100644 .agents/prompts/modernize-test-to-codequery-tunit.prompt.md create mode 100644 .agents/skills/source-generator-testing/.gitignore create mode 100644 .agents/skills/tunit-test-authoring/.gitignore delete mode 100644 src/src/AspNetCore/packages.lock.json delete mode 100644 src/src/Examples.CLI/packages.lock.json delete mode 100644 src/src/NewtonsoftJson/packages.lock.json delete mode 100644 src/src/SourceGenerators/packages.lock.json delete mode 100644 src/src/SystemTextJson/packages.lock.json delete mode 100644 src/src/ZodSharp/packages.lock.json delete mode 100644 src/tests/AspNetCore.UnitTests/packages.lock.json delete mode 100644 src/tests/NewtonsoftJson.UnitTests/packages.lock.json delete mode 100644 src/tests/SourceGenerators.UnitTests/packages.lock.json delete mode 100644 src/tests/SystemTextJson.UnitTests/packages.lock.json delete mode 100644 src/tests/ZodSharp.PerformanceTests/packages.lock.json delete mode 100644 src/tests/ZodSharp.UnitTests/packages.lock.json diff --git a/.agents/agents/test-author-writer.agent.md b/.agents/agents/test-author-writer.agent.md new file mode 100644 index 0000000..fb5fb87 --- /dev/null +++ b/.agents/agents/test-author-writer.agent.md @@ -0,0 +1,50 @@ +--- +name: Test Author Writer +description: "Specialist for Purview.SourceGeneratorFramework test suites — writing, fixing, and modernising TUnit tests for generators, diagnostic analyzers, code fixes, and refactorings, and for adding stage-by-stage incremental cache tests." +tools: + [ + "search/codebase", + "edit/editFiles", + "search", + "execute/getTerminalOutput", + "execute/runInTerminal", + "read/terminalLastCommand", + "read/terminalSelection", + "execute/createAndRunTask", + "execute/runTask", + "read/getTaskOutput", + "vscodeTasks/createAndRunTask", + "vscodeTasks/getTaskOutput", + "vscodeTasks/runTask", + ] +--- + +You are a specialist for `Purview.SourceGeneratorFramework` test authoring. + +## Primary objective + +Produce correct, maintainable TUnit tests for source generators, diagnostic analyzers, code fix +providers, and refactoring providers, and prove incremental pipelines cache correctly. + +## Background knowledge + +Before writing or changing any test, load and apply the `source-generator-testing` skill (runner layer, +result types, `CodeQuery`, options, cache testing) and the `tunit-test-authoring` skill (base classes, +methods, assertion extensions, modernisation checklist). For source-generator emission work, also load the +`source-generator-codewriter-modernization` skill. + +Key rules: + +- Pick the base class by the Roslyn component type: generator → `TUnitSourceGeneratorTestBase` + + `GenerateAsync`; analyzer → `TUnitDiagnosticAnalyzerTestBase` + `AnalyzeAsync`; code fix → + `TUnitCodeFixTestBase` + `ApplyCodeFixAsync`/`ApplyFixAllAsync`; refactor → + `TUnitRefactoringTestBase` + `RefactorAsync`. +- Prefer `CodeQuery` (`result.Generated()` / `result.FixedCode()` with `Get/Has/TryGet`) over + raw-string assertions. +- Prefer the terminal assertion extensions (`HasGeneratedMethod`, `HasGeneratedClass`, …) that return + syntax nodes. +- Derive a `SourceGeneratorTestOptions` record that seeds namespaces and additional assemblies. +- For incremental pipelines, add a stage-by-stage cache test with `RunIncrementalAsync` / + `GenerateIncrementalAsync`, asserting `New` on first run and `Cached`/`Unchanged` on an identical rerun, + and `Modified` only on the stages whose inputs changed. +- Keep generated-output assertions deterministic (no timestamps); enable CodeWriter scope validation. \ No newline at end of file diff --git a/.agents/prompts/modernize-test-to-codequery-tunit.prompt.md b/.agents/prompts/modernize-test-to-codequery-tunit.prompt.md new file mode 100644 index 0000000..cf463ce --- /dev/null +++ b/.agents/prompts/modernize-test-to-codequery-tunit.prompt.md @@ -0,0 +1,48 @@ +--- +agent: ask +description: "Modernise a Roslyn test suite to use CodeQuery + TUnit assertion extensions, and add a stage-by-stage incremental cache test." +--- + +You are modernising tests in this repository. Apply the guidance from the `source-generator-testing` and +`tunit-test-authoring` skills for picking the right base class, querying generated code with `CodeQuery`, +and asserting incremental caching. + +## Inputs + +- Target test file(s): `${input:targetFiles:Path(s) to test file(s)}` +- Roslyn component under test: `${input:componentType:generator|analyzer|codefix|refactor}` (inferred if blank) +- Generator/analyzer/code-fix/refactor type name: `${input:componentName:Component type name}` + +## Task + +Modernise each test so it uses the framework's `CodeQuery` syntax-lookup API and the TUnit assertion +extensions, and add a stage-by-stage cache test proving each incremental pipeline layer caches correctly. + +### Requirements + +1. Choose the correct base class and method for the component type: + - Generator → `TUnitSourceGeneratorTestBase` → `GenerateAsync`. + - Analyzer → `TUnitDiagnosticAnalyzerTestBase` → `AnalyzeAsync`. + - Code fix → `TUnitCodeFixTestBase` → `ApplyCodeFixAsync` / `ApplyFixAllAsync`. + - Refactor → `TUnitRefactoringTestBase` → `RefactorAsync`. +2. Replace `GetGeneratedTree(...)` + `string.Contains(...)` assertions with `CodeQuery` + (`result.Generated().Get/Has/TryGet…`) and the terminal assertion extensions + (`await Assert.That(result).HasGeneratedMethod/Class/Property/Field/SyntaxTree(…)`) that return the node. +3. Replace signature string checks with `TypeReference` parameter/return-type matching. +4. Ensure options come from a derived `SourceGeneratorTestOptions` record seeding the required namespaces + and additional assemblies; remove per-test duplication. +5. Add an incremental cache test using `RunIncrementalAsync` (or `GenerateIncrementalAsync` on the TUnit + base) with the four scenarios from the skills' "Incremental cache testing" sections + (`ServiceRegistrationCacheTests` / `IncrementalPipelineCacheTests` are the reference pattern): + - first run → every framework stage `New`; + - identical rerun (`RunIncrementalAsync(sources, …)` runs the same source twice) → framework stages + `Cached`/`Unchanged`; + - source-only change → `ForAttribute_*` `Modified`, property/config stages stay `Cached`; + - property-only change (`new IncrementalRunInput(sources, [("build_property.X", "value")])`) → + `GetMSBuildPropertyValue_*`/`GetGenerationConfiguration`/`GetGenerationContext_*` `Modified`, + `ForAttribute_*` stays `Cached`. + Use the `StepReasons(IncrementalCacheRun)` flattening helper; if the generator depends on its own + post-init output, assert on the framework-named stages rather than every tracked step. +6. Keep changes minimal and behavior equivalent; do not reformat unrelated tests. + +Verify by building the test project and running its suite before finishing. \ No newline at end of file diff --git a/.agents/prompts/refactor-source-generator-to-codewriter.prompt.md b/.agents/prompts/refactor-source-generator-to-codewriter.prompt.md index d1bbb1f..e230d22 100644 --- a/.agents/prompts/refactor-source-generator-to-codewriter.prompt.md +++ b/.agents/prompts/refactor-source-generator-to-codewriter.prompt.md @@ -19,11 +19,11 @@ Refactor the selected legacy emitter implementation from manual `string` / `Stri ### Requirements 1. Use structured declaration APIs where applicable: - - `WriteClass/WriteStruct/WriteRecordClass/WriteInterface/WriteEnum` - - `WriteMethod`, `WriteProperty`, `WriteField`, `WriteConstructor` + - `Class/Struct/RecordClass/Interface/Enum` + - `Method`, `Property`, `Field`, `Constructor` 2. Use XML helper extensions instead of raw `///` composition: - `XmlSummary`, `XmlParam`, `XmlReturn`, `XmlRemarks`, `XmlCode` or `XmlCodeBlock` -3. Use `TypeReferenceOptions` when type text becomes complex (nullability, generics, arrays). +3. Use `TypeReference` when type text becomes complex (nullability, generics, arrays). 4. Ensure writer lifetime is output-scoped (`generationContext.CreateCodeWriter()` inside callback). 5. Preserve behavior, diagnostics, and generated names. 6. Keep changes minimal and focused; do not reformat unrelated logic. diff --git a/.agents/skills/source-generator-testing/.gitignore b/.agents/skills/source-generator-testing/.gitignore new file mode 100644 index 0000000..2799754 --- /dev/null +++ b/.agents/skills/source-generator-testing/.gitignore @@ -0,0 +1,8 @@ +# Ignore all files +* + +# Don't ignore directories, so Git can traverse them +!*/ + +# Keep this file +!.gitignore \ No newline at end of file diff --git a/.agents/skills/tunit-test-authoring/.gitignore b/.agents/skills/tunit-test-authoring/.gitignore new file mode 100644 index 0000000..2799754 --- /dev/null +++ b/.agents/skills/tunit-test-authoring/.gitignore @@ -0,0 +1,8 @@ +# Ignore all files +* + +# Don't ignore directories, so Git can traverse them +!*/ + +# Keep this file +!.gitignore \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 57b7e57..97f6b89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: 10.0.x - name: Restore - run: dotnet restore src/ZodSharp.slnx --locked-mode + run: dotnet restore src/ZodSharp.slnx - name: Build run: dotnet build src/ZodSharp.slnx -c Release --no-restore diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 9b74204..740ad0b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,7 +27,7 @@ jobs: echo "version=$TAG" >> $GITHUB_OUTPUT - name: Restore - run: dotnet restore src/ZodSharp.slnx --locked-mode + run: dotnet restore src/ZodSharp.slnx - name: Build (release) run: dotnet build src/ZodSharp.slnx -c Release --no-restore /p:Version=${{ steps.version.outputs.version }} diff --git a/Directory.Packages.props b/Directory.Packages.props index a6b6ef6..fea4e2c 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,9 +1,6 @@ - + true true - true diff --git a/src/src/AspNetCore/packages.lock.json b/src/src/AspNetCore/packages.lock.json deleted file mode 100644 index 5304560..0000000 --- a/src/src/AspNetCore/packages.lock.json +++ /dev/null @@ -1,107 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net10.0": { - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "zodsharp": { - "type": "Project" - } - }, - "net8.0": { - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "zodsharp": { - "type": "Project" - } - }, - "net9.0": { - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "zodsharp": { - "type": "Project" - } - } - } -} \ No newline at end of file diff --git a/src/src/Examples.CLI/packages.lock.json b/src/src/Examples.CLI/packages.lock.json deleted file mode 100644 index 59a0d99..0000000 --- a/src/src/Examples.CLI/packages.lock.json +++ /dev/null @@ -1,200 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net10.0": { - "Microsoft.Extensions.DependencyInjection": { - "type": "Direct", - "requested": "[10.0.0, )", - "resolved": "10.0.0", - "contentHash": "f0RBabswJq+gRu5a+hWIobrLWiUYPKMhCD9WO3sYBAdSy3FFH14LMvLVFZc2kPSCimBLxSuitUhsd6tb0TAY6A==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[10.0.10, )" - } - }, - "ZodSharp.NewtonsoftJson": { - "type": "Project", - "dependencies": { - "Newtonsoft.Json": "[13.0.4, )", - "ZodSharp": "[2.0.0, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "Newtonsoft.Json": { - "type": "CentralTransitive", - "requested": "[13.0.4, )", - "resolved": "13.0.4", - "contentHash": "pdgNNMai3zv51W5aq268sujXUyx7SNdE2bj1wZcWjAQrKMFZV260lbqYop1d2GM67JI1huLRwxo9ZqnfF/lC6A==" - } - }, - "net8.0": { - "Microsoft.Extensions.DependencyInjection": { - "type": "Direct", - "requested": "[10.0.0, )", - "resolved": "10.0.0", - "contentHash": "f0RBabswJq+gRu5a+hWIobrLWiUYPKMhCD9WO3sYBAdSy3FFH14LMvLVFZc2kPSCimBLxSuitUhsd6tb0TAY6A==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.2, )" - } - }, - "ZodSharp.NewtonsoftJson": { - "type": "Project", - "dependencies": { - "Newtonsoft.Json": "[13.0.4, )", - "ZodSharp": "[2.0.0, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "Newtonsoft.Json": { - "type": "CentralTransitive", - "requested": "[13.0.4, )", - "resolved": "13.0.4", - "contentHash": "pdgNNMai3zv51W5aq268sujXUyx7SNdE2bj1wZcWjAQrKMFZV260lbqYop1d2GM67JI1huLRwxo9ZqnfF/lC6A==" - } - }, - "net9.0": { - "Microsoft.Extensions.DependencyInjection": { - "type": "Direct", - "requested": "[10.0.0, )", - "resolved": "10.0.0", - "contentHash": "f0RBabswJq+gRu5a+hWIobrLWiUYPKMhCD9WO3sYBAdSy3FFH14LMvLVFZc2kPSCimBLxSuitUhsd6tb0TAY6A==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[9.0.0, )" - } - }, - "ZodSharp.NewtonsoftJson": { - "type": "Project", - "dependencies": { - "Newtonsoft.Json": "[13.0.4, )", - "ZodSharp": "[2.0.0, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "Newtonsoft.Json": { - "type": "CentralTransitive", - "requested": "[13.0.4, )", - "resolved": "13.0.4", - "contentHash": "pdgNNMai3zv51W5aq268sujXUyx7SNdE2bj1wZcWjAQrKMFZV260lbqYop1d2GM67JI1huLRwxo9ZqnfF/lC6A==" - } - } - } -} \ No newline at end of file diff --git a/src/src/NewtonsoftJson/packages.lock.json b/src/src/NewtonsoftJson/packages.lock.json deleted file mode 100644 index 99cbcbd..0000000 --- a/src/src/NewtonsoftJson/packages.lock.json +++ /dev/null @@ -1,152 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net10.0": { - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Newtonsoft.Json": { - "type": "Direct", - "requested": "[13.0.4, )", - "resolved": "13.0.4", - "contentHash": "pdgNNMai3zv51W5aq268sujXUyx7SNdE2bj1wZcWjAQrKMFZV260lbqYop1d2GM67JI1huLRwxo9ZqnfF/lC6A==" - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[10.0.10, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - } - }, - "net8.0": { - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Newtonsoft.Json": { - "type": "Direct", - "requested": "[13.0.4, )", - "resolved": "13.0.4", - "contentHash": "pdgNNMai3zv51W5aq268sujXUyx7SNdE2bj1wZcWjAQrKMFZV260lbqYop1d2GM67JI1huLRwxo9ZqnfF/lC6A==" - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.2, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - } - }, - "net9.0": { - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Newtonsoft.Json": { - "type": "Direct", - "requested": "[13.0.4, )", - "resolved": "13.0.4", - "contentHash": "pdgNNMai3zv51W5aq268sujXUyx7SNdE2bj1wZcWjAQrKMFZV260lbqYop1d2GM67JI1huLRwxo9ZqnfF/lC6A==" - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[9.0.0, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - } - } - } -} \ No newline at end of file diff --git a/src/src/SourceGenerators/Helpers/AttributeGenHelper.cs b/src/src/SourceGenerators/Helpers/AttributeGenHelper.cs index 10348c4..3ece085 100644 --- a/src/src/SourceGenerators/Helpers/AttributeGenHelper.cs +++ b/src/src/SourceGenerators/Helpers/AttributeGenHelper.cs @@ -14,14 +14,14 @@ static SourceText ZodSchemaAttribute() { CodeWriter writer = new(GenerationSettings.Create()); - writer.WriteAutoGeneratedHeader().WriteFileScopedNamespace(TypeLibrary.ZodSchemaAttribute); + writer.AutoGeneratedHeader().FileScopedNamespace(TypeLibrary.ZodSchemaAttribute); writer .XmlSummary( "Attribute to mark a class for automatic schema generation.", "When applied to a class, a zero-allocation validator will be generated at compile time." ) - .WriteAttributeClass( + .AttributeClass( new(TypeLibrary.ZodSchemaAttribute), AttributeTargets.Class | AttributeTargets.Struct, body => @@ -30,10 +30,10 @@ static SourceText ZodSchemaAttribute() "Optional name for the generated schema class.", "If not specified, uses \"{ClassName}Schema\"." ) - .WriteProperty( + .Property( new( nameof(ZodSchemaAttributeData.SchemaName), - PurviewTypeLibrary.System.String.AsTypeReference().Nullable(), + PurviewTypeLibrary.System.String.AsTypeReference().Nullable(body), TypeDeclarationAccessibility.Public ) { @@ -42,7 +42,7 @@ static SourceText ZodSchemaAttribute() ); body.XmlSummary("Whether to generate a static Validate method.", "Default is true.") - .WriteProperty( + .Property( new( nameof(ZodSchemaAttributeData.GenerateValidateMethod), PurviewTypeLibrary.System.Boolean, @@ -58,7 +58,7 @@ static SourceText ZodSchemaAttribute() "Whether to generate a static Parse method (throws on failure).", $"Default is true." ) - .WriteProperty( + .Property( new( nameof(ZodSchemaAttributeData.GenerateParseMethod), PurviewTypeLibrary.System.Boolean, @@ -74,7 +74,7 @@ static SourceText ZodSchemaAttribute() "Whether to enable composition methods (.and(), .or(), .refine()).", $"Default is true." ) - .WriteProperty( + .Property( new( nameof(ZodSchemaAttributeData.EnableComposition), PurviewTypeLibrary.System.Boolean, @@ -94,10 +94,10 @@ static SourceText ZodSchemaAttribute() "If null, the default name CustomValidationAsync is used.", "No diagnostic is reported when the default name has no matching method." ) - .WriteProperty( + .Property( new( nameof(ZodSchemaAttributeData.CustomValidationMethodName), - PurviewTypeLibrary.System.String.AsTypeReference().Nullable(), + PurviewTypeLibrary.System.String.AsTypeReference().Nullable(body), TypeDeclarationAccessibility.Public ) { diff --git a/src/src/SourceGenerators/Helpers/CodeGenHelpers.cs b/src/src/SourceGenerators/Helpers/CodeGenHelpers.cs index 04a40b7..9b721a1 100644 --- a/src/src/SourceGenerators/Helpers/CodeGenHelpers.cs +++ b/src/src/SourceGenerators/Helpers/CodeGenHelpers.cs @@ -2,7 +2,7 @@ namespace ZodSharp.SourceGenerators.Helpers; static class CodeGenHelpers { - public static CodeWriter WriteRule( + public static CodeWriter Rule( this CodeWriter writer, string propertyName, string comparison, @@ -12,8 +12,13 @@ string errorMessage { using (writer.OpenBlockScope($"if ({comparison})")) { - writer.WriteLine( - $"errors ??= new {TypeLibrary.Collections.List.MakeGeneric(TypeLibrary.ValidationError)}();" + writer.IfBlock( + "errors is null", + ifBody => + ifBody.Assignment( + "errors", + $"new {TypeLibrary.Collections.List.MakeGeneric(TypeLibrary.ValidationError)}()" + ) ); writer.OpenDelimitedBlock( $"errors.Add(new {TypeLibrary.ValidationError}", @@ -21,9 +26,9 @@ string errorMessage "));", bodyWriter => { - bodyWriter.Write(Quote(errorCode)).WriteLine(","); - bodyWriter.Write(Quote(errorMessage)).WriteLine(","); - bodyWriter.WriteLine($"new[] {{ \"{propertyName}\" }}"); + bodyWriter.Write(Quote(errorCode)).Line(","); + bodyWriter.Write(Quote(errorMessage)).Line(","); + bodyWriter.Line($"new[] {{ \"{propertyName}\" }}"); } ); } diff --git a/src/src/SourceGenerators/Helpers/SourceGenLibrary.cs b/src/src/SourceGenerators/Helpers/SourceGenLibrary.cs index c879a45..4501898 100644 --- a/src/src/SourceGenerators/Helpers/SourceGenLibrary.cs +++ b/src/src/SourceGenerators/Helpers/SourceGenLibrary.cs @@ -838,27 +838,27 @@ static string BuildNumericParseExpression(ITypeSymbol propertyType, string value return propertyType.SpecialType switch { SpecialType.System_Byte => - $"global::System.Byte.Parse({CodeGenHelpers.Quote(value)}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", + $"global::System.Byte.Parse({value.Surround()}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", SpecialType.System_SByte => - $"global::System.SByte.Parse({CodeGenHelpers.Quote(value)}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", + $"global::System.SByte.Parse({value.Surround()}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", SpecialType.System_Int16 => - $"global::System.Int16.Parse({CodeGenHelpers.Quote(value)}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", + $"global::System.Int16.Parse({value.Surround()}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", SpecialType.System_UInt16 => - $"global::System.UInt16.Parse({CodeGenHelpers.Quote(value)}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", + $"global::System.UInt16.Parse({value.Surround()}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", SpecialType.System_Int32 => - $"global::System.Int32.Parse({CodeGenHelpers.Quote(value)}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", + $"global::System.Int32.Parse({value.Surround()}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", SpecialType.System_UInt32 => - $"global::System.UInt32.Parse({CodeGenHelpers.Quote(value)}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", + $"global::System.UInt32.Parse({value.Surround()}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", SpecialType.System_Int64 => - $"global::System.Int64.Parse({CodeGenHelpers.Quote(value)}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", + $"global::System.Int64.Parse({value.Surround()}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", SpecialType.System_UInt64 => - $"global::System.UInt64.Parse({CodeGenHelpers.Quote(value)}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", + $"global::System.UInt64.Parse({value.Surround()}, global::System.Globalization.NumberStyles.Integer, {cultureExpression})", SpecialType.System_Single => - $"global::System.Single.Parse({CodeGenHelpers.Quote(value)}, global::System.Globalization.NumberStyles.Float | global::System.Globalization.NumberStyles.AllowThousands, {cultureExpression})", + $"global::System.Single.Parse({value.Surround()}, global::System.Globalization.NumberStyles.Float | global::System.Globalization.NumberStyles.AllowThousands, {cultureExpression})", SpecialType.System_Double => - $"global::System.Double.Parse({CodeGenHelpers.Quote(value)}, global::System.Globalization.NumberStyles.Float | global::System.Globalization.NumberStyles.AllowThousands, {cultureExpression})", + $"global::System.Double.Parse({value.Surround()}, global::System.Globalization.NumberStyles.Float | global::System.Globalization.NumberStyles.AllowThousands, {cultureExpression})", SpecialType.System_Decimal => - $"global::System.Decimal.Parse({CodeGenHelpers.Quote(value)}, global::System.Globalization.NumberStyles.Number, {cultureExpression})", + $"global::System.Decimal.Parse({value.Surround()}, global::System.Globalization.NumberStyles.Number, {cultureExpression})", _ => string.Empty, }; } @@ -868,7 +868,7 @@ static string BuildDateTimeParseExpression(string value, bool invariantCulture) var cultureExpression = invariantCulture ? "global::System.Globalization.CultureInfo.InvariantCulture" : "global::System.Globalization.CultureInfo.CurrentCulture"; - return $"global::System.DateTime.Parse({CodeGenHelpers.Quote(value)}, {cultureExpression})"; + return $"global::System.DateTime.Parse({value.Surround()}, {cultureExpression})"; } static string BuildDateOnlyParseExpression(string value, bool invariantCulture) @@ -876,7 +876,7 @@ static string BuildDateOnlyParseExpression(string value, bool invariantCulture) var cultureExpression = invariantCulture ? "global::System.Globalization.CultureInfo.InvariantCulture" : "global::System.Globalization.CultureInfo.CurrentCulture"; - return $"global::System.DateOnly.Parse({CodeGenHelpers.Quote(value)}, {cultureExpression})"; + return $"global::System.DateOnly.Parse({value.Surround()}, {cultureExpression})"; } static string BuildTimeOnlyParseExpression(string value, bool invariantCulture) @@ -884,6 +884,6 @@ static string BuildTimeOnlyParseExpression(string value, bool invariantCulture) var cultureExpression = invariantCulture ? "global::System.Globalization.CultureInfo.InvariantCulture" : "global::System.Globalization.CultureInfo.CurrentCulture"; - return $"global::System.TimeOnly.Parse({CodeGenHelpers.Quote(value)}, {cultureExpression})"; + return $"global::System.TimeOnly.Parse({value.Surround()}, {cultureExpression})"; } } diff --git a/src/src/SourceGenerators/Models/DataAttributes/GeneratedAttributeDataModels.cs b/src/src/SourceGenerators/Models/DataAttributes/GeneratedAttributeDataModels.cs index 88ffa61..86c264b 100644 --- a/src/src/SourceGenerators/Models/DataAttributes/GeneratedAttributeDataModels.cs +++ b/src/src/SourceGenerators/Models/DataAttributes/GeneratedAttributeDataModels.cs @@ -18,7 +18,7 @@ [NestedModel] ValidationAttributeData ValidationAttribute [Generate("System.ComponentModel.DataAnnotations.CompareAttribute")] readonly partial record struct CompareAttributeData( - [Argument("otherProperty")] string OtherProperty, + [Argument("otherProperty", DefaultValue = "")] string OtherProperty, string? OtherPropertyDisplayName, [NestedModel] ValidationAttributeData ValidationAttribute ); diff --git a/src/src/SourceGenerators/ZodSchemaGenerator.BuildSchema.cs b/src/src/SourceGenerators/ZodSchemaGenerator.BuildSchema.cs index 268cf6e..1c9eea8 100644 --- a/src/src/SourceGenerators/ZodSchemaGenerator.BuildSchema.cs +++ b/src/src/SourceGenerators/ZodSchemaGenerator.BuildSchema.cs @@ -25,8 +25,8 @@ bool isPrimary return; var registrationWriter = outputContext.Context.CreateCodeWriter(); - registrationWriter.WriteAutoGeneratedHeader(); - registrationWriter.WriteLine( + registrationWriter.AutoGeneratedHeader(); + registrationWriter.Line( $"[assembly: global::{TypeLibrary.ZodSchemaGeneratedAttribute.MetadataFullName}(typeof({outputContext.ZodSchema.TargetType.AsTypeReference()}))]" ); @@ -42,15 +42,15 @@ CancellationToken cancellationToken { cancellationToken.ThrowIfCancellationRequested(); - writer.WriteAutoGeneratedHeader(); + writer.AutoGeneratedHeader(); writer - .WriteUsing("System") - .WriteUsing("System.Collections.Generic") - .WriteUsing("System.Collections.Immutable") - .WriteUsing(TypeLibrary.ZodSharpCoreNamespace) + .Using("System") + .Using("System.Collections.Generic") + .Using("System.Collections.Immutable") + .Using(TypeLibrary.ZodSharpCoreNamespace) .NewLine(); - using (writer.WriteBlockNamespaceScope(outputContext.ZodSchema.TargetType.AsTypeReference())) + using (writer.BlockNamespaceScope(outputContext.ZodSchema.TargetType.AsTypeReference())) { writer.XmlSummary( $"Auto-generated schema validator for {CodeWriter.XmlSee(outputContext.ZodSchema.TargetType.Name)}.", @@ -59,10 +59,10 @@ CancellationToken cancellationToken List wrapperBlocks = []; foreach (var containingTypeDeclaration in outputContext.ZodSchema.ContainingTypes) - wrapperBlocks.Add(writer.WriteTypeScope(containingTypeDeclaration)); + wrapperBlocks.Add(writer.TypeScope(containingTypeDeclaration)); using ( - writer.WriteClassScope( + writer.ClassScope( new TypeDeclarationOptions( outputContext.ZodSchema.SchemaType, outputContext.ZodSchema.TargetAccessibility @@ -74,7 +74,7 @@ CancellationToken cancellationToken ) ) { - writer.WriteField( + writer.Field( new FieldDeclarationOptions( "EmptyPath", TypeLibrary @@ -124,7 +124,7 @@ CancellationToken cancellationToken $"DI-friendly validator adapter for {schema.TargetType.Name}, delegating to {schema.SchemaType.Name}." ); - writer.WriteClass( + writer.Class( new TypeDeclarationOptions(adapterName) { Accessibility = schema.TargetAccessibility, @@ -136,7 +136,7 @@ CancellationToken cancellationToken body.XmlSummary("Validates an instance of the target type, returning a ValidationResult.") .XmlParam("value", "The value to validate.") .XmlReturn("ValidationResult indicating success or failure of the validation.") - .WriteMethod( + .Method( new MethodDeclarationOptions( "Validate", TypeLibrary.ValidationResult.MakeGeneric(schema.TargetType).AsTypeReference(), @@ -148,7 +148,7 @@ CancellationToken cancellationToken new ParameterDeclarationOptions("value", schema.TargetType.AsTypeReference()), ], }, - methodBody => methodBody.WriteReturn($"{schema.SchemaType.Name}.Validate(value)") + methodBody => methodBody.Return($"{schema.SchemaType.Name}.Validate(value)") ); GenerateValidateAsyncMethod(body, schema, cancellationToken); @@ -193,31 +193,33 @@ CancellationToken cancellationToken .XmlParam("value", "The value to validate.") .XmlParam("cancellationToken", "The cancellation token.") .XmlReturn("ValidationResult indicating success or failure of the validation.") - .WriteMethod( + .Method( methodDeclaration, method => { if (customValidation.InvocationKind == CustomValidationInvocationKind.None) { - method.WriteReturn( + method.Return( $"global::System.Threading.Tasks.ValueTask.FromResult({schema.SchemaType.Name}.Validate(value))" ); return; } - method.WriteLine($"var syncResult = {schema.SchemaType.Name}.Validate(value);"); + method.Assignment("var", "syncResult", $"{schema.SchemaType.Name}.Validate(value)"); var prefix = customValidation.InvocationKind == CustomValidationInvocationKind.DefinedOnSchemaValidator ? "this." : $"{schema.TargetType}."; - method.WriteLine( - $"var customResult = await {prefix}{customValidation.MethodName}(value, cancellationToken).ConfigureAwait(false);" + method.Assignment( + "var", + "customResult", + $"await {prefix}{customValidation.MethodName}(value, cancellationToken).ConfigureAwait(false)" ); method.NewLine(); - method.WriteReturn( + method.Return( $"{TypeLibrary.ValidationResult.MakeGeneric(schema.TargetType)}.Merge(syncResult, customResult)" ); } @@ -243,17 +245,17 @@ CancellationToken cancellationToken Parameters = [new ParameterDeclarationOptions("value", schema.TargetType.AsTypeReference())], }; - writer.WriteMethod( + writer.Method( methodDeclaration, method => { if (schema.TargetCanBeNull) { - method.WriteBlock( - "if (value == null)", + method.IfBlock( + "value is null", ifBody => - ifBody.WriteReturn( - $"{TypeLibrary.ValidationResult.MakeGeneric(schema.TargetType)}.Failure({TypeLibrary.ValidationError}.Create({CodeGenHelpers.Quote("invalid_type")}, {CodeGenHelpers.Quote("Value cannot be null")}, EmptyPath))" + ifBody.Return( + $"{TypeLibrary.ValidationResult.MakeGeneric(schema.TargetType)}.Failure({TypeLibrary.ValidationError}.Create({"invalid_type".Surround()}, {"Value cannot be null".Surround()}, EmptyPath))" ) ); } @@ -261,9 +263,9 @@ CancellationToken cancellationToken var errorsListType = TypeLibrary .Collections.List.MakeGeneric(TypeLibrary.ValidationError) .AsTypeReference() - .Nullable(); - method.NewLine(); - method.WriteLine($"{errorsListType} errors = null;"); + .Nullable(method); + + method.NewLine().Assignment(errorsListType, "errors", "null"); foreach (var property in schema.Properties) { @@ -271,16 +273,17 @@ CancellationToken cancellationToken GeneratePropertyValidation(writer, property.Value, cancellationToken); } - method.WriteBlock( - "if (errors is not null)", + method.IfBlock( + "errors is not null", ifBody => - ifBody.WriteReturn( - $"{TypeLibrary.ValidationResult.MakeGeneric(schema.TargetType)}.Failure(errors)" + ifBody.Return( + TypeLibrary.ValidationResult.MakeGeneric(schema.TargetType).StaticMember("Failure(errors)") ) ); - method.NewLine(); - method.WriteReturn($"{TypeLibrary.ValidationResult.MakeGeneric(schema.TargetType)}.Success(value)"); + method + .Line() + .Return(TypeLibrary.ValidationResult.MakeGeneric(schema.TargetType).StaticMember("Success(value)")); } ); @@ -291,24 +294,22 @@ static void GenerateParseMethod(CodeWriter writer, ZodSchemaDescriptor schema, C { cancellationToken.ThrowIfCancellationRequested(); - writer.XmlSummary("Validates and returns the value, throwing an exception if validation fails."); - writer.XmlParam("value", "The value to validate and return."); - writer.XmlReturn("The validated value."); + writer + .XmlSummary("Validates and returns the value, throwing an exception if validation fails.") + .XmlParam("value", "The value to validate and return.") + .XmlReturn("The validated value."); - var methodDeclaration = new MethodDeclarationOptions( + MethodDeclarationOptions methodDeclaration = new( "Parse", schema.TargetType.AsTypeReference(), TypeDeclarationAccessibility.Public ) { IsStatic = true, - Parameters = [new ParameterDeclarationOptions("value", schema.TargetType.AsTypeReference())], + Parameters = [new("value", schema.TargetType.AsTypeReference())], }; - writer.WriteMethod( - methodDeclaration, - methodBody => methodBody.WriteReturn("Validate(value).GetValueOrThrow()") - ); + writer.Method(methodDeclaration, methodBody => methodBody.Return("Validate(value).GetValueOrThrow()")); } static void GenerateCompositionMethods( @@ -321,108 +322,109 @@ CancellationToken cancellationToken var validationResultType = TypeLibrary.ValidationResult.MakeGeneric(schema.TargetType).AsTypeReference(); var targetType = schema.TargetType.AsTypeReference(); - var funcType = new TypeIdentity(typeof(Func<,>)) - .MakeGeneric(schema.TargetType, new TypeIdentity(SpecialType.System_Boolean)) + var funcType = PurviewTypeLibrary + .System.Func.MakeGeneric(schema.TargetType, PurviewTypeLibrary.System.Boolean) .AsTypeReference(); - var stringType = new TypeIdentity(SpecialType.System_String).AsTypeReference().Nullable(); + var stringType = PurviewTypeLibrary.System.String.MakeNullable(writer); void WriteFailure(CodeWriter body, string fallbackMessage) => - body.WriteReturn( - $"{validationResultType}.Failure({TypeLibrary.ValidationError}.Create({CodeGenHelpers.Quote("validation_failed")}, message ?? {CodeGenHelpers.Quote(fallbackMessage)}, EmptyPath))" + body.Return( + $"{validationResultType}.Failure({TypeLibrary.ValidationError}.Create({"validation_failed".Surround()}, message ?? {fallbackMessage.Surround()}, EmptyPath))" ); - writer.NewLine(); - writer.XmlSummary( - "Validates the value and then requires an additional predicate to pass (value-first .and()).", - "Equivalent to Zod's .and() semantics applied to a value." - ); + writer + .Line() + .XmlSummary( + "Validates the value and then requires an additional predicate to pass (value-first .and()).", + "Equivalent to Zod's .and() semantics applied to a value." + ) + .Method( + new("ApplyAnd", validationResultType, TypeDeclarationAccessibility.Public) + { + IsStatic = true, + Parameters = + [ + new("value", targetType), + new("additionalValidation", funcType), + new("message", stringType) { DefaultValue = "null" }, + ], + }, + method => + { + method.Assignment("var", "result", "Validate(value)"); - writer.WriteMethod( - new MethodDeclarationOptions("ApplyAnd", validationResultType, TypeDeclarationAccessibility.Public) - { - IsStatic = true, - Parameters = - [ - new ParameterDeclarationOptions("value", targetType), - new ParameterDeclarationOptions("additionalValidation", funcType), - new ParameterDeclarationOptions("message", stringType) { DefaultValue = "null" }, - ], - }, - method => - { - method.WriteLine("var result = Validate(value);"); - method.WriteBlock("if (!result.IsSuccess)", ifBody => ifBody.WriteReturn("result")); - method.NewLine(); - method.WriteBlock( - "if (!additionalValidation(value))", - ifBody => WriteFailure(ifBody, $"Additional validation failed for {schema.TargetType.Name}") - ); - method.NewLine(); - method.WriteReturn("result"); - } - ); + method.IfBlock("!result.IsSuccess", ifBody => ifBody.Return("result")); + method.NewLine(); + method.IfBlock( + "!additionalValidation(value)", + ifBody => WriteFailure(ifBody, $"Additional validation failed for {schema.TargetType.Name}") + ); + method.NewLine(); + method.Return("result"); + } + ); writer.NewLine(); - writer.XmlSummary( - "Validates the value and accepts it if either the schema or an alternative predicate passes (value-first .or()).", - "Equivalent to Zod's .or() semantics applied to a value." - ); - - writer.WriteMethod( - new MethodDeclarationOptions("ApplyOr", validationResultType, TypeDeclarationAccessibility.Public) - { - IsStatic = true, - Parameters = - [ - new ParameterDeclarationOptions("value", targetType), - new ParameterDeclarationOptions("alternativeValidation", funcType), - new ParameterDeclarationOptions("message", stringType) { DefaultValue = "null" }, - ], - }, - method => - { - method.WriteLine("var result = Validate(value);"); - method.WriteBlock("if (result.IsSuccess)", ifBody => ifBody.WriteReturn("result")); - method.NewLine(); - method.WriteBlock( - "if (alternativeValidation(value))", - ifBody => ifBody.WriteReturn($"{validationResultType}.Success(value)") - ); - method.NewLine(); - WriteFailure(method, $"Neither validation passed for {schema.TargetType.Name}"); - } - ); + writer + .XmlSummary( + "Validates the value and accepts it if either the schema or an alternative predicate passes (value-first .or()).", + "Equivalent to Zod's .or() semantics applied to a value." + ) + .Method( + new MethodDeclarationOptions("ApplyOr", validationResultType, TypeDeclarationAccessibility.Public) + { + IsStatic = true, + Parameters = + [ + new("value", targetType), + new("alternativeValidation", funcType), + new("message", stringType) { DefaultValue = "null" }, + ], + }, + method => + { + method.Assignment("var", "result", "Validate(value)"); + method.IfBlock("result.IsSuccess", ifBody => ifBody.Return("result")); + method.NewLine(); + method.IfBlock( + "alternativeValidation(value)", + ifBody => ifBody.Return($"{validationResultType}.Success(value)") + ); + method.NewLine(); + WriteFailure(method, $"Neither validation passed for {schema.TargetType.Name}"); + } + ); writer.NewLine(); - writer.XmlSummary( - "Validates the value and then runs a custom refinement predicate (value-first .refine()).", - "Equivalent to Zod's .refine() semantics applied to a value." - ); - - writer.WriteMethod( - new MethodDeclarationOptions("ApplyRefine", validationResultType, TypeDeclarationAccessibility.Public) - { - IsStatic = true, - Parameters = - [ - new ParameterDeclarationOptions("value", targetType), - new ParameterDeclarationOptions("refinement", funcType), - new ParameterDeclarationOptions("message", stringType) { DefaultValue = "null" }, - ], - }, - method => - { - method.WriteLine("var result = Validate(value);"); - method.WriteBlock("if (!result.IsSuccess)", ifBody => ifBody.WriteReturn("result")); - method.NewLine(); - method.WriteBlock( - "if (!refinement(value))", - ifBody => WriteFailure(ifBody, $"Refinement validation failed for {schema.TargetType.Name}") - ); - method.NewLine(); - method.WriteReturn("result"); - } - ); + writer + .XmlSummary( + "Validates the value and then runs a custom refinement predicate (value-first .refine()).", + "Equivalent to Zod's .refine() semantics applied to a value." + ) + .Method( + new("ApplyRefine", validationResultType, TypeDeclarationAccessibility.Public) + { + IsStatic = true, + Parameters = + [ + new("value", targetType), + new("refinement", funcType), + new("message", stringType) { DefaultValue = "null" }, + ], + }, + method => + { + method.Assignment("var", "result", "Validate(value)"); + method.IfBlock("!result.IsSuccess", ifBody => ifBody.Return("result")); + method.NewLine(); + method.IfBlock( + "!refinement(value)", + ifBody => WriteFailure(ifBody, $"Refinement validation failed for {schema.TargetType.Name}") + ); + method.NewLine(); + method.Return("result"); + } + ); writer.NewLine(); } @@ -456,7 +458,7 @@ CancellationToken cancellationToken ? $"string.IsNullOrEmpty(value.{propertyName})" : $"value.{propertyName} == null"; - writer.WriteRule(propertyName, comparison, "missing_field", errorMessage); + writer.Rule(propertyName, comparison, "missing_field", errorMessage); block = writer.OpenBlockScope("else"); GenerateValueSetValidations(writer, property); } @@ -510,12 +512,12 @@ static void GenerateCompareValidation(CodeWriter writer, ZodPropertyDescriptor p var messageExpression = BuildErrorMessageExpression( compare.ValidationAttribute, "Field '{0}' must match '{1}'.", - CodeGenHelpers.Quote(displayName), - CodeGenHelpers.Quote(otherDisplayName) + displayName.Surround(), + otherDisplayName.Surround() ); - writer.WriteBlock( - $"if (!global::System.Collections.Generic.EqualityComparer.Default.Equals(value.{property.Name}, value.{compare.OtherProperty}))", + writer.IfBlock( + $"!global::System.Collections.Generic.EqualityComparer.Default.Equals(value.{property.Name}, value.{compare.OtherProperty})", ifBody => WriteValidationError( ifBody, @@ -540,30 +542,37 @@ static void GenerateCollectionElementValidation(CodeWriter writer, ZodPropertyDe var indexName = CodeGenHelpers.GetLocalIdentifier(propertyName, "Index"); var schemaType = property.NestedSchemaType.Value; - writer.WriteLine($"var {collectionValueName} = value.{propertyName};"); + writer.Assignment("var", collectionValueName, $"value.{propertyName}"); using (writer.OpenBlockScope($"if ({collectionValueName} is not null)")) { - writer.WriteLine($"var {indexName} = 0;"); - using (writer.OpenBlockScope($"foreach (var {itemValueName} in {collectionValueName})")) + writer.Assignment("var", indexName, "0"); + using (writer.ForeachScope($"var {itemValueName} in {collectionValueName}")) { if (property.ElementTypeCanBeNull) { - writer.WriteLine($"if ({itemValueName} is null)"); - writer.WriteLine("{"); - writer.WriteLine($"\t{indexName}++;"); - writer.WriteLine("\tcontinue;"); - writer.WriteLine("}"); + writer.IfBlock( + $"{itemValueName} is null", + ifBody => + { + ifBody.Line($"{indexName}++;"); + ifBody.Line("continue;"); + } + ); } - writer.WriteLine($"var {itemResultName} = {schemaType}.Validate({itemValueName});"); - using (writer.OpenBlockScope($"if (!{itemResultName}.IsSuccess)")) + writer.Assignment("var", itemResultName, schemaType.StaticMember($"Validate({itemValueName})")); + using (writer.IfBlockScope($"!{itemResultName}.IsSuccess")) { - writer.WriteLine( - $"AddNestedErrors(ref errors, {itemResultName}, {CodeGenHelpers.Quote(propertyName)}, {indexName});" + writer.MethodCall( + "AddNestedErrors", + "ref errors", + itemResultName, + propertyName.Surround(), + indexName ); } - writer.WriteLine($"{indexName}++;"); + writer.Line($"{indexName}++;"); } } @@ -580,27 +589,33 @@ static void GenerateComplexTypeValidation(CodeWriter writer, ZodPropertyDescript var nestedResultName = CodeGenHelpers.GetLocalIdentifier(propertyName, "Result"); var schemaType = property.NestedSchemaType.Value; - writer.WriteLine($"var {propertyValueName} = value.{propertyName};"); + writer.Assignment("var", propertyValueName, $"value.{propertyName}"); if (property.CanBeNull) { using (writer.OpenBlockScope($"if ({propertyValueName} is not null)")) { - writer.WriteLine($"var {nestedResultName} = {schemaType}.Validate({propertyValueName});"); + writer.Assignment("var", nestedResultName, $"{schemaType}.Validate({propertyValueName})"); using (writer.OpenBlockScope($"if (!{nestedResultName}.IsSuccess)")) { - writer.WriteLine( - $"AddNestedErrors(ref errors, {nestedResultName}, {CodeGenHelpers.Quote(propertyName)});" + writer.MethodCall( + "AddNestedErrors", + "ref errors", + nestedResultName, + CodeGenHelpers.Quote(propertyName) ); } } } else { - writer.WriteLine($"var {nestedResultName} = {schemaType}.Validate({propertyValueName});"); + writer.Assignment("var", nestedResultName, $"{schemaType}.Validate({propertyValueName})"); using (writer.OpenBlockScope($"if (!{nestedResultName}.IsSuccess)")) { - writer.WriteLine( - $"AddNestedErrors(ref errors, {nestedResultName}, {CodeGenHelpers.Quote(propertyName)});" + writer.MethodCall( + "AddNestedErrors", + "ref errors", + nestedResultName, + CodeGenHelpers.Quote(propertyName) ); } } @@ -618,7 +633,7 @@ static void GeneratePathFields(CodeWriter writer, ZodSchemaDescriptor schema, Ca if (!property.ShouldProcess) continue; - writer.WriteField( + writer.Field( new FieldDeclarationOptions( CodeGenHelpers.GetPathFieldName(property.Value.Name), pathFieldType, @@ -627,8 +642,7 @@ static void GeneratePathFields(CodeWriter writer, ZodSchemaDescriptor schema, Ca { IsStatic = true, IsReadOnly = true, - Initializer = - $"{TypeLibrary.Collections.ImmutableArray}.Create({CodeGenHelpers.Quote(property.Value.Name)})", + Initializer = $"{TypeLibrary.Collections.ImmutableArray}.Create({property.Value.Name.Surround()})", } ); } @@ -653,7 +667,7 @@ CancellationToken cancellationToken if (prop.ValidationAttributes.RegularExpression.ShouldProcess) { var pattern = prop.ValidationAttributes.RegularExpression.Value.Pattern; - writer.WriteField( + writer.Field( new FieldDeclarationOptions( GetRegexFieldName(prop.Name), regexType, @@ -663,7 +677,7 @@ CancellationToken cancellationToken IsStatic = true, IsReadOnly = true, Initializer = - $"new({CodeGenHelpers.Quote(pattern!)}, global::System.Text.RegularExpressions.RegexOptions.CultureInvariant)", + $"new({pattern.Surround()}, global::System.Text.RegularExpressions.RegexOptions.CultureInvariant)", } ); } @@ -672,7 +686,7 @@ CancellationToken cancellationToken { var propertyType = prop.PropertyType.AsTypeReference(); var range = prop.ValidationAttributes.Range.Value; - writer.WriteField( + writer.Field( new FieldDeclarationOptions( GetRangeMinimumFieldName(prop.Name), propertyType, @@ -681,10 +695,10 @@ CancellationToken cancellationToken { IsStatic = true, IsReadOnly = true, - Initializer = range.MinimumExpression!, + Initializer = range.MinimumExpression, } ); - writer.WriteField( + writer.Field( new FieldDeclarationOptions( GetRangeMaximumFieldName(prop.Name), propertyType, @@ -693,7 +707,7 @@ CancellationToken cancellationToken { IsStatic = true, IsReadOnly = true, - Initializer = range.MaximumExpression!, + Initializer = range.MaximumExpression, } ); } @@ -711,30 +725,30 @@ static void GenerateValidationHelpers(CodeWriter writer, CancellationToken cance var immutableArrayType = TypeLibrary.Collections.ImmutableArray; var typeParameterT = new TypeIdentity("T", null).AsTypeReference(); - writer.WriteMethod( + writer.Method( new MethodDeclarationOptions("AddError", TypeDeclarationAccessibility.Private) { IsStatic = true, Parameters = [ - new ParameterDeclarationOptions("errors", listOfErrorsType.Nullable()) + new ParameterDeclarationOptions("errors", listOfErrorsType.Nullable(writer)) { Modifier = ParameterModifier.Ref, }, new ParameterDeclarationOptions("error", errorType), ], }, - body => body.WriteLine($"(errors ??= new {listOfErrorsType}()).Add(error);") + body => body.MethodCallOn($"(errors ??= new {listOfErrorsType}())", "Add", "error") ); - writer.WriteMethod( + writer.Method( new MethodDeclarationOptions("AddNestedErrors", TypeDeclarationAccessibility.Private) { IsStatic = true, GenericTypes = [new GenericTypeParameterOptions("T")], Parameters = [ - new ParameterDeclarationOptions("errors", listOfErrorsType.Nullable()) + new ParameterDeclarationOptions("errors", listOfErrorsType.Nullable(writer)) { Modifier = ParameterModifier.Ref, }, @@ -749,23 +763,25 @@ static void GenerateValidationHelpers(CodeWriter writer, CancellationToken cance ], }, body => - body.WriteBlock( - "foreach (var error in nestedResult.Errors)", + body.Foreach( + "var error in nestedResult.Errors", foreachBody => - foreachBody.WriteLine( - $"AddError(ref errors, {TypeLibrary.ValidationError}.Create(error.Code, error.Message, {immutableArrayType}.Create(prefix).AddRange(error.Path), error.Parameters, error.Origin, error.Minimum, error.Maximum, error.Inclusive));" + foreachBody.MethodCall( + "AddError", + "ref errors", + $"{TypeLibrary.ValidationError}.Create(error.Code, error.Message, {immutableArrayType}.Create(prefix).AddRange(error.Path), error.Parameters, error.Origin, error.Minimum, error.Maximum, error.Inclusive)" ) ) ); - writer.WriteMethod( + writer.Method( new MethodDeclarationOptions("AddNestedErrors", TypeDeclarationAccessibility.Private) { IsStatic = true, GenericTypes = [new GenericTypeParameterOptions("T")], Parameters = [ - new ParameterDeclarationOptions("errors", listOfErrorsType.Nullable()) + new ParameterDeclarationOptions("errors", listOfErrorsType.Nullable(writer)) { Modifier = ParameterModifier.Ref, }, @@ -784,17 +800,19 @@ static void GenerateValidationHelpers(CodeWriter writer, CancellationToken cance ], }, body => - body.WriteBlock( - "foreach (var error in nestedResult.Errors)", + body.Foreach( + "var error in nestedResult.Errors", foreachBody => - foreachBody.WriteLine( - $"AddError(ref errors, {TypeLibrary.ValidationError}.Create(error.Code, error.Message, {immutableArrayType}.Create(prefix, index.ToString()).AddRange(error.Path), error.Parameters, error.Origin, error.Minimum, error.Maximum, error.Inclusive));" + foreachBody.MethodCall( + "AddError", + "ref errors", + $"{TypeLibrary.ValidationError}.Create(error.Code, error.Message, {immutableArrayType}.Create(prefix, index.ToString()).AddRange(error.Path), error.Parameters, error.Origin, error.Minimum, error.Maximum, error.Inclusive)" ) ) ); writer.NewLine(); - writer.WriteMethod( + writer.Method( new MethodDeclarationOptions( "FormatCount", new TypeIdentity(SpecialType.System_String).AsTypeReference(), @@ -818,7 +836,7 @@ static void GenerateValidationHelpers(CodeWriter writer, CancellationToken cance ), ], }, - body => body.WriteReturn("count == 1 ? $\"1 {singularNoun}\" : $\"{count} {pluralNoun}\"") + body => body.Return("count == 1 ? $\"1 {singularNoun}\" : $\"{count} {pluralNoun}\"") ); writer.NewLine(); diff --git a/src/src/SourceGenerators/ZodSchemaGenerator.CollectionValidators.cs b/src/src/SourceGenerators/ZodSchemaGenerator.CollectionValidators.cs index 9078a5a..1bdb359 100644 --- a/src/src/SourceGenerators/ZodSchemaGenerator.CollectionValidators.cs +++ b/src/src/SourceGenerators/ZodSchemaGenerator.CollectionValidators.cs @@ -35,11 +35,11 @@ static void GenerateCollectionValidations(CodeWriter writer, ZodPropertyDescript var propertyLengthName = CodeGenHelpers.GetLocalIdentifier(propertyName, "Length"); var origin = lengthAccessor.Origin; - writer.WriteLine($"var {propertyValueName} = value.{propertyName};"); + writer.Assignment("var", propertyValueName, $"value.{propertyName}"); using (writer.OpenBlockScope($"if ({propertyValueName} is not null)")) { - writer.WriteLine($"var propertyValue = {propertyValueName};"); - writer.WriteLine($"var {propertyLengthName} = {lengthAccessor.LengthExpression};"); + writer.Assignment("var", "propertyValue", propertyValueName); + writer.Assignment("var", propertyLengthName, lengthAccessor.LengthExpression); if (lengthAttr.ShouldProcess && lengthAttr.Value.Exists) { @@ -48,15 +48,15 @@ static void GenerateCollectionValidations(CodeWriter writer, ZodPropertyDescript { var tooSmallMessage = BuildMessageExpression( length.ValidationAttribute, - $"{CodeGenHelpers.Quote($"Field '{displayName}' must contain at least ")} + FormatCount({length.MinimumLength}, {CodeGenHelpers.Quote("element")}, {CodeGenHelpers.Quote("elements")}) + {CodeGenHelpers.Quote(".")}", - CodeGenHelpers.Quote(displayName), + $"{$"Field '{displayName}' must contain at least ".Surround()} + FormatCount({length.MinimumLength}, {"element".Surround()}, {"elements".Surround()}) + {".".Surround()}", + displayName.Surround(), length.MaximumLength.ToString(CultureInfo.InvariantCulture), length.MinimumLength.ToString(CultureInfo.InvariantCulture) ); var tooBigMessage = BuildMessageExpression( length.ValidationAttribute, - $"{CodeGenHelpers.Quote($"Field '{displayName}' must contain no more than ")} + FormatCount({length.MaximumLength}, {CodeGenHelpers.Quote("element")}, {CodeGenHelpers.Quote("elements")}) + {CodeGenHelpers.Quote(".")}", - CodeGenHelpers.Quote(displayName), + $"{$"Field '{displayName}' must contain no more than ".Surround()} + FormatCount({length.MaximumLength}, {"element".Surround()}, {"elements".Surround()}) + {".".Surround()}", + displayName.Surround(), length.MaximumLength.ToString(CultureInfo.InvariantCulture), length.MinimumLength.ToString(CultureInfo.InvariantCulture) ); @@ -92,8 +92,8 @@ static void GenerateCollectionValidations(CodeWriter writer, ZodPropertyDescript var minLength = minLengthAttr.Value.Length; var messageExpression = BuildMessageExpression( minLengthAttr.Value.ValidationAttribute, - $"{CodeGenHelpers.Quote($"Field '{displayName}' must contain at least ")} + FormatCount({minLength}, {CodeGenHelpers.Quote("element")}, {CodeGenHelpers.Quote("elements")}) + {CodeGenHelpers.Quote(".")}", - CodeGenHelpers.Quote(displayName), + $"{$"Field '{displayName}' must contain at least ".Surround()} + FormatCount({minLength}, {"element".Surround()}, {"elements".Surround()}) + {".".Surround()}", + displayName.Surround(), minLength.ToString(CultureInfo.InvariantCulture) ); @@ -115,8 +115,8 @@ static void GenerateCollectionValidations(CodeWriter writer, ZodPropertyDescript var maxLength = maxLengthAttr.Value.Length; var messageExpression = BuildMessageExpression( maxLengthAttr.Value.ValidationAttribute, - $"{CodeGenHelpers.Quote($"Field '{displayName}' must contain no more than ")} + FormatCount({maxLength}, {CodeGenHelpers.Quote("element")}, {CodeGenHelpers.Quote("elements")}) + {CodeGenHelpers.Quote(".")}", - CodeGenHelpers.Quote(displayName), + $"{$"Field '{displayName}' must contain no more than ".Surround()} + FormatCount({maxLength}, {"element".Surround()}, {"elements".Surround()}) + {".".Surround()}", + displayName.Surround(), maxLength.ToString(CultureInfo.InvariantCulture) ); diff --git a/src/src/SourceGenerators/ZodSchemaGenerator.LengthValidationHelpers.cs b/src/src/SourceGenerators/ZodSchemaGenerator.LengthValidationHelpers.cs index 257e188..7889376 100644 --- a/src/src/SourceGenerators/ZodSchemaGenerator.LengthValidationHelpers.cs +++ b/src/src/SourceGenerators/ZodSchemaGenerator.LengthValidationHelpers.cs @@ -25,7 +25,7 @@ params string[] formatArguments } return !string.IsNullOrEmpty(validationAttribute.ErrorMessage) - ? BuildFormatExpression(CodeGenHelpers.Quote(validationAttribute.ErrorMessage!), formatArguments) + ? BuildFormatExpression(validationAttribute.ErrorMessage.Surround(), formatArguments) : defaultMessageExpression; } @@ -49,8 +49,8 @@ params string[] formatArguments else { formatExpression = !string.IsNullOrEmpty(validationAttribute.ErrorMessage) - ? CodeGenHelpers.Quote(validationAttribute.ErrorMessage!) - : CodeGenHelpers.Quote(defaultFormat); + ? validationAttribute.ErrorMessage.Surround() + : defaultFormat.Surround(); } // If there are no format arguments, we can return the format expression directly. @@ -72,11 +72,18 @@ static void WriteValidationError( int? maximum = null ) { - writer.WriteLine( - $"errors ??= new global::System.Collections.Generic.List();" + writer.IfBlock( + "errors is null", + ifBody => + ifBody.Assignment( + "errors", + "new global::System.Collections.Generic.List()" + ) ); - writer.WriteLine( - $"errors.Add({TypeLibrary.ValidationError}.Create({CodeGenHelpers.Quote(errorCode)}, {messageExpression}, {pathFieldName}, origin: {CodeGenHelpers.Quote(origin)}, minimum: {(minimum.HasValue ? minimum.Value.ToString(CultureInfo.InvariantCulture) : "null")}, maximum: {(maximum.HasValue ? maximum.Value.ToString(CultureInfo.InvariantCulture) : "null")}, inclusive: true));" + writer.MethodCallOn( + "errors", + "Add", + $"{TypeLibrary.ValidationError}.Create({errorCode.Surround()}, {messageExpression}, {pathFieldName}, origin: {origin.Surround()}, minimum: {(minimum.HasValue ? minimum.Value.ToString(CultureInfo.InvariantCulture) : "null")}, maximum: {(maximum.HasValue ? maximum.Value.ToString(CultureInfo.InvariantCulture) : "null")}, inclusive: true)" ); } @@ -87,11 +94,18 @@ static void WriteValidationError( string pathFieldName ) { - writer.WriteLine( - $"errors ??= new global::System.Collections.Generic.List();" + writer.IfBlock( + "errors is null", + ifBody => + ifBody.Assignment( + "errors", + "new global::System.Collections.Generic.List()" + ) ); - writer.WriteLine( - $"errors.Add({TypeLibrary.ValidationError}.Create({CodeGenHelpers.Quote(errorCode)}, {messageExpression}, {pathFieldName}));" + writer.MethodCallOn( + "errors", + "Add", + $"{TypeLibrary.ValidationError}.Create({errorCode.Surround()}, {messageExpression}, {pathFieldName})" ); } diff --git a/src/src/SourceGenerators/ZodSchemaGenerator.NumericValidators.cs b/src/src/SourceGenerators/ZodSchemaGenerator.NumericValidators.cs index 13fe58d..66615ba 100644 --- a/src/src/SourceGenerators/ZodSchemaGenerator.NumericValidators.cs +++ b/src/src/SourceGenerators/ZodSchemaGenerator.NumericValidators.cs @@ -27,17 +27,15 @@ static void GenerateNumericValidations(CodeWriter writer, ZodPropertyDescriptor var maximumDisplay = Convert.ToString(range.Maximum, CultureInfo.InvariantCulture) ?? string.Empty; var messageExpression = BuildMessageExpression( range.ValidationAttribute, - CodeGenHelpers.Quote( - $"Field '{displayName}' must be {minimumDescription} {minimumDisplay} and {maximumDescription} {maximumDisplay}." - ), - CodeGenHelpers.Quote(displayName), - CodeGenHelpers.Quote(minimumDisplay), - CodeGenHelpers.Quote(maximumDisplay) + $"Field '{displayName}' must be {minimumDescription} {minimumDisplay} and {maximumDescription} {maximumDisplay}.".Surround(), + displayName.Surround(), + minimumDisplay.Surround(), + maximumDisplay.Surround() ); using (writer.OpenBlockScope()) { - writer.WriteLine($"var {propertyValueName} = value.{propertyName};"); + writer.Assignment("var", propertyValueName, $"value.{propertyName}"); using ( writer.OpenBlockScope( $"if ({propertyValueName} {minComparison} {GetRangeMinimumFieldName(propertyName)} || {propertyValueName} {maxComparison} {GetRangeMaximumFieldName(propertyName)})" diff --git a/src/src/SourceGenerators/ZodSchemaGenerator.StringValidators.cs b/src/src/SourceGenerators/ZodSchemaGenerator.StringValidators.cs index 1c9aa9d..9610fe4 100644 --- a/src/src/SourceGenerators/ZodSchemaGenerator.StringValidators.cs +++ b/src/src/SourceGenerators/ZodSchemaGenerator.StringValidators.cs @@ -19,16 +19,16 @@ static void GenerateStringValidations(CodeWriter writer, ZodPropertyDescriptor p var messageExpression = BuildErrorMessageExpression( emailAttribute.Value.ValidationAttributeData, "Field '{0}' must be a valid email address.", - CodeGenHelpers.Quote(displayName) + displayName.Surround() ); using (writer.OpenBlockScope()) { var propertyValueName = CodeGenHelpers.GetLocalIdentifier(propertyName, "Value"); - writer.WriteLine($"var {propertyValueName} = value.{propertyName};"); + writer.Assignment("var", propertyValueName, $"value.{propertyName}"); using ( - writer.OpenBlockScope( - $"if ({propertyValueName}.Length != 0 && !global::ZodSharp.Rules.EmailRule.EmailRegex.IsMatch({propertyValueName}))" + writer.IfBlockScope( + $"{propertyValueName}.Length != 0 && !global::ZodSharp.Rules.EmailRule.EmailRegex.IsMatch({propertyValueName})" ) ) { @@ -54,17 +54,17 @@ static void GenerateStringValidations(CodeWriter writer, ZodPropertyDescriptor p var messageExpression = BuildErrorMessageExpression( regularExpressionAttribute.Value.ValidationAttribute, "Field '{0}' must match the regular expression '{1}'.", - CodeGenHelpers.Quote(displayName), - CodeGenHelpers.Quote(pattern) + displayName.Surround(), + pattern.Surround() ); using (writer.OpenBlockScope()) { var propertyValueName = CodeGenHelpers.GetLocalIdentifier(propertyName, "Value"); - writer.WriteLine($"var {propertyValueName} = value.{propertyName};"); + writer.Assignment("var", propertyValueName, $"value.{propertyName}"); using ( - writer.OpenBlockScope( - $"if ({propertyValueName}.Length != 0 && !{GetRegexFieldName(propertyName)}.IsMatch({propertyValueName}))" + writer.IfBlockScope( + $"{propertyValueName}.Length != 0 && !{GetRegexFieldName(propertyName)}.IsMatch({propertyValueName})" ) ) { @@ -171,10 +171,10 @@ string errorCode using (writer.OpenBlockScope()) { var propertyValueName = CodeGenHelpers.GetLocalIdentifier(propertyName, "Value"); - writer.WriteLine($"var {propertyValueName} = value.{propertyName};"); + writer.Assignment("var", propertyValueName, $"value.{propertyName}"); using ( - writer.OpenBlockScope( - $"if ({propertyValueName}.Length != 0 && !new {ruleType}().IsValid({propertyValueName}))" + writer.IfBlockScope( + $"{propertyValueName}.Length != 0 && !new {ruleType}().IsValid({propertyValueName})" ) ) { @@ -209,23 +209,23 @@ static void StringLengthValidators(CodeWriter writer, ZodPropertyDescriptor prop { var tooSmallMessage = BuildMessageExpression( length.ValidationAttribute, - $"{CodeGenHelpers.Quote($"Field '{displayName}' must contain at least ")} + FormatCount({length.MinimumLength}, {CodeGenHelpers.Quote("character")}, {CodeGenHelpers.Quote("characters")}) + {CodeGenHelpers.Quote(".")}", - CodeGenHelpers.Quote(displayName), + $"{$"Field '{displayName}' must contain at least ".Surround()} + FormatCount({length.MinimumLength}, {"character".Surround()}, {"characters".Surround()}) + {".".Surround()}", + displayName.Surround(), length.MaximumLength.ToString(CultureInfo.InvariantCulture), length.MinimumLength.ToString(CultureInfo.InvariantCulture) ); var tooBigMessage = BuildMessageExpression( length.ValidationAttribute, - $"{CodeGenHelpers.Quote($"Field '{displayName}' must contain no more than ")} + FormatCount({length.MaximumLength}, {CodeGenHelpers.Quote("character")}, {CodeGenHelpers.Quote("characters")}) + {CodeGenHelpers.Quote(".")}", - CodeGenHelpers.Quote(displayName), + $"{$"Field '{displayName}' must contain no more than ".Surround()} + FormatCount({length.MaximumLength}, {"character".Surround()}, {"characters".Surround()}) + {".".Surround()}", + displayName.Surround(), length.MaximumLength.ToString(CultureInfo.InvariantCulture), length.MinimumLength.ToString(CultureInfo.InvariantCulture) ); - writer.WriteLine($"var {propertyValueName} = value.{propertyName};"); - using (writer.OpenBlockScope($"if ({propertyValueName} is not null)")) + writer.Assignment("var", propertyValueName, $"value.{propertyName}"); + using (writer.IfBlockScope($"({propertyValueName} is not null)")) { - writer.WriteLine($"var {propertyLengthName} = {propertyValueName}.Length;"); + writer.Assignment("var", propertyLengthName, $"{propertyValueName}.Length"); using (writer.OpenBlockScope($"if ({propertyLengthName} < {length.MinimumLength})")) { WriteValidationError( @@ -264,21 +264,21 @@ static void StringLengthValidators(CodeWriter writer, ZodPropertyDescriptor prop { var tooSmallMessage = BuildMessageExpression( stringLength.ValidationAttribute, - $"{CodeGenHelpers.Quote($"Field '{displayName}' must contain at least ")} + FormatCount({stringLength.MinimumLength}, {CodeGenHelpers.Quote("character")}, {CodeGenHelpers.Quote("characters")}) + {CodeGenHelpers.Quote(".")}", - CodeGenHelpers.Quote(displayName), + $"{$"Field '{displayName}' must contain at least ".Surround()} + FormatCount({stringLength.MinimumLength}, {"character".Surround()}, {"characters".Surround()}) + {".".Surround()}", + displayName.Surround(), stringLength.MaximumLength.ToString(CultureInfo.InvariantCulture), stringLength.MinimumLength.ToString(CultureInfo.InvariantCulture) ); var tooBigMessage = BuildMessageExpression( stringLength.ValidationAttribute, - $"{CodeGenHelpers.Quote($"Field '{displayName}' must contain no more than ")} + FormatCount({stringLength.MaximumLength}, {CodeGenHelpers.Quote("character")}, {CodeGenHelpers.Quote("characters")}) + {CodeGenHelpers.Quote(".")}", - CodeGenHelpers.Quote(displayName), + $"{$"Field '{displayName}' must contain no more than ".Surround()} + FormatCount({stringLength.MaximumLength}, {"character".Surround()}, {"characters".Surround()}) + {".".Surround()}", + displayName.Surround(), stringLength.MaximumLength.ToString(CultureInfo.InvariantCulture), stringLength.MinimumLength.ToString(CultureInfo.InvariantCulture) ); - writer.WriteLine($"var {propertyValueName} = value.{propertyName};"); - writer.WriteLine($"var {propertyLengthName} = {propertyValueName}.Length;"); + writer.Assignment("var", propertyValueName, $"value.{propertyName}"); + writer.Assignment("var", propertyLengthName, $"{propertyValueName}.Length"); if (stringLength.MinimumLength > 0) { using (writer.OpenBlockScope($"if ({propertyLengthName} < {stringLength.MinimumLength})")) @@ -318,14 +318,14 @@ static void StringLengthValidators(CodeWriter writer, ZodPropertyDescriptor prop { var messageExpression = BuildMessageExpression( minLengthAttr.Value.ValidationAttribute, - $"{CodeGenHelpers.Quote($"Field '{displayName}' must contain at least ")} + FormatCount({minLength}, {CodeGenHelpers.Quote("character")}, {CodeGenHelpers.Quote("characters")}) + {CodeGenHelpers.Quote(".")}", - CodeGenHelpers.Quote(displayName), + $"{$"Field '{displayName}' must contain at least ".Surround()} + FormatCount({minLength}, {"character".Surround()}, {"characters".Surround()}) + {".".Surround()}", + displayName.Surround(), minLength.ToString(CultureInfo.InvariantCulture) ); - writer.WriteLine($"var {propertyValueName} = value.{propertyName};"); - writer.WriteLine($"var {propertyLengthName} = {propertyValueName}.Length;"); - using (writer.OpenBlockScope($"if ({propertyLengthName} < {minLength})")) + writer.Assignment("var", propertyValueName, $"value.{propertyName}"); + writer.Assignment("var", propertyLengthName, $"{propertyValueName}.Length"); + using (writer.IfBlockScope($"{propertyLengthName} < {minLength}")) { WriteValidationError( writer, @@ -349,14 +349,14 @@ static void StringLengthValidators(CodeWriter writer, ZodPropertyDescriptor prop { var messageExpression = BuildMessageExpression( maxLengthAttr.Value.ValidationAttribute, - $"{CodeGenHelpers.Quote($"Field '{displayName}' must contain no more than ")} + FormatCount({maxLength}, {CodeGenHelpers.Quote("character")}, {CodeGenHelpers.Quote("characters")}) + {CodeGenHelpers.Quote(".")}", - CodeGenHelpers.Quote(displayName), + $"{$"Field '{displayName}' must contain no more than ".Surround()} + FormatCount({maxLength}, {"character".Surround()}, {"characters".Surround()}) + {".".Surround()}", + displayName.Surround(), maxLength.ToString(CultureInfo.InvariantCulture) ); - writer.WriteLine($"var {propertyValueName} = value.{propertyName};"); - writer.WriteLine($"var {propertyLengthName} = {propertyValueName}.Length;"); - using (writer.OpenBlockScope($"if ({propertyLengthName} > {maxLength})")) + writer.Assignment("var", propertyValueName, $"value.{propertyName}"); + writer.Assignment("var", propertyLengthName, $"{propertyValueName}.Length"); + using (writer.IfBlockScope($"{propertyLengthName} > {maxLength}")) { WriteValidationError( writer, diff --git a/src/src/SourceGenerators/ZodSchemaGenerator.ValueValidators.cs b/src/src/SourceGenerators/ZodSchemaGenerator.ValueValidators.cs index f1cf259..c0842f6 100644 --- a/src/src/SourceGenerators/ZodSchemaGenerator.ValueValidators.cs +++ b/src/src/SourceGenerators/ZodSchemaGenerator.ValueValidators.cs @@ -22,7 +22,7 @@ static void GenerateValueSetValidations(CodeWriter writer, ZodPropertyDescriptor var propertyName = property.Name; var propertyValueName = CodeGenHelpers.GetLocalIdentifier(propertyName, "Value"); - writer.WriteLine($"var {propertyValueName} = value.{propertyName};"); + writer.Assignment("var", propertyValueName, $"value.{propertyName}"); GenerateAllowedValuesValidation(writer, property); GenerateDeniedValuesValidation(writer, property); @@ -36,6 +36,7 @@ static void GenerateAllowedValuesValidation(CodeWriter writer, ZodPropertyDescri if ( !TryBuildValueSetComparison( + writer, property, allowedValues.Value.Values, out var comparisonExpression, @@ -52,12 +53,12 @@ out var displayValues var messageExpression = BuildErrorMessageExpression( allowedValues.Value.ValidationAttribute, "Field '{0}' must be one of the following values: {1}.", - CodeGenHelpers.Quote(displayName), - CodeGenHelpers.Quote(displayValues) + displayName.Surround(), + displayValues.Surround() ); - writer.WriteBlock( - $"if (!({comparisonExpression.Replace("propertyValue", propertyValueName)}))", + writer.IfBlock( + $"!({comparisonExpression.Replace("propertyValue", propertyValueName)})", ifBody => WriteValidationError( ifBody, @@ -78,6 +79,7 @@ static void GenerateDeniedValuesValidation(CodeWriter writer, ZodPropertyDescrip if ( !TryBuildValueSetComparison( + writer, property, deniedValues.Value.Values, out var comparisonExpression, @@ -94,12 +96,12 @@ out var displayValues var messageExpression = BuildErrorMessageExpression( deniedValues.Value.ValidationAttribute, "Field '{0}' contains a denied value. Disallowed values: {1}.", - CodeGenHelpers.Quote(displayName), - CodeGenHelpers.Quote(displayValues) + displayName.Surround(), + displayValues.Surround() ); - writer.WriteBlock( - $"if ({comparisonExpression.Replace("propertyValue", propertyValueName)})", + writer.IfBlock( + $"{comparisonExpression.Replace("propertyValue", propertyValueName)}", ifBody => WriteValidationError( ifBody, @@ -113,6 +115,7 @@ out var displayValues } static bool TryBuildValueSetComparison( + CodeWriter writer, ZodPropertyDescriptor property, EquatableArray values, out string comparisonExpression, @@ -121,7 +124,9 @@ out string displayValues { var comparisons = new List(values.Count); var propertyTypeReference = property.PropertyType.AsTypeReference(); - var propertyTypeForComparer = property.CanBeNull ? propertyTypeReference.Nullable() : propertyTypeReference; + var propertyTypeForComparer = property.CanBeNull + ? propertyTypeReference.Nullable(writer) + : propertyTypeReference; for (var i = 0; i < values.Count; i++) if (TryBuildTypedConstantExpression(property, values[i], out var expression)) @@ -196,7 +201,7 @@ out string expression #pragma warning disable IDE0072 // Add missing cases expression = property.PropertyType.SpecialType switch { - SpecialType.System_String when constant.Value is string value => CodeGenHelpers.Quote(value), + SpecialType.System_String when constant.Value is string value => value.Surround(), SpecialType.System_Char when constant.Value is char value => CodeGenHelpers.QuoteChar(value), SpecialType.System_Boolean when constant.Value is bool value => value ? "true" : "false", SpecialType.System_Byte when constant.Value is byte value => value.ToString(CultureInfo.InvariantCulture), diff --git a/src/src/SourceGenerators/packages.lock.json b/src/src/SourceGenerators/packages.lock.json deleted file mode 100644 index d834b61..0000000 --- a/src/src/SourceGenerators/packages.lock.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "version": 2, - "dependencies": { - ".NETStandard,Version=v2.0": { - "Microsoft.CodeAnalysis.Analyzers": { - "type": "Direct", - "requested": "[5.9.0, )", - "resolved": "5.9.0", - "contentHash": "jMNOo+uoBGiWbZ6Wx0dqU93r5WD4P5WnIRZdoz67RP5N09OUetHgAbo4L7hihOH1NHdD2TgW5/l+SP4gQukwww==" - }, - "Microsoft.CodeAnalysis.CSharp": { - "type": "Direct", - "requested": "[4.13.0, )", - "resolved": "4.13.0", - "contentHash": "BsH7Vijbj9IL7Fj4k/ysZSVyLGFqr75wmdFGwCKWJvSjnA1xwPaQ3hkB2BQdHOt5CpEYA6Q0I6Oo5sDTDHqHsg==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.Common": "[4.13.0]", - "System.Buffers": "4.5.1", - "System.Collections.Immutable": "8.0.0", - "System.Memory": "4.5.5", - "System.Numerics.Vectors": "4.5.0", - "System.Reflection.Metadata": "8.0.0", - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encoding.CodePages": "7.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "NETStandard.Library": { - "type": "Direct", - "requested": "[2.0.3, )", - "resolved": "2.0.3", - "contentHash": "st47PosZSHrjECdjeIzZQbzivYBJFv6P2nv4cj2ypdI204DO+vZ7l5raGMiX4eXMJ53RfOIg+/s4DHVZ54Nu2A==", - "dependencies": { - "Microsoft.NETCore.Platforms": "1.1.0" - } - }, - "Purview.SourceGeneratorFramework": { - "type": "Direct", - "requested": "[1.0.0-prerelease.26, )", - "resolved": "1.0.0-prerelease.26", - "contentHash": "smtTDwgd+549wQ7Gz7ZmqpxaHRFIpcdTbbjc1ZjAYSA7Wi8N0BCL/SFH5Nu/d/qG46osFWFbnCJTKoch2UCaiQ==" - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "4.13.0", - "contentHash": "T8nRl4mAUY4mhdYM4U2ra2vP2EL+ol8Yqwo0gwC/V55vmlXq9NxdIkZJynTpTL1uX/jHijJ90AeOEx4lf7OwzQ==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "System.Buffers": "4.5.1", - "System.Collections.Immutable": "8.0.0", - "System.Memory": "4.5.5", - "System.Numerics.Vectors": "4.5.0", - "System.Reflection.Metadata": "8.0.0", - "System.Runtime.CompilerServices.Unsafe": "6.0.0", - "System.Text.Encoding.CodePages": "7.0.0", - "System.Threading.Tasks.Extensions": "4.5.4" - } - }, - "Microsoft.NETCore.Platforms": { - "type": "Transitive", - "resolved": "1.1.0", - "contentHash": "kz0PEW2lhqygehI/d6XsPCQzD7ff7gUJaVGPVETX611eadGsA3A877GdSlU0LRVMCTH/+P3o2iDTak+S08V2+A==" - }, - "System.Buffers": { - "type": "Transitive", - "resolved": "4.5.1", - "contentHash": "Rw7ijyl1qqRS0YQD/WycNst8hUUMgrMH4FCn1nNm27M4VxchZ1js3fVjQaANHO5f3sN4isvP4a+Met9Y4YomAg==" - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "AurL6Y5BA1WotzlEvVaIDpqzpIPvYnnldxru8oXJU2yFxFUy3+pNXjXd1ymO+RA0rq0+590Q8gaz2l3Sr7fmqg==", - "dependencies": { - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Memory": { - "type": "Transitive", - "resolved": "4.5.5", - "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==", - "dependencies": { - "System.Buffers": "4.5.1", - "System.Numerics.Vectors": "4.4.0", - "System.Runtime.CompilerServices.Unsafe": "4.5.3" - } - }, - "System.Numerics.Vectors": { - "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "QQTlPTl06J/iiDbJCiepZ4H//BVraReU4O4EoRw1U02H5TLUIT7xn3GnDp9AXPSlJUDyFs4uWjWafNX6WrAojQ==" - }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "ptvgrFh7PvWI8bcVqG5rsA/weWM09EnthFHR5SCnS6IN+P4mj6rE1lBDC4U8HL9/57htKAqy4KQ3bBj84cfYyQ==", - "dependencies": { - "System.Collections.Immutable": "8.0.0", - "System.Memory": "4.5.5" - } - }, - "System.Runtime.CompilerServices.Unsafe": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" - }, - "System.Text.Encoding.CodePages": { - "type": "Transitive", - "resolved": "7.0.0", - "contentHash": "LSyCblMpvOe0N3E+8e0skHcrIhgV2huaNcjUUEa8hRtgEAm36aGkRoC8Jxlb6Ra6GSfF29ftduPNywin8XolzQ==", - "dependencies": { - "System.Memory": "4.5.5", - "System.Runtime.CompilerServices.Unsafe": "6.0.0" - } - }, - "System.Threading.Tasks.Extensions": { - "type": "Transitive", - "resolved": "4.5.4", - "contentHash": "zteT+G8xuGu6mS+mzDzYXbzS7rd3K6Fjb9RiZlYlJPam2/hU7JCBZBVEcywNuR+oZ1ncTvc/cq0faRr3P01OVg==", - "dependencies": { - "System.Runtime.CompilerServices.Unsafe": "4.5.3" - } - } - } - } -} \ No newline at end of file diff --git a/src/src/SystemTextJson/packages.lock.json b/src/src/SystemTextJson/packages.lock.json deleted file mode 100644 index 030a89d..0000000 --- a/src/src/SystemTextJson/packages.lock.json +++ /dev/null @@ -1,134 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net10.0": { - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[10.0.10, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - } - }, - "net8.0": { - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.2, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - } - }, - "net9.0": { - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[9.0.0, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - } - } - } -} \ No newline at end of file diff --git a/src/src/ZodSharp/packages.lock.json b/src/src/ZodSharp/packages.lock.json deleted file mode 100644 index d0a692c..0000000 --- a/src/src/ZodSharp/packages.lock.json +++ /dev/null @@ -1,116 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net10.0": { - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Direct", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - } - }, - "net8.0": { - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Direct", - "requested": "[8.0.2, )", - "resolved": "8.0.2", - "contentHash": "3iE7UF7MQkCv1cxzCahz+Y/guQbTqieyxyaWKhrRO91itI9cOKO76OHeQDahqG4MmW5umr3CcCvGmK92lWNlbg==" - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - } - }, - "net9.0": { - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "Direct", - "requested": "[9.0.0, )", - "resolved": "9.0.0", - "contentHash": "+6f2qv2a3dLwd5w6JanPIPs47CxRbnk+ZocMJUhv9NxP88VlOcJYZs9jY+MYSjxvady08bUZn6qgiNh7DadGgg==" - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - } - } - } -} \ No newline at end of file diff --git a/src/tests/AspNetCore.UnitTests/packages.lock.json b/src/tests/AspNetCore.UnitTests/packages.lock.json deleted file mode 100644 index 88688e0..0000000 --- a/src/tests/AspNetCore.UnitTests/packages.lock.json +++ /dev/null @@ -1,473 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net10.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==" - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[10.0.10, )" - } - }, - "ZodSharp.AspNetCore": { - "type": "Project", - "dependencies": { - "ZodSharp": "[2.0.0, )" - } - }, - "ZodSharp.SourceGenerators": { - "type": "Project" - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - } - }, - "net8.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==", - "dependencies": { - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3", - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "7WX0W96y3dpQdYG4sEGdh38g3/0lOD4/dKbn2rRVOVzKhzoZUn2gKNIKaFeKWs8RCbpFfmmEWsRhSy95hMpvqA==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "o16m2YpDN/pjHsnxf9pTGwkpcuvjW8v1/wGUwJtM1c3QZUKm7ZEO/eYRJg7iIx6GxS2Zv9lAMHpiQwHDdgqauA==" - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "hzACdIf1C+4Dqos5ijV404b94+LqfIC8nfS3mNpCDFWowb1N3PNfJPopneq32ahWlDeyaPZJqjBk76YFR69Rpg==" - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "System.Threading.Channels": "9.0.0", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.2, )" - } - }, - "ZodSharp.AspNetCore": { - "type": "Project", - "dependencies": { - "ZodSharp": "[2.0.0, )" - } - }, - "ZodSharp.SourceGenerators": { - "type": "Project" - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "System.Text.Json": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "bmsO6UdYtBdtn32zYXfsh7KlyTIzV/3V9hdT9RIb4pXKgYOsNxXR+VbWigNwBtNFVGYGm6Hwmqw5a+/IWFd36Q==", - "dependencies": { - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10" - } - } - }, - "net9.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==", - "dependencies": { - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3", - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "7WX0W96y3dpQdYG4sEGdh38g3/0lOD4/dKbn2rRVOVzKhzoZUn2gKNIKaFeKWs8RCbpFfmmEWsRhSy95hMpvqA==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "o16m2YpDN/pjHsnxf9pTGwkpcuvjW8v1/wGUwJtM1c3QZUKm7ZEO/eYRJg7iIx6GxS2Zv9lAMHpiQwHDdgqauA==" - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[9.0.0, )" - } - }, - "ZodSharp.AspNetCore": { - "type": "Project", - "dependencies": { - "ZodSharp": "[2.0.0, )" - } - }, - "ZodSharp.SourceGenerators": { - "type": "Project" - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "System.Text.Json": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "bmsO6UdYtBdtn32zYXfsh7KlyTIzV/3V9hdT9RIb4pXKgYOsNxXR+VbWigNwBtNFVGYGm6Hwmqw5a+/IWFd36Q==", - "dependencies": { - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10" - } - } - } - } -} \ No newline at end of file diff --git a/src/tests/NewtonsoftJson.UnitTests/packages.lock.json b/src/tests/NewtonsoftJson.UnitTests/packages.lock.json deleted file mode 100644 index cb42d11..0000000 --- a/src/tests/NewtonsoftJson.UnitTests/packages.lock.json +++ /dev/null @@ -1,485 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net10.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==" - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[10.0.10, )" - } - }, - "ZodSharp.NewtonsoftJson": { - "type": "Project", - "dependencies": { - "Newtonsoft.Json": "[13.0.4, )", - "ZodSharp": "[2.0.0, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "Newtonsoft.Json": { - "type": "CentralTransitive", - "requested": "[13.0.4, )", - "resolved": "13.0.4", - "contentHash": "pdgNNMai3zv51W5aq268sujXUyx7SNdE2bj1wZcWjAQrKMFZV260lbqYop1d2GM67JI1huLRwxo9ZqnfF/lC6A==" - } - }, - "net8.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==", - "dependencies": { - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3", - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "7WX0W96y3dpQdYG4sEGdh38g3/0lOD4/dKbn2rRVOVzKhzoZUn2gKNIKaFeKWs8RCbpFfmmEWsRhSy95hMpvqA==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "o16m2YpDN/pjHsnxf9pTGwkpcuvjW8v1/wGUwJtM1c3QZUKm7ZEO/eYRJg7iIx6GxS2Zv9lAMHpiQwHDdgqauA==" - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "hzACdIf1C+4Dqos5ijV404b94+LqfIC8nfS3mNpCDFWowb1N3PNfJPopneq32ahWlDeyaPZJqjBk76YFR69Rpg==" - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "System.Threading.Channels": "9.0.0", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.2, )" - } - }, - "ZodSharp.NewtonsoftJson": { - "type": "Project", - "dependencies": { - "Newtonsoft.Json": "[13.0.4, )", - "ZodSharp": "[2.0.0, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "Newtonsoft.Json": { - "type": "CentralTransitive", - "requested": "[13.0.4, )", - "resolved": "13.0.4", - "contentHash": "pdgNNMai3zv51W5aq268sujXUyx7SNdE2bj1wZcWjAQrKMFZV260lbqYop1d2GM67JI1huLRwxo9ZqnfF/lC6A==" - }, - "System.Text.Json": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "bmsO6UdYtBdtn32zYXfsh7KlyTIzV/3V9hdT9RIb4pXKgYOsNxXR+VbWigNwBtNFVGYGm6Hwmqw5a+/IWFd36Q==", - "dependencies": { - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10" - } - } - }, - "net9.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==", - "dependencies": { - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3", - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "7WX0W96y3dpQdYG4sEGdh38g3/0lOD4/dKbn2rRVOVzKhzoZUn2gKNIKaFeKWs8RCbpFfmmEWsRhSy95hMpvqA==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "o16m2YpDN/pjHsnxf9pTGwkpcuvjW8v1/wGUwJtM1c3QZUKm7ZEO/eYRJg7iIx6GxS2Zv9lAMHpiQwHDdgqauA==" - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[9.0.0, )" - } - }, - "ZodSharp.NewtonsoftJson": { - "type": "Project", - "dependencies": { - "Newtonsoft.Json": "[13.0.4, )", - "ZodSharp": "[2.0.0, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "Newtonsoft.Json": { - "type": "CentralTransitive", - "requested": "[13.0.4, )", - "resolved": "13.0.4", - "contentHash": "pdgNNMai3zv51W5aq268sujXUyx7SNdE2bj1wZcWjAQrKMFZV260lbqYop1d2GM67JI1huLRwxo9ZqnfF/lC6A==" - }, - "System.Text.Json": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "bmsO6UdYtBdtn32zYXfsh7KlyTIzV/3V9hdT9RIb4pXKgYOsNxXR+VbWigNwBtNFVGYGm6Hwmqw5a+/IWFd36Q==", - "dependencies": { - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10" - } - } - } - } -} \ No newline at end of file diff --git a/src/tests/SourceGenerators.UnitTests/Infra/ZodSourceGeneratorTestOptions.cs b/src/tests/SourceGenerators.UnitTests/Infra/ZodSourceGeneratorTestOptions.cs index 1ad1922..f45be27 100644 --- a/src/tests/SourceGenerators.UnitTests/Infra/ZodSourceGeneratorTestOptions.cs +++ b/src/tests/SourceGenerators.UnitTests/Infra/ZodSourceGeneratorTestOptions.cs @@ -22,4 +22,6 @@ public ZodSourceGeneratorTestOptions() } public static readonly ZodSourceGeneratorTestOptions NoValidation = new() { ThrowOnGenerationException = false }; + + public static readonly ZodSourceGeneratorTestOptions Compile = new() { CompileToAssembly = true }; } diff --git a/src/tests/SourceGenerators.UnitTests/ZodSchemaGeneratorTests.ValidatorAdapter.cs b/src/tests/SourceGenerators.UnitTests/ZodSchemaGeneratorTests.ValidatorAdapter.cs index 5cefb3f..c93d7a4 100644 --- a/src/tests/SourceGenerators.UnitTests/ZodSchemaGeneratorTests.ValidatorAdapter.cs +++ b/src/tests/SourceGenerators.UnitTests/ZodSchemaGeneratorTests.ValidatorAdapter.cs @@ -21,11 +21,11 @@ public class Widget var driverResult = await GenerateAsync(source, cancellationToken); var generatedSource = driverResult.GetSource("WidgetSchema"); - await Assert.That(generatedSource).Contains("class WidgetSchemaValidator"); - await Assert.That(generatedSource).Contains("IZodSchemaValidator"); - await Assert.That(generatedSource).Contains("Widget"); - await Assert.That(generatedSource).Contains("Validate("); - await Assert.That(generatedSource).Contains("return WidgetSchema.Validate(value);"); + await Assert.That(generatedSource).ContainsGeneratedCode("class WidgetSchemaValidator"); + await Assert.That(generatedSource).ContainsGeneratedCode("IZodSchemaValidator"); + await Assert.That(generatedSource).ContainsGeneratedCode("Widget"); + await Assert.That(generatedSource).ContainsGeneratedCode("Validate("); + await Assert.That(generatedSource).ContainsGeneratedCode("return WidgetSchema.Validate(value);"); } [Test] @@ -97,15 +97,9 @@ async ValueTask> CustomValidationAsync(Gizmo value, Canc }} }} }}"; - var driverResult = await GenerateAsync( - source, - new ZodSourceGeneratorTestOptions().Compile(), - cancellationToken - ); + var driverResult = await GenerateAsync(source, ZodSourceGeneratorTestOptions.Compile, cancellationToken); var assembly = await Assert.That(driverResult.CompilationResult.Assembly).IsNotNull(); - await Assert.That(driverResult).HasNoErrorDiagnostics(); - var gizmoType = assembly.GetType("Testing.Gizmo"); var gizmoSchemaType = assembly.GetType("Testing.GizmoSchemaValidator"); diff --git a/src/tests/SourceGenerators.UnitTests/packages.lock.json b/src/tests/SourceGenerators.UnitTests/packages.lock.json deleted file mode 100644 index ec9d877..0000000 --- a/src/tests/SourceGenerators.UnitTests/packages.lock.json +++ /dev/null @@ -1,853 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net10.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "Microsoft.CodeAnalysis.CSharp": { - "type": "Direct", - "requested": "[4.13.0, )", - "resolved": "4.13.0", - "contentHash": "BsH7Vijbj9IL7Fj4k/ysZSVyLGFqr75wmdFGwCKWJvSjnA1xwPaQ3hkB2BQdHOt5CpEYA6Q0I6Oo5sDTDHqHsg==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.Common": "[4.13.0]" - } - }, - "Purview.SourceGeneratorFramework.Testing.TUnit": { - "type": "Direct", - "requested": "[1.0.0-prerelease.26, )", - "resolved": "1.0.0-prerelease.26", - "contentHash": "mvLNPE5GlqQS8Eun+wkqWsSOh7pGDvk+I4xPBoLoWvqlwyX/rNd3fV23R6qCun7tC5U0jPwxe19mAlMaeiwagg==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "5.9.0", - "Microsoft.CodeAnalysis.CSharp": "4.13.0", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "4.13.0", - "Purview.SourceGeneratorFramework.Testing": "1.0.0-prerelease.26", - "TUnit.Assertions": "1.65.51", - "TUnit.Core": "1.65.51" - } - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Humanizer.Core": { - "type": "Transitive", - "resolved": "2.14.1", - "contentHash": "lQKvtaTDOXnoVJ20ibTuSIOf2i0uO0MPbDhd1jm238I+U/2ZnRENj0cktKZhtchBMtCUSRQ5v4xBCUbKNmyVMw==" - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "4.13.0", - "contentHash": "T8nRl4mAUY4mhdYM4U2ra2vP2EL+ol8Yqwo0gwC/V55vmlXq9NxdIkZJynTpTL1uX/jHijJ90AeOEx4lf7OwzQ==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0" - } - }, - "Microsoft.CodeAnalysis.CSharp.Workspaces": { - "type": "Transitive", - "resolved": "4.13.0", - "contentHash": "jglyNfcWHMhtqTmsiTcvOjnd/ibgjMhkKPaHpVrtnuftqAu7Dt8W5nciEZoDjbxSCdG39WOnPmESamqaCgUN1w==", - "dependencies": { - "Humanizer.Core": "2.14.1", - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.CSharp": "[4.13.0]", - "Microsoft.CodeAnalysis.Common": "[4.13.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.13.0]", - "System.Composition": "8.0.0" - } - }, - "Microsoft.CodeAnalysis.Workspaces.Common": { - "type": "Transitive", - "resolved": "4.13.0", - "contentHash": "7kME/hT+I8zlOWIWcX1jWLDKwLNU21u1JGzDV47KxeaYIn5LCacMD2n1LzR4+PwzGzAedy+YjRwcy+NcO9zY+g==", - "dependencies": { - "Humanizer.Core": "2.14.1", - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.Common": "[4.13.0]", - "System.Composition": "8.0.0" - } - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==" - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Purview.SourceGeneratorFramework.Testing": { - "type": "Transitive", - "resolved": "1.0.0-prerelease.26", - "contentHash": "tut/T+oWS/89tabg95Ebm1kAQCQIaVhJ8bu7tdm3jka60Kz3e6xJIiWP6UhikEkZrbr2mws0RzhFgr07PpZBmw==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "5.9.0", - "Microsoft.CodeAnalysis.CSharp": "4.13.0", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "4.13.0", - "Purview.SourceGeneratorFramework": "1.0.0-prerelease.26" - } - }, - "System.Composition": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "E9oO9olNNxA39J8CxQwf7ceIPm+j/B/PhYpyK9M4LhN/OLLRw6u5fNInkhVqaWueMB9iXxYqnwqwgz+W91loIA==", - "dependencies": { - "System.Composition.AttributedModel": "8.0.0", - "System.Composition.Convention": "8.0.0", - "System.Composition.Hosting": "8.0.0", - "System.Composition.Runtime": "8.0.0", - "System.Composition.TypedParts": "8.0.0" - } - }, - "System.Composition.AttributedModel": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "NyElSuvmBMYdn2iPG0n29i7Igu0bq99izOP3MAtEwskY3OP9jqsavvVmPn9lesVaj/KT/o/QkNjA43dOJTsDQw==" - }, - "System.Composition.Convention": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "UuVkc1B3vQU/LzEbWLMZ1aYVssv4rpShzf8wPEyrUqoGNqdYKREmB8bXR73heOMKkwS6ZnPz3PjGODT2MenukQ==", - "dependencies": { - "System.Composition.AttributedModel": "8.0.0" - } - }, - "System.Composition.Hosting": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "qwbONqoxlazxcbiohvb3t1JWZgKIKcRdXS5uEeLbo5wtuBupIbAvdC3PYTAeBCZrZeERvrtAbhYHuuS43Zr1bQ==", - "dependencies": { - "System.Composition.Runtime": "8.0.0" - } - }, - "System.Composition.Runtime": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "G+kRyB5/6+3ucRRQz+DF4uSHGqpkK8Q4ilVdbt4zvxpmvLVZNmSkyFAQpJLcbOyVF85aomJx0m+TGMDVlwx7ZQ==" - }, - "System.Composition.TypedParts": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "DsSklhuA+Dsgo3ZZrar8hjBFvq1wa1grrkNCTt+6SoX3vq0Vy+HXJnVXrU/nNH1BjlGH684A7h4hJQHZd/u5mA==", - "dependencies": { - "System.Composition.AttributedModel": "8.0.0", - "System.Composition.Hosting": "8.0.0", - "System.Composition.Runtime": "8.0.0" - } - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[10.0.10, )" - } - }, - "ZodSharp.SourceGenerators": { - "type": "Project" - }, - "Microsoft.CodeAnalysis.Analyzers": { - "type": "CentralTransitive", - "requested": "[5.9.0, )", - "resolved": "5.9.0", - "contentHash": "jMNOo+uoBGiWbZ6Wx0dqU93r5WD4P5WnIRZdoz67RP5N09OUetHgAbo4L7hihOH1NHdD2TgW5/l+SP4gQukwww==" - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "Purview.SourceGeneratorFramework": { - "type": "CentralTransitive", - "requested": "[1.0.0-prerelease.26, )", - "resolved": "1.0.0-prerelease.26", - "contentHash": "smtTDwgd+549wQ7Gz7ZmqpxaHRFIpcdTbbjc1ZjAYSA7Wi8N0BCL/SFH5Nu/d/qG46osFWFbnCJTKoch2UCaiQ==" - } - }, - "net8.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "Microsoft.CodeAnalysis.CSharp": { - "type": "Direct", - "requested": "[4.13.0, )", - "resolved": "4.13.0", - "contentHash": "BsH7Vijbj9IL7Fj4k/ysZSVyLGFqr75wmdFGwCKWJvSjnA1xwPaQ3hkB2BQdHOt5CpEYA6Q0I6Oo5sDTDHqHsg==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.Common": "[4.13.0]" - } - }, - "Purview.SourceGeneratorFramework.Testing.TUnit": { - "type": "Direct", - "requested": "[1.0.0-prerelease.26, )", - "resolved": "1.0.0-prerelease.26", - "contentHash": "mvLNPE5GlqQS8Eun+wkqWsSOh7pGDvk+I4xPBoLoWvqlwyX/rNd3fV23R6qCun7tC5U0jPwxe19mAlMaeiwagg==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "5.9.0", - "Microsoft.CodeAnalysis.CSharp": "4.13.0", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "4.13.0", - "Purview.SourceGeneratorFramework.Testing": "1.0.0-prerelease.26", - "TUnit.Assertions": "1.65.51", - "TUnit.Core": "1.65.51" - } - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Humanizer.Core": { - "type": "Transitive", - "resolved": "2.14.1", - "contentHash": "lQKvtaTDOXnoVJ20ibTuSIOf2i0uO0MPbDhd1jm238I+U/2ZnRENj0cktKZhtchBMtCUSRQ5v4xBCUbKNmyVMw==" - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "4.13.0", - "contentHash": "T8nRl4mAUY4mhdYM4U2ra2vP2EL+ol8Yqwo0gwC/V55vmlXq9NxdIkZJynTpTL1uX/jHijJ90AeOEx4lf7OwzQ==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0" - } - }, - "Microsoft.CodeAnalysis.CSharp.Workspaces": { - "type": "Transitive", - "resolved": "4.13.0", - "contentHash": "jglyNfcWHMhtqTmsiTcvOjnd/ibgjMhkKPaHpVrtnuftqAu7Dt8W5nciEZoDjbxSCdG39WOnPmESamqaCgUN1w==", - "dependencies": { - "Humanizer.Core": "2.14.1", - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.CSharp": "[4.13.0]", - "Microsoft.CodeAnalysis.Common": "[4.13.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.13.0]", - "System.Composition": "8.0.0", - "System.IO.Pipelines": "8.0.0" - } - }, - "Microsoft.CodeAnalysis.Workspaces.Common": { - "type": "Transitive", - "resolved": "4.13.0", - "contentHash": "7kME/hT+I8zlOWIWcX1jWLDKwLNU21u1JGzDV47KxeaYIn5LCacMD2n1LzR4+PwzGzAedy+YjRwcy+NcO9zY+g==", - "dependencies": { - "Humanizer.Core": "2.14.1", - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.Common": "[4.13.0]", - "System.Composition": "8.0.0", - "System.IO.Pipelines": "8.0.0" - } - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==", - "dependencies": { - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3", - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Purview.SourceGeneratorFramework.Testing": { - "type": "Transitive", - "resolved": "1.0.0-prerelease.26", - "contentHash": "tut/T+oWS/89tabg95Ebm1kAQCQIaVhJ8bu7tdm3jka60Kz3e6xJIiWP6UhikEkZrbr2mws0RzhFgr07PpZBmw==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "5.9.0", - "Microsoft.CodeAnalysis.CSharp": "4.13.0", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "4.13.0", - "Purview.SourceGeneratorFramework": "1.0.0-prerelease.26" - } - }, - "System.Composition": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "E9oO9olNNxA39J8CxQwf7ceIPm+j/B/PhYpyK9M4LhN/OLLRw6u5fNInkhVqaWueMB9iXxYqnwqwgz+W91loIA==", - "dependencies": { - "System.Composition.AttributedModel": "8.0.0", - "System.Composition.Convention": "8.0.0", - "System.Composition.Hosting": "8.0.0", - "System.Composition.Runtime": "8.0.0", - "System.Composition.TypedParts": "8.0.0" - } - }, - "System.Composition.AttributedModel": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "NyElSuvmBMYdn2iPG0n29i7Igu0bq99izOP3MAtEwskY3OP9jqsavvVmPn9lesVaj/KT/o/QkNjA43dOJTsDQw==" - }, - "System.Composition.Convention": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "UuVkc1B3vQU/LzEbWLMZ1aYVssv4rpShzf8wPEyrUqoGNqdYKREmB8bXR73heOMKkwS6ZnPz3PjGODT2MenukQ==", - "dependencies": { - "System.Composition.AttributedModel": "8.0.0" - } - }, - "System.Composition.Hosting": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "qwbONqoxlazxcbiohvb3t1JWZgKIKcRdXS5uEeLbo5wtuBupIbAvdC3PYTAeBCZrZeERvrtAbhYHuuS43Zr1bQ==", - "dependencies": { - "System.Composition.Runtime": "8.0.0" - } - }, - "System.Composition.Runtime": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "G+kRyB5/6+3ucRRQz+DF4uSHGqpkK8Q4ilVdbt4zvxpmvLVZNmSkyFAQpJLcbOyVF85aomJx0m+TGMDVlwx7ZQ==" - }, - "System.Composition.TypedParts": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "DsSklhuA+Dsgo3ZZrar8hjBFvq1wa1grrkNCTt+6SoX3vq0Vy+HXJnVXrU/nNH1BjlGH684A7h4hJQHZd/u5mA==", - "dependencies": { - "System.Composition.AttributedModel": "8.0.0", - "System.Composition.Hosting": "8.0.0", - "System.Composition.Runtime": "8.0.0" - } - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "7WX0W96y3dpQdYG4sEGdh38g3/0lOD4/dKbn2rRVOVzKhzoZUn2gKNIKaFeKWs8RCbpFfmmEWsRhSy95hMpvqA==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "o16m2YpDN/pjHsnxf9pTGwkpcuvjW8v1/wGUwJtM1c3QZUKm7ZEO/eYRJg7iIx6GxS2Zv9lAMHpiQwHDdgqauA==" - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "hzACdIf1C+4Dqos5ijV404b94+LqfIC8nfS3mNpCDFWowb1N3PNfJPopneq32ahWlDeyaPZJqjBk76YFR69Rpg==" - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "System.Threading.Channels": "9.0.0", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.2, )" - } - }, - "ZodSharp.SourceGenerators": { - "type": "Project" - }, - "Microsoft.CodeAnalysis.Analyzers": { - "type": "CentralTransitive", - "requested": "[5.9.0, )", - "resolved": "5.9.0", - "contentHash": "jMNOo+uoBGiWbZ6Wx0dqU93r5WD4P5WnIRZdoz67RP5N09OUetHgAbo4L7hihOH1NHdD2TgW5/l+SP4gQukwww==" - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "Purview.SourceGeneratorFramework": { - "type": "CentralTransitive", - "requested": "[1.0.0-prerelease.26, )", - "resolved": "1.0.0-prerelease.26", - "contentHash": "smtTDwgd+549wQ7Gz7ZmqpxaHRFIpcdTbbjc1ZjAYSA7Wi8N0BCL/SFH5Nu/d/qG46osFWFbnCJTKoch2UCaiQ==" - }, - "System.Text.Json": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "bmsO6UdYtBdtn32zYXfsh7KlyTIzV/3V9hdT9RIb4pXKgYOsNxXR+VbWigNwBtNFVGYGm6Hwmqw5a+/IWFd36Q==", - "dependencies": { - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10" - } - } - }, - "net9.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "Microsoft.CodeAnalysis.CSharp": { - "type": "Direct", - "requested": "[4.13.0, )", - "resolved": "4.13.0", - "contentHash": "BsH7Vijbj9IL7Fj4k/ysZSVyLGFqr75wmdFGwCKWJvSjnA1xwPaQ3hkB2BQdHOt5CpEYA6Q0I6Oo5sDTDHqHsg==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.Common": "[4.13.0]" - } - }, - "Purview.SourceGeneratorFramework.Testing.TUnit": { - "type": "Direct", - "requested": "[1.0.0-prerelease.26, )", - "resolved": "1.0.0-prerelease.26", - "contentHash": "mvLNPE5GlqQS8Eun+wkqWsSOh7pGDvk+I4xPBoLoWvqlwyX/rNd3fV23R6qCun7tC5U0jPwxe19mAlMaeiwagg==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "5.9.0", - "Microsoft.CodeAnalysis.CSharp": "4.13.0", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "4.13.0", - "Purview.SourceGeneratorFramework.Testing": "1.0.0-prerelease.26", - "TUnit.Assertions": "1.65.51", - "TUnit.Core": "1.65.51" - } - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Humanizer.Core": { - "type": "Transitive", - "resolved": "2.14.1", - "contentHash": "lQKvtaTDOXnoVJ20ibTuSIOf2i0uO0MPbDhd1jm238I+U/2ZnRENj0cktKZhtchBMtCUSRQ5v4xBCUbKNmyVMw==" - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "4.13.0", - "contentHash": "T8nRl4mAUY4mhdYM4U2ra2vP2EL+ol8Yqwo0gwC/V55vmlXq9NxdIkZJynTpTL1uX/jHijJ90AeOEx4lf7OwzQ==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0" - } - }, - "Microsoft.CodeAnalysis.CSharp.Workspaces": { - "type": "Transitive", - "resolved": "4.13.0", - "contentHash": "jglyNfcWHMhtqTmsiTcvOjnd/ibgjMhkKPaHpVrtnuftqAu7Dt8W5nciEZoDjbxSCdG39WOnPmESamqaCgUN1w==", - "dependencies": { - "Humanizer.Core": "2.14.1", - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.CSharp": "[4.13.0]", - "Microsoft.CodeAnalysis.Common": "[4.13.0]", - "Microsoft.CodeAnalysis.Workspaces.Common": "[4.13.0]", - "System.Composition": "8.0.0" - } - }, - "Microsoft.CodeAnalysis.Workspaces.Common": { - "type": "Transitive", - "resolved": "4.13.0", - "contentHash": "7kME/hT+I8zlOWIWcX1jWLDKwLNU21u1JGzDV47KxeaYIn5LCacMD2n1LzR4+PwzGzAedy+YjRwcy+NcO9zY+g==", - "dependencies": { - "Humanizer.Core": "2.14.1", - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.Common": "[4.13.0]", - "System.Composition": "8.0.0" - } - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==", - "dependencies": { - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3", - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Purview.SourceGeneratorFramework.Testing": { - "type": "Transitive", - "resolved": "1.0.0-prerelease.26", - "contentHash": "tut/T+oWS/89tabg95Ebm1kAQCQIaVhJ8bu7tdm3jka60Kz3e6xJIiWP6UhikEkZrbr2mws0RzhFgr07PpZBmw==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "5.9.0", - "Microsoft.CodeAnalysis.CSharp": "4.13.0", - "Microsoft.CodeAnalysis.CSharp.Workspaces": "4.13.0", - "Purview.SourceGeneratorFramework": "1.0.0-prerelease.26" - } - }, - "System.Composition": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "E9oO9olNNxA39J8CxQwf7ceIPm+j/B/PhYpyK9M4LhN/OLLRw6u5fNInkhVqaWueMB9iXxYqnwqwgz+W91loIA==", - "dependencies": { - "System.Composition.AttributedModel": "8.0.0", - "System.Composition.Convention": "8.0.0", - "System.Composition.Hosting": "8.0.0", - "System.Composition.Runtime": "8.0.0", - "System.Composition.TypedParts": "8.0.0" - } - }, - "System.Composition.AttributedModel": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "NyElSuvmBMYdn2iPG0n29i7Igu0bq99izOP3MAtEwskY3OP9jqsavvVmPn9lesVaj/KT/o/QkNjA43dOJTsDQw==" - }, - "System.Composition.Convention": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "UuVkc1B3vQU/LzEbWLMZ1aYVssv4rpShzf8wPEyrUqoGNqdYKREmB8bXR73heOMKkwS6ZnPz3PjGODT2MenukQ==", - "dependencies": { - "System.Composition.AttributedModel": "8.0.0" - } - }, - "System.Composition.Hosting": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "qwbONqoxlazxcbiohvb3t1JWZgKIKcRdXS5uEeLbo5wtuBupIbAvdC3PYTAeBCZrZeERvrtAbhYHuuS43Zr1bQ==", - "dependencies": { - "System.Composition.Runtime": "8.0.0" - } - }, - "System.Composition.Runtime": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "G+kRyB5/6+3ucRRQz+DF4uSHGqpkK8Q4ilVdbt4zvxpmvLVZNmSkyFAQpJLcbOyVF85aomJx0m+TGMDVlwx7ZQ==" - }, - "System.Composition.TypedParts": { - "type": "Transitive", - "resolved": "8.0.0", - "contentHash": "DsSklhuA+Dsgo3ZZrar8hjBFvq1wa1grrkNCTt+6SoX3vq0Vy+HXJnVXrU/nNH1BjlGH684A7h4hJQHZd/u5mA==", - "dependencies": { - "System.Composition.AttributedModel": "8.0.0", - "System.Composition.Hosting": "8.0.0", - "System.Composition.Runtime": "8.0.0" - } - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "7WX0W96y3dpQdYG4sEGdh38g3/0lOD4/dKbn2rRVOVzKhzoZUn2gKNIKaFeKWs8RCbpFfmmEWsRhSy95hMpvqA==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "o16m2YpDN/pjHsnxf9pTGwkpcuvjW8v1/wGUwJtM1c3QZUKm7ZEO/eYRJg7iIx6GxS2Zv9lAMHpiQwHDdgqauA==" - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[9.0.0, )" - } - }, - "ZodSharp.SourceGenerators": { - "type": "Project" - }, - "Microsoft.CodeAnalysis.Analyzers": { - "type": "CentralTransitive", - "requested": "[5.9.0, )", - "resolved": "5.9.0", - "contentHash": "jMNOo+uoBGiWbZ6Wx0dqU93r5WD4P5WnIRZdoz67RP5N09OUetHgAbo4L7hihOH1NHdD2TgW5/l+SP4gQukwww==" - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "Purview.SourceGeneratorFramework": { - "type": "CentralTransitive", - "requested": "[1.0.0-prerelease.26, )", - "resolved": "1.0.0-prerelease.26", - "contentHash": "smtTDwgd+549wQ7Gz7ZmqpxaHRFIpcdTbbjc1ZjAYSA7Wi8N0BCL/SFH5Nu/d/qG46osFWFbnCJTKoch2UCaiQ==" - }, - "System.Text.Json": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "bmsO6UdYtBdtn32zYXfsh7KlyTIzV/3V9hdT9RIb4pXKgYOsNxXR+VbWigNwBtNFVGYGm6Hwmqw5a+/IWFd36Q==", - "dependencies": { - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10" - } - } - } - } -} \ No newline at end of file diff --git a/src/tests/SystemTextJson.UnitTests/packages.lock.json b/src/tests/SystemTextJson.UnitTests/packages.lock.json deleted file mode 100644 index 888a00b..0000000 --- a/src/tests/SystemTextJson.UnitTests/packages.lock.json +++ /dev/null @@ -1,464 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net10.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==" - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[10.0.10, )" - } - }, - "ZodSharp.SystemTextJson": { - "type": "Project", - "dependencies": { - "ZodSharp": "[2.0.0, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - } - }, - "net8.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==", - "dependencies": { - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3", - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "7WX0W96y3dpQdYG4sEGdh38g3/0lOD4/dKbn2rRVOVzKhzoZUn2gKNIKaFeKWs8RCbpFfmmEWsRhSy95hMpvqA==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "o16m2YpDN/pjHsnxf9pTGwkpcuvjW8v1/wGUwJtM1c3QZUKm7ZEO/eYRJg7iIx6GxS2Zv9lAMHpiQwHDdgqauA==" - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "hzACdIf1C+4Dqos5ijV404b94+LqfIC8nfS3mNpCDFWowb1N3PNfJPopneq32ahWlDeyaPZJqjBk76YFR69Rpg==" - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "System.Threading.Channels": "9.0.0", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.2, )" - } - }, - "ZodSharp.SystemTextJson": { - "type": "Project", - "dependencies": { - "ZodSharp": "[2.0.0, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "System.Text.Json": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "bmsO6UdYtBdtn32zYXfsh7KlyTIzV/3V9hdT9RIb4pXKgYOsNxXR+VbWigNwBtNFVGYGm6Hwmqw5a+/IWFd36Q==", - "dependencies": { - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10" - } - } - }, - "net9.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==", - "dependencies": { - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3", - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "7WX0W96y3dpQdYG4sEGdh38g3/0lOD4/dKbn2rRVOVzKhzoZUn2gKNIKaFeKWs8RCbpFfmmEWsRhSy95hMpvqA==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "o16m2YpDN/pjHsnxf9pTGwkpcuvjW8v1/wGUwJtM1c3QZUKm7ZEO/eYRJg7iIx6GxS2Zv9lAMHpiQwHDdgqauA==" - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[9.0.0, )" - } - }, - "ZodSharp.SystemTextJson": { - "type": "Project", - "dependencies": { - "ZodSharp": "[2.0.0, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "System.Text.Json": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "bmsO6UdYtBdtn32zYXfsh7KlyTIzV/3V9hdT9RIb4pXKgYOsNxXR+VbWigNwBtNFVGYGm6Hwmqw5a+/IWFd36Q==", - "dependencies": { - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10" - } - } - } - } -} \ No newline at end of file diff --git a/src/tests/ZodSharp.PerformanceTests/packages.lock.json b/src/tests/ZodSharp.PerformanceTests/packages.lock.json deleted file mode 100644 index ab6cc56..0000000 --- a/src/tests/ZodSharp.PerformanceTests/packages.lock.json +++ /dev/null @@ -1,643 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net10.0": { - "BenchmarkDotNet": { - "type": "Direct", - "requested": "[0.15.8, )", - "resolved": "0.15.8", - "contentHash": "paCfrWxSeHqn3rUZc0spYXVFnHCF0nzRhG0nOLnyTjZYs8spsimBaaNmb3vwqvALKIplbYq/TF393vYiYSnh/Q==", - "dependencies": { - "BenchmarkDotNet.Annotations": "0.15.8", - "CommandLineParser": "2.9.1", - "Gee.External.Capstone": "2.3.0", - "Iced": "1.21.0", - "Microsoft.CodeAnalysis.CSharp": "4.14.0", - "Microsoft.Diagnostics.Runtime": "3.1.512801", - "Microsoft.Diagnostics.Tracing.TraceEvent": "3.1.21", - "Microsoft.DotNet.PlatformAbstractions": "3.1.6", - "Perfolizer": "[0.6.1]", - "System.Management": "9.0.5" - } - }, - "Microsoft.CodeAnalysis.CSharp": { - "type": "Direct", - "requested": "[4.14.0, )", - "resolved": "4.14.0", - "contentHash": "568a6wcTivauIhbeWcCwfWwIn7UV7MeHEBvFB2uzGIpM2OhJ4eM/FZ8KS0yhPoNxnSpjGzz7x7CIjTxhslojQA==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.Common": "[4.14.0]" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Newtonsoft.Json": { - "type": "Direct", - "requested": "[13.0.4, )", - "resolved": "13.0.4", - "contentHash": "pdgNNMai3zv51W5aq268sujXUyx7SNdE2bj1wZcWjAQrKMFZV260lbqYop1d2GM67JI1huLRwxo9ZqnfF/lC6A==" - }, - "BenchmarkDotNet.Annotations": { - "type": "Transitive", - "resolved": "0.15.8", - "contentHash": "hfucY0ycAsB0SsoaZcaAp9oq5wlWBJcylvEJb9pmvdYUx6PD6S4mDiYnZWjdjAlLhIpe/xtGCwzORfzAzPqvzA==" - }, - "CommandLineParser": { - "type": "Transitive", - "resolved": "2.9.1", - "contentHash": "OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA==" - }, - "Gee.External.Capstone": { - "type": "Transitive", - "resolved": "2.3.0", - "contentHash": "2ap/rYmjtzCOT8hxrnEW/QeiOt+paD8iRrIcdKX0cxVwWLFa1e+JDBNeECakmccXrSFeBQuu5AV8SNkipFMMMw==" - }, - "Iced": { - "type": "Transitive", - "resolved": "1.21.0", - "contentHash": "dv5+81Q1TBQvVMSOOOmRcjJmvWcX3BZPZsIq31+RLc5cNft0IHAyNlkdb7ZarOWG913PyBoFDsDXoCIlKmLclg==" - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "4.14.0", - "contentHash": "PC3tuwZYnC+idaPuoC/AZpEdwrtX7qFpmnrfQkgobGIWiYmGi5MCRtl5mx6QrfMGQpK78X2lfIEoZDLg/qnuHg==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0" - } - }, - "Microsoft.Diagnostics.NETCore.Client": { - "type": "Transitive", - "resolved": "0.2.510501", - "contentHash": "juoqJYMDs+lRrrZyOkXXMImJHneCF23cuvO4waFRd2Ds7j+ZuGIPbJm0Y/zz34BdeaGiiwGWraMUlln05W1PCQ==", - "dependencies": { - "Microsoft.Extensions.Logging": "6.0.0" - } - }, - "Microsoft.Diagnostics.Runtime": { - "type": "Transitive", - "resolved": "3.1.512801", - "contentHash": "0lMUDr2oxNZa28D6NH5BuSQEe5T9tZziIkvkD44YkkCGQXPJqvFjLq5ZQq1hYLl3RjQJrY+hR0jFgap+EWPDTw==", - "dependencies": { - "Microsoft.Diagnostics.NETCore.Client": "0.2.410101" - } - }, - "Microsoft.Diagnostics.Tracing.TraceEvent": { - "type": "Transitive", - "resolved": "3.1.21", - "contentHash": "/OrJFKaojSR6TkUKtwh8/qA9XWNtxLrXMqvEb89dBSKCWjaGVTbKMYodIUgF5deCEtmd6GXuRerciXGl5bhZ7Q==", - "dependencies": { - "Microsoft.Diagnostics.NETCore.Client": "0.2.510501", - "System.Reflection.TypeExtensions": "4.7.0" - } - }, - "Microsoft.DotNet.PlatformAbstractions": { - "type": "Transitive", - "resolved": "3.1.6", - "contentHash": "jek4XYaQ/PGUwDKKhwR8K47Uh1189PFzMeLqO83mXrXQVIpARZCcfuDedH50YDTepBkfijCZN5U/vZi++erxtg==" - }, - "Microsoft.Extensions.Logging": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "eIbyj40QDg1NDz0HBW0S5f3wrLVnKWnDJ/JtZ+yJDFnDj90VoPuoPmFkeaXrtu+0cKm5GRAwoDf+dBWXK0TUdg==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "6.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "Microsoft.Extensions.Logging.Abstractions": "6.0.0", - "Microsoft.Extensions.Options": "6.0.0" - } - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "Microsoft.Extensions.Primitives": "6.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==" - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "Perfolizer": { - "type": "Transitive", - "resolved": "0.6.1", - "contentHash": "CR1QmWg4XYBd1Pb7WseP+sDmV8nGPwvmowKynExTqr3OuckIGVMhvmN4LC5PGzfXqDlR295+hz/T7syA1CxEqA==", - "dependencies": { - "Pragmastat": "3.2.4" - } - }, - "Pragmastat": { - "type": "Transitive", - "resolved": "3.2.4", - "contentHash": "I5qFifWw/gaTQT52MhzjZpkm/JPlfjSeO/DTZJjO7+hTKI+0aGRgOgZ3NN6D96dDuuqbIAZSeA5RimtHjqrA2A==" - }, - "System.CodeDom": { - "type": "Transitive", - "resolved": "9.0.5", - "contentHash": "cuzLM2MWutf9ZBEMPYYfd0DXwYdvntp7VCT6a/wvbKCa2ZuvGmW74xi+YBa2mrfEieAXqM4TNKlMmSnfAfpUoQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "System.Management": { - "type": "Transitive", - "resolved": "9.0.5", - "contentHash": "n6o9PZm9p25+zAzC3/48K0oHnaPKTInRrxqFq1fi/5TPbMLjuoCm/h//mS3cUmSy+9AO1Z+qsC/Ilt/ZFatv5Q==", - "dependencies": { - "System.CodeDom": "9.0.5" - } - }, - "System.Reflection.TypeExtensions": { - "type": "Transitive", - "resolved": "4.7.0", - "contentHash": "VybpaOQQhqE6siHppMktjfGBw1GCwvCqiufqmP8F1nj7fTUNtW35LOEt3UZTEsECfo+ELAl/9o9nJx3U91i7vA==" - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[10.0.10, )" - } - }, - "Microsoft.CodeAnalysis.Analyzers": { - "type": "CentralTransitive", - "requested": "[5.9.0, )", - "resolved": "5.9.0", - "contentHash": "jMNOo+uoBGiWbZ6Wx0dqU93r5WD4P5WnIRZdoz67RP5N09OUetHgAbo4L7hihOH1NHdD2TgW5/l+SP4gQukwww==" - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "CentralTransitive", - "requested": "[10.0.0, )", - "resolved": "10.0.0", - "contentHash": "f0RBabswJq+gRu5a+hWIobrLWiUYPKMhCD9WO3sYBAdSy3FFH14LMvLVFZc2kPSCimBLxSuitUhsd6tb0TAY6A==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - } - }, - "net8.0": { - "BenchmarkDotNet": { - "type": "Direct", - "requested": "[0.15.8, )", - "resolved": "0.15.8", - "contentHash": "paCfrWxSeHqn3rUZc0spYXVFnHCF0nzRhG0nOLnyTjZYs8spsimBaaNmb3vwqvALKIplbYq/TF393vYiYSnh/Q==", - "dependencies": { - "BenchmarkDotNet.Annotations": "0.15.8", - "CommandLineParser": "2.9.1", - "Gee.External.Capstone": "2.3.0", - "Iced": "1.21.0", - "Microsoft.CodeAnalysis.CSharp": "4.14.0", - "Microsoft.Diagnostics.Runtime": "3.1.512801", - "Microsoft.Diagnostics.Tracing.TraceEvent": "3.1.21", - "Microsoft.DotNet.PlatformAbstractions": "3.1.6", - "Perfolizer": "[0.6.1]", - "System.Management": "9.0.5" - } - }, - "Microsoft.CodeAnalysis.CSharp": { - "type": "Direct", - "requested": "[4.14.0, )", - "resolved": "4.14.0", - "contentHash": "568a6wcTivauIhbeWcCwfWwIn7UV7MeHEBvFB2uzGIpM2OhJ4eM/FZ8KS0yhPoNxnSpjGzz7x7CIjTxhslojQA==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.Common": "[4.14.0]", - "System.Collections.Immutable": "9.0.0", - "System.Reflection.Metadata": "9.0.0" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Newtonsoft.Json": { - "type": "Direct", - "requested": "[13.0.4, )", - "resolved": "13.0.4", - "contentHash": "pdgNNMai3zv51W5aq268sujXUyx7SNdE2bj1wZcWjAQrKMFZV260lbqYop1d2GM67JI1huLRwxo9ZqnfF/lC6A==" - }, - "BenchmarkDotNet.Annotations": { - "type": "Transitive", - "resolved": "0.15.8", - "contentHash": "hfucY0ycAsB0SsoaZcaAp9oq5wlWBJcylvEJb9pmvdYUx6PD6S4mDiYnZWjdjAlLhIpe/xtGCwzORfzAzPqvzA==" - }, - "CommandLineParser": { - "type": "Transitive", - "resolved": "2.9.1", - "contentHash": "OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA==" - }, - "Gee.External.Capstone": { - "type": "Transitive", - "resolved": "2.3.0", - "contentHash": "2ap/rYmjtzCOT8hxrnEW/QeiOt+paD8iRrIcdKX0cxVwWLFa1e+JDBNeECakmccXrSFeBQuu5AV8SNkipFMMMw==" - }, - "Iced": { - "type": "Transitive", - "resolved": "1.21.0", - "contentHash": "dv5+81Q1TBQvVMSOOOmRcjJmvWcX3BZPZsIq31+RLc5cNft0IHAyNlkdb7ZarOWG913PyBoFDsDXoCIlKmLclg==" - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "4.14.0", - "contentHash": "PC3tuwZYnC+idaPuoC/AZpEdwrtX7qFpmnrfQkgobGIWiYmGi5MCRtl5mx6QrfMGQpK78X2lfIEoZDLg/qnuHg==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "System.Collections.Immutable": "9.0.0", - "System.Reflection.Metadata": "9.0.0" - } - }, - "Microsoft.Diagnostics.NETCore.Client": { - "type": "Transitive", - "resolved": "0.2.510501", - "contentHash": "juoqJYMDs+lRrrZyOkXXMImJHneCF23cuvO4waFRd2Ds7j+ZuGIPbJm0Y/zz34BdeaGiiwGWraMUlln05W1PCQ==", - "dependencies": { - "Microsoft.Extensions.Logging": "6.0.0" - } - }, - "Microsoft.Diagnostics.Runtime": { - "type": "Transitive", - "resolved": "3.1.512801", - "contentHash": "0lMUDr2oxNZa28D6NH5BuSQEe5T9tZziIkvkD44YkkCGQXPJqvFjLq5ZQq1hYLl3RjQJrY+hR0jFgap+EWPDTw==", - "dependencies": { - "Microsoft.Diagnostics.NETCore.Client": "0.2.410101" - } - }, - "Microsoft.Diagnostics.Tracing.TraceEvent": { - "type": "Transitive", - "resolved": "3.1.21", - "contentHash": "/OrJFKaojSR6TkUKtwh8/qA9XWNtxLrXMqvEb89dBSKCWjaGVTbKMYodIUgF5deCEtmd6GXuRerciXGl5bhZ7Q==", - "dependencies": { - "Microsoft.Diagnostics.NETCore.Client": "0.2.510501" - } - }, - "Microsoft.DotNet.PlatformAbstractions": { - "type": "Transitive", - "resolved": "3.1.6", - "contentHash": "jek4XYaQ/PGUwDKKhwR8K47Uh1189PFzMeLqO83mXrXQVIpARZCcfuDedH50YDTepBkfijCZN5U/vZi++erxtg==" - }, - "Microsoft.Extensions.Logging": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "eIbyj40QDg1NDz0HBW0S5f3wrLVnKWnDJ/JtZ+yJDFnDj90VoPuoPmFkeaXrtu+0cKm5GRAwoDf+dBWXK0TUdg==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "6.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "Microsoft.Extensions.Logging.Abstractions": "6.0.0", - "Microsoft.Extensions.Options": "6.0.0" - } - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "Microsoft.Extensions.Primitives": "6.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==" - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "Perfolizer": { - "type": "Transitive", - "resolved": "0.6.1", - "contentHash": "CR1QmWg4XYBd1Pb7WseP+sDmV8nGPwvmowKynExTqr3OuckIGVMhvmN4LC5PGzfXqDlR295+hz/T7syA1CxEqA==", - "dependencies": { - "Pragmastat": "3.2.4" - } - }, - "Pragmastat": { - "type": "Transitive", - "resolved": "3.2.4", - "contentHash": "I5qFifWw/gaTQT52MhzjZpkm/JPlfjSeO/DTZJjO7+hTKI+0aGRgOgZ3NN6D96dDuuqbIAZSeA5RimtHjqrA2A==" - }, - "System.CodeDom": { - "type": "Transitive", - "resolved": "9.0.5", - "contentHash": "cuzLM2MWutf9ZBEMPYYfd0DXwYdvntp7VCT6a/wvbKCa2ZuvGmW74xi+YBa2mrfEieAXqM4TNKlMmSnfAfpUoQ==" - }, - "System.Collections.Immutable": { - "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "QhkXUl2gNrQtvPmtBTQHb0YsUrDiDQ2QS09YbtTTiSjGcf7NBqtYbrG/BE06zcBPCKEwQGzIv13IVdXNOSub2w==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "System.Management": { - "type": "Transitive", - "resolved": "9.0.5", - "contentHash": "n6o9PZm9p25+zAzC3/48K0oHnaPKTInRrxqFq1fi/5TPbMLjuoCm/h//mS3cUmSy+9AO1Z+qsC/Ilt/ZFatv5Q==", - "dependencies": { - "System.CodeDom": "9.0.5" - } - }, - "System.Reflection.Metadata": { - "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "ANiqLu3DxW9kol/hMmTWbt3414t9ftdIuiIU7j80okq2YzAueo120M442xk1kDJWtmZTqWQn7wHDvMRipVOEOQ==", - "dependencies": { - "System.Collections.Immutable": "9.0.0" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.2, )" - } - }, - "Microsoft.CodeAnalysis.Analyzers": { - "type": "CentralTransitive", - "requested": "[5.9.0, )", - "resolved": "5.9.0", - "contentHash": "jMNOo+uoBGiWbZ6Wx0dqU93r5WD4P5WnIRZdoz67RP5N09OUetHgAbo4L7hihOH1NHdD2TgW5/l+SP4gQukwww==" - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "CentralTransitive", - "requested": "[10.0.0, )", - "resolved": "10.0.0", - "contentHash": "f0RBabswJq+gRu5a+hWIobrLWiUYPKMhCD9WO3sYBAdSy3FFH14LMvLVFZc2kPSCimBLxSuitUhsd6tb0TAY6A==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - } - }, - "net9.0": { - "BenchmarkDotNet": { - "type": "Direct", - "requested": "[0.15.8, )", - "resolved": "0.15.8", - "contentHash": "paCfrWxSeHqn3rUZc0spYXVFnHCF0nzRhG0nOLnyTjZYs8spsimBaaNmb3vwqvALKIplbYq/TF393vYiYSnh/Q==", - "dependencies": { - "BenchmarkDotNet.Annotations": "0.15.8", - "CommandLineParser": "2.9.1", - "Gee.External.Capstone": "2.3.0", - "Iced": "1.21.0", - "Microsoft.CodeAnalysis.CSharp": "4.14.0", - "Microsoft.Diagnostics.Runtime": "3.1.512801", - "Microsoft.Diagnostics.Tracing.TraceEvent": "3.1.21", - "Microsoft.DotNet.PlatformAbstractions": "3.1.6", - "Perfolizer": "[0.6.1]", - "System.Management": "9.0.5" - } - }, - "Microsoft.CodeAnalysis.CSharp": { - "type": "Direct", - "requested": "[4.14.0, )", - "resolved": "4.14.0", - "contentHash": "568a6wcTivauIhbeWcCwfWwIn7UV7MeHEBvFB2uzGIpM2OhJ4eM/FZ8KS0yhPoNxnSpjGzz7x7CIjTxhslojQA==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0", - "Microsoft.CodeAnalysis.Common": "[4.14.0]" - } - }, - "Microsoft.SourceLink.GitHub": { - "type": "Direct", - "requested": "[10.0.300, )", - "resolved": "10.0.300", - "contentHash": "QzCtLkXVb3l4IxcpvJCbzUwMLihAmLN6vVLjQGSzYSF8d2dvXxqJAZk83RV3gYnp2egz8jRMgSR2woY3vOahTA==", - "dependencies": { - "Microsoft.Build.Tasks.Git": "10.0.300", - "Microsoft.SourceLink.Common": "10.0.300", - "System.IO.Hashing": "10.0.8" - } - }, - "Newtonsoft.Json": { - "type": "Direct", - "requested": "[13.0.4, )", - "resolved": "13.0.4", - "contentHash": "pdgNNMai3zv51W5aq268sujXUyx7SNdE2bj1wZcWjAQrKMFZV260lbqYop1d2GM67JI1huLRwxo9ZqnfF/lC6A==" - }, - "BenchmarkDotNet.Annotations": { - "type": "Transitive", - "resolved": "0.15.8", - "contentHash": "hfucY0ycAsB0SsoaZcaAp9oq5wlWBJcylvEJb9pmvdYUx6PD6S4mDiYnZWjdjAlLhIpe/xtGCwzORfzAzPqvzA==" - }, - "CommandLineParser": { - "type": "Transitive", - "resolved": "2.9.1", - "contentHash": "OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA==" - }, - "Gee.External.Capstone": { - "type": "Transitive", - "resolved": "2.3.0", - "contentHash": "2ap/rYmjtzCOT8hxrnEW/QeiOt+paD8iRrIcdKX0cxVwWLFa1e+JDBNeECakmccXrSFeBQuu5AV8SNkipFMMMw==" - }, - "Iced": { - "type": "Transitive", - "resolved": "1.21.0", - "contentHash": "dv5+81Q1TBQvVMSOOOmRcjJmvWcX3BZPZsIq31+RLc5cNft0IHAyNlkdb7ZarOWG913PyBoFDsDXoCIlKmLclg==" - }, - "Microsoft.Build.Tasks.Git": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "P0kaQwVZx4xIUe2FtrLyBadYNXuAljttJUPvjBYRuHhPE8L77L42KakLDkaADRiUrGspoLcMwayjrbQhYTr0zA==", - "dependencies": { - "System.IO.Hashing": "10.0.8" - } - }, - "Microsoft.CodeAnalysis.Common": { - "type": "Transitive", - "resolved": "4.14.0", - "contentHash": "PC3tuwZYnC+idaPuoC/AZpEdwrtX7qFpmnrfQkgobGIWiYmGi5MCRtl5mx6QrfMGQpK78X2lfIEoZDLg/qnuHg==", - "dependencies": { - "Microsoft.CodeAnalysis.Analyzers": "3.11.0" - } - }, - "Microsoft.Diagnostics.NETCore.Client": { - "type": "Transitive", - "resolved": "0.2.510501", - "contentHash": "juoqJYMDs+lRrrZyOkXXMImJHneCF23cuvO4waFRd2Ds7j+ZuGIPbJm0Y/zz34BdeaGiiwGWraMUlln05W1PCQ==", - "dependencies": { - "Microsoft.Extensions.Logging": "6.0.0" - } - }, - "Microsoft.Diagnostics.Runtime": { - "type": "Transitive", - "resolved": "3.1.512801", - "contentHash": "0lMUDr2oxNZa28D6NH5BuSQEe5T9tZziIkvkD44YkkCGQXPJqvFjLq5ZQq1hYLl3RjQJrY+hR0jFgap+EWPDTw==", - "dependencies": { - "Microsoft.Diagnostics.NETCore.Client": "0.2.410101" - } - }, - "Microsoft.Diagnostics.Tracing.TraceEvent": { - "type": "Transitive", - "resolved": "3.1.21", - "contentHash": "/OrJFKaojSR6TkUKtwh8/qA9XWNtxLrXMqvEb89dBSKCWjaGVTbKMYodIUgF5deCEtmd6GXuRerciXGl5bhZ7Q==", - "dependencies": { - "Microsoft.Diagnostics.NETCore.Client": "0.2.510501" - } - }, - "Microsoft.DotNet.PlatformAbstractions": { - "type": "Transitive", - "resolved": "3.1.6", - "contentHash": "jek4XYaQ/PGUwDKKhwR8K47Uh1189PFzMeLqO83mXrXQVIpARZCcfuDedH50YDTepBkfijCZN5U/vZi++erxtg==" - }, - "Microsoft.Extensions.Logging": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "eIbyj40QDg1NDz0HBW0S5f3wrLVnKWnDJ/JtZ+yJDFnDj90VoPuoPmFkeaXrtu+0cKm5GRAwoDf+dBWXK0TUdg==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection": "6.0.0", - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "Microsoft.Extensions.Logging.Abstractions": "6.0.0", - "Microsoft.Extensions.Options": "6.0.0" - } - }, - "Microsoft.Extensions.Logging.Abstractions": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "/HggWBbTwy8TgebGSX5DBZ24ndhzi93sHUBDvP1IxbZD7FDokYzdAr6+vbWGjw2XAfR2EJ1sfKUotpjHnFWPxA==" - }, - "Microsoft.Extensions.Options": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "dzXN0+V1AyjOe2xcJ86Qbo233KHuLEY0njf/P2Kw8SfJU+d45HNS2ctJdnEnrWbM9Ye2eFgaC5Mj9otRMU6IsQ==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "6.0.0", - "Microsoft.Extensions.Primitives": "6.0.0" - } - }, - "Microsoft.Extensions.Primitives": { - "type": "Transitive", - "resolved": "6.0.0", - "contentHash": "9+PnzmQFfEFNR9J2aDTfJGGupShHjOuGw4VUv+JB044biSHrnmCIMD+mJHmb2H7YryrfBEXDurxQ47gJZdCKNQ==" - }, - "Microsoft.SourceLink.Common": { - "type": "Transitive", - "resolved": "10.0.300", - "contentHash": "0jlkXaUGjYlWTIVPve5MftjKHnT3SlAtq9BCLV4J9IjdPrxV/+4rMlBSjfr1khG8/GC6KGojjola8E1VvWF0qQ==" - }, - "Perfolizer": { - "type": "Transitive", - "resolved": "0.6.1", - "contentHash": "CR1QmWg4XYBd1Pb7WseP+sDmV8nGPwvmowKynExTqr3OuckIGVMhvmN4LC5PGzfXqDlR295+hz/T7syA1CxEqA==", - "dependencies": { - "Pragmastat": "3.2.4" - } - }, - "Pragmastat": { - "type": "Transitive", - "resolved": "3.2.4", - "contentHash": "I5qFifWw/gaTQT52MhzjZpkm/JPlfjSeO/DTZJjO7+hTKI+0aGRgOgZ3NN6D96dDuuqbIAZSeA5RimtHjqrA2A==" - }, - "System.CodeDom": { - "type": "Transitive", - "resolved": "9.0.5", - "contentHash": "cuzLM2MWutf9ZBEMPYYfd0DXwYdvntp7VCT6a/wvbKCa2ZuvGmW74xi+YBa2mrfEieAXqM4TNKlMmSnfAfpUoQ==" - }, - "System.IO.Hashing": { - "type": "Transitive", - "resolved": "10.0.8", - "contentHash": "+dJsbPJ3FyUbTZNplFj0RCKePFizmv6ewDV46JE9q/IVH4c3xTCftHfHelLsAKf0jryIPqgMb5GpS0x7TAY3mg==" - }, - "System.Management": { - "type": "Transitive", - "resolved": "9.0.5", - "contentHash": "n6o9PZm9p25+zAzC3/48K0oHnaPKTInRrxqFq1fi/5TPbMLjuoCm/h//mS3cUmSy+9AO1Z+qsC/Ilt/ZFatv5Q==", - "dependencies": { - "System.CodeDom": "9.0.5" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[9.0.0, )" - } - }, - "Microsoft.CodeAnalysis.Analyzers": { - "type": "CentralTransitive", - "requested": "[5.9.0, )", - "resolved": "5.9.0", - "contentHash": "jMNOo+uoBGiWbZ6Wx0dqU93r5WD4P5WnIRZdoz67RP5N09OUetHgAbo4L7hihOH1NHdD2TgW5/l+SP4gQukwww==" - }, - "Microsoft.Extensions.DependencyInjection": { - "type": "CentralTransitive", - "requested": "[10.0.0, )", - "resolved": "10.0.0", - "contentHash": "f0RBabswJq+gRu5a+hWIobrLWiUYPKMhCD9WO3sYBAdSy3FFH14LMvLVFZc2kPSCimBLxSuitUhsd6tb0TAY6A==", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "10.0.0" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - } - } - } -} \ No newline at end of file diff --git a/src/tests/ZodSharp.UnitTests/packages.lock.json b/src/tests/ZodSharp.UnitTests/packages.lock.json deleted file mode 100644 index b5a16f7..0000000 --- a/src/tests/ZodSharp.UnitTests/packages.lock.json +++ /dev/null @@ -1,446 +0,0 @@ -{ - "version": 2, - "dependencies": { - "net10.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==" - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[10.0.10, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - } - }, - "net8.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==", - "dependencies": { - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3", - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "7WX0W96y3dpQdYG4sEGdh38g3/0lOD4/dKbn2rRVOVzKhzoZUn2gKNIKaFeKWs8RCbpFfmmEWsRhSy95hMpvqA==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "o16m2YpDN/pjHsnxf9pTGwkpcuvjW8v1/wGUwJtM1c3QZUKm7ZEO/eYRJg7iIx6GxS2Zv9lAMHpiQwHDdgqauA==" - }, - "System.Threading.Channels": { - "type": "Transitive", - "resolved": "9.0.0", - "contentHash": "hzACdIf1C+4Dqos5ijV404b94+LqfIC8nfS3mNpCDFWowb1N3PNfJPopneq32ahWlDeyaPZJqjBk76YFR69Rpg==" - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "System.Threading.Channels": "9.0.0", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[8.0.2, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "System.Text.Json": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "bmsO6UdYtBdtn32zYXfsh7KlyTIzV/3V9hdT9RIb4pXKgYOsNxXR+VbWigNwBtNFVGYGm6Hwmqw5a+/IWFd36Q==", - "dependencies": { - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10" - } - } - }, - "net9.0": { - "Bogus": { - "type": "Direct", - "requested": "[35.6.5, )", - "resolved": "35.6.5", - "contentHash": "2FGZn+aAVHjmCgClgmGkTDBVZk0zkLvAKGaxEf5JL6b3i9JbHTE4wnuY4vHCuzlCmJdU6VZjgDfHwmYkQF8VAA==" - }, - "TUnit": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "m9T37lAzkKxAbnj3PkKQ9irRC0CvL8P2tuE2UzRyEsaaWMZZXIDHmSqjs4RDN4URnvT8iFfp3/1TLPUi4cwtXg==", - "dependencies": { - "Microsoft.Testing.Extensions.CodeCoverage": "18.10.0", - "Microsoft.Testing.Extensions.Telemetry": "2.3.3", - "Microsoft.Testing.Extensions.TrxReport": "2.3.3", - "TUnit.Assertions": "1.65.68", - "TUnit.Engine": "1.65.68" - } - }, - "TUnit.Mocks": { - "type": "Direct", - "requested": "[1.65.68, )", - "resolved": "1.65.68", - "contentHash": "Z5Ll3iD7O3A/eYNqowiSZudkwuTyF0jwCFYvSV0WdpfYCQBcT97Zr/Y3sDP5U80EbKinlsa0VZLHLvnXiSByEg==", - "dependencies": { - "TUnit.Core": "1.65.68" - } - }, - "Microsoft.ApplicationInsights": { - "type": "Transitive", - "resolved": "2.23.0", - "contentHash": "nWArUZTdU7iqZLycLKWe0TDms48KKGE6pONH2terYNa8REXiqixrMOkf1sk5DHGMaUTqONU2YkS4SAXBhLStgw==" - }, - "Microsoft.DiaSymReader": { - "type": "Transitive", - "resolved": "2.2.10", - "contentHash": "zmGsm6b2y3STDa/Of7rdkkfTDV8VuGB8aCqIkLoJIQh5tL78K3zJ8OUyFKnfsaORXmGr9iOKwDkZfUjeXi+CwA==" - }, - "Microsoft.Extensions.DependencyModel": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "rfZA1RjR021RPqSmIPovfz2aOd79TGqJ9BengbjnzIISOVwjLmuSDnhCMmiY/1c6iYvGolQ1iNGzkav0u11XEA==", - "dependencies": { - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.CodeCoverage": { - "type": "Transitive", - "resolved": "18.10.0", - "contentHash": "elUX4tKloHh2VCxagbmhV1039xBuE3lKXITtt/hUYU286hl+ja8poOUsF9OnevKoFKt7+p9vLb1LqqW7rFGi9Q==", - "dependencies": { - "Microsoft.DiaSymReader": "2.2.10", - "Microsoft.Extensions.DependencyModel": "10.0.10", - "Microsoft.Testing.Platform": "2.3.3", - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10", - "System.Text.Json": "10.0.10" - } - }, - "Microsoft.Testing.Extensions.Telemetry": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "nY8ceQyPWB9TRE1WE5Oe/sks2e10SxgPv61vBHsFYpgCeDtNwhpMZwmL29GklO3/etTdOsLdrCmNr4zJWaR2fg==", - "dependencies": { - "Microsoft.ApplicationInsights": "2.23.0", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "vYBqGSlT94B8d6d4PRdPQ83ogn3kK4kXcnI3SlHBHZu1XsU01IDTMnWoto5v5wXN/Mz4XsVM3Do/sJdGRgH29g==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Extensions.TrxReport.Abstractions": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "dceVNxnfTEjKnrIreLcMfkgrzzBY8kgCCJX5NAv7Lq/6vPlTP4VB5zxKeuYy0yfCoBtWuPkLjUG6qtOBMfpypA==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "Microsoft.Testing.Platform": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "ENbH4BQh9riXtOKc25KKITfiGGWhWMBJA7pZuNaF9zxzzSaVkp5AMeZxGQ6sXYaR6xb724NLz985Is6XIYqLSg==" - }, - "Microsoft.Testing.Platform.MSBuild": { - "type": "Transitive", - "resolved": "2.3.3", - "contentHash": "iVAvNbZ5JPDZSrTcIrCDoCsAkzjDxwDEt2mDuMd8ng1P6e2P2NCd0g0BsoBVG+nJLSmK//V+yeEvjCa3E2fxHw==", - "dependencies": { - "Microsoft.Testing.Platform": "2.3.3" - } - }, - "System.IO.Pipelines": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "7WX0W96y3dpQdYG4sEGdh38g3/0lOD4/dKbn2rRVOVzKhzoZUn2gKNIKaFeKWs8RCbpFfmmEWsRhSy95hMpvqA==" - }, - "System.Text.Encodings.Web": { - "type": "Transitive", - "resolved": "10.0.10", - "contentHash": "o16m2YpDN/pjHsnxf9pTGwkpcuvjW8v1/wGUwJtM1c3QZUKm7ZEO/eYRJg7iIx6GxS2Zv9lAMHpiQwHDdgqauA==" - }, - "TUnit.Assertions": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "9k88ue1cG4Gt2M2le3VQrdWK3ngTxSXdnXshvsVr3jeH80ZmBTGIZ5K5EdZpIkdca6j10pcMmJSHuFhkSz85Nw==" - }, - "TUnit.Core": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "5uE6TGXwY/ozRgz5qNLK+n6XGfS2tgG8AA2loA1YilBZTMgbnv2QoPdyBPS4f/uQQZ1sclCq7zdF1aUQkDxNug==" - }, - "TUnit.Engine": { - "type": "Transitive", - "resolved": "1.65.68", - "contentHash": "1D0LcIzrz7th8AP8vHGK/5vWsxa4QnJurMRGuo6y+vzDePkfCRXGGirLd7Cty8Bs87dIFaiRI9AvAKWDzkOHuQ==", - "dependencies": { - "Microsoft.Testing.Extensions.TrxReport.Abstractions": "2.3.3", - "Microsoft.Testing.Platform": "2.3.3", - "Microsoft.Testing.Platform.MSBuild": "2.3.3", - "TUnit.Core": "1.65.68" - } - }, - "zodsharp": { - "type": "Project", - "dependencies": { - "Microsoft.Extensions.DependencyInjection.Abstractions": "[9.0.0, )" - } - }, - "Microsoft.Extensions.DependencyInjection.Abstractions": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "z/2xXlFw2aLGjHyEm6E0tQ+In6VfzQzTrtArbQ2c0TQE16ZbyDCMGPvaUT9I0s8rgy9sRWlU2P9waW37qV04qA==" - }, - "System.Text.Json": { - "type": "CentralTransitive", - "requested": "[10.0.10, )", - "resolved": "10.0.10", - "contentHash": "bmsO6UdYtBdtn32zYXfsh7KlyTIzV/3V9hdT9RIb4pXKgYOsNxXR+VbWigNwBtNFVGYGm6Hwmqw5a+/IWFd36Q==", - "dependencies": { - "System.IO.Pipelines": "10.0.10", - "System.Text.Encodings.Web": "10.0.10" - } - } - } - } -} \ No newline at end of file From 15ca2c4b77b9e8794e21f846907b8743616f91f2 Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Sat, 5 Sep 2026 08:05:10 +0100 Subject: [PATCH 2/9] refactor: replaced Quote with built in Surround --- .../Helpers/CodeGenHelpers.cs | 6 +- .../ZodSchemaGenerator.BuildSchema.cs | 109 +++++------------- .../ZodSchemaGenerator.StringValidators.cs | 6 +- 3 files changed, 31 insertions(+), 90 deletions(-) diff --git a/src/src/SourceGenerators/Helpers/CodeGenHelpers.cs b/src/src/SourceGenerators/Helpers/CodeGenHelpers.cs index 9b721a1..d233a20 100644 --- a/src/src/SourceGenerators/Helpers/CodeGenHelpers.cs +++ b/src/src/SourceGenerators/Helpers/CodeGenHelpers.cs @@ -26,8 +26,8 @@ string errorMessage "));", bodyWriter => { - bodyWriter.Write(Quote(errorCode)).Line(","); - bodyWriter.Write(Quote(errorMessage)).Line(","); + bodyWriter.Write(errorCode.Surround()).Line(","); + bodyWriter.Write(errorMessage.Surround()).Line(","); bodyWriter.Line($"new[] {{ \"{propertyName}\" }}"); } ); @@ -43,8 +43,6 @@ public static string GetLocalIdentifier(string propertyName, string suffix) => ? suffix : char.ToLowerInvariant(propertyName[0]) + propertyName.Substring(1) + suffix; - public static string Quote(string value) => $"\"{value.Replace("\\", "\\\\").Replace("\"", "\\\"")}\""; - public static string QuoteChar(char value) { return value switch diff --git a/src/src/SourceGenerators/ZodSchemaGenerator.BuildSchema.cs b/src/src/SourceGenerators/ZodSchemaGenerator.BuildSchema.cs index 1c9eea8..e30f76e 100644 --- a/src/src/SourceGenerators/ZodSchemaGenerator.BuildSchema.cs +++ b/src/src/SourceGenerators/ZodSchemaGenerator.BuildSchema.cs @@ -592,31 +592,21 @@ static void GenerateComplexTypeValidation(CodeWriter writer, ZodPropertyDescript writer.Assignment("var", propertyValueName, $"value.{propertyName}"); if (property.CanBeNull) { - using (writer.OpenBlockScope($"if ({propertyValueName} is not null)")) + using (writer.IfBlockScope($"{propertyValueName} is not null")) { writer.Assignment("var", nestedResultName, $"{schemaType}.Validate({propertyValueName})"); - using (writer.OpenBlockScope($"if (!{nestedResultName}.IsSuccess)")) + using (writer.IfBlockScope($"!{nestedResultName}.IsSuccess")) { - writer.MethodCall( - "AddNestedErrors", - "ref errors", - nestedResultName, - CodeGenHelpers.Quote(propertyName) - ); + writer.MethodCall("AddNestedErrors", "ref errors", nestedResultName, propertyName.Surround()); } } } else { writer.Assignment("var", nestedResultName, $"{schemaType}.Validate({propertyValueName})"); - using (writer.OpenBlockScope($"if (!{nestedResultName}.IsSuccess)")) + using (writer.IfBlockScope($"!{nestedResultName}.IsSuccess")) { - writer.MethodCall( - "AddNestedErrors", - "ref errors", - nestedResultName, - CodeGenHelpers.Quote(propertyName) - ); + writer.MethodCall("AddNestedErrors", "ref errors", nestedResultName, propertyName.Surround()); } } } @@ -634,7 +624,7 @@ static void GeneratePathFields(CodeWriter writer, ZodSchemaDescriptor schema, Ca continue; writer.Field( - new FieldDeclarationOptions( + new( CodeGenHelpers.GetPathFieldName(property.Value.Name), pathFieldType, TypeDeclarationAccessibility.Private @@ -642,7 +632,9 @@ static void GeneratePathFields(CodeWriter writer, ZodSchemaDescriptor schema, Ca { IsStatic = true, IsReadOnly = true, - Initializer = $"{TypeLibrary.Collections.ImmutableArray}.Create({property.Value.Name.Surround()})", + Initializer = TypeLibrary.Collections.ImmutableArray.StaticMember( + $"Create({property.Value.Name.Surround()})" + ), } ); } @@ -668,11 +660,7 @@ CancellationToken cancellationToken { var pattern = prop.ValidationAttributes.RegularExpression.Value.Pattern; writer.Field( - new FieldDeclarationOptions( - GetRegexFieldName(prop.Name), - regexType, - TypeDeclarationAccessibility.Private - ) + new(GetRegexFieldName(prop.Name), regexType, TypeDeclarationAccessibility.Private) { IsStatic = true, IsReadOnly = true, @@ -687,11 +675,7 @@ CancellationToken cancellationToken var propertyType = prop.PropertyType.AsTypeReference(); var range = prop.ValidationAttributes.Range.Value; writer.Field( - new FieldDeclarationOptions( - GetRangeMinimumFieldName(prop.Name), - propertyType, - TypeDeclarationAccessibility.Private - ) + new(GetRangeMinimumFieldName(prop.Name), propertyType, TypeDeclarationAccessibility.Private) { IsStatic = true, IsReadOnly = true, @@ -699,11 +683,7 @@ CancellationToken cancellationToken } ); writer.Field( - new FieldDeclarationOptions( - GetRangeMaximumFieldName(prop.Name), - propertyType, - TypeDeclarationAccessibility.Private - ) + new(GetRangeMaximumFieldName(prop.Name), propertyType, TypeDeclarationAccessibility.Private) { IsStatic = true, IsReadOnly = true, @@ -726,40 +706,28 @@ static void GenerateValidationHelpers(CodeWriter writer, CancellationToken cance var typeParameterT = new TypeIdentity("T", null).AsTypeReference(); writer.Method( - new MethodDeclarationOptions("AddError", TypeDeclarationAccessibility.Private) + new("AddError", TypeDeclarationAccessibility.Private) { IsStatic = true, Parameters = [ - new ParameterDeclarationOptions("errors", listOfErrorsType.Nullable(writer)) - { - Modifier = ParameterModifier.Ref, - }, - new ParameterDeclarationOptions("error", errorType), + new("errors", listOfErrorsType.Nullable(writer)) { Modifier = ParameterModifier.Ref }, + new("error", errorType), ], }, body => body.MethodCallOn($"(errors ??= new {listOfErrorsType}())", "Add", "error") ); writer.Method( - new MethodDeclarationOptions("AddNestedErrors", TypeDeclarationAccessibility.Private) + new("AddNestedErrors", TypeDeclarationAccessibility.Private) { IsStatic = true, GenericTypes = [new GenericTypeParameterOptions("T")], Parameters = [ - new ParameterDeclarationOptions("errors", listOfErrorsType.Nullable(writer)) - { - Modifier = ParameterModifier.Ref, - }, - new ParameterDeclarationOptions( - "nestedResult", - TypeLibrary.ValidationResult.MakeGeneric(typeParameterT).AsTypeReference() - ), - new ParameterDeclarationOptions( - "prefix", - new TypeIdentity(SpecialType.System_String).AsTypeReference() - ), + new("errors", listOfErrorsType.Nullable(writer)) { Modifier = ParameterModifier.Ref }, + new("nestedResult", TypeLibrary.ValidationResult.MakeGeneric(typeParameterT).AsTypeReference()), + new("prefix", new TypeIdentity(SpecialType.System_String).AsTypeReference()), ], }, body => @@ -775,28 +743,16 @@ static void GenerateValidationHelpers(CodeWriter writer, CancellationToken cance ); writer.Method( - new MethodDeclarationOptions("AddNestedErrors", TypeDeclarationAccessibility.Private) + new("AddNestedErrors", TypeDeclarationAccessibility.Private) { IsStatic = true, GenericTypes = [new GenericTypeParameterOptions("T")], Parameters = [ - new ParameterDeclarationOptions("errors", listOfErrorsType.Nullable(writer)) - { - Modifier = ParameterModifier.Ref, - }, - new ParameterDeclarationOptions( - "nestedResult", - TypeLibrary.ValidationResult.MakeGeneric(typeParameterT).AsTypeReference() - ), - new ParameterDeclarationOptions( - "prefix", - new TypeIdentity(SpecialType.System_String).AsTypeReference() - ), - new ParameterDeclarationOptions( - "index", - new TypeIdentity(SpecialType.System_Int32).AsTypeReference() - ), + new("errors", listOfErrorsType.Nullable(writer)) { Modifier = ParameterModifier.Ref }, + new("nestedResult", TypeLibrary.ValidationResult.MakeGeneric(typeParameterT).AsTypeReference()), + new("prefix", new TypeIdentity(SpecialType.System_String).AsTypeReference()), + new("index", new TypeIdentity(SpecialType.System_Int32).AsTypeReference()), ], }, body => @@ -813,7 +769,7 @@ static void GenerateValidationHelpers(CodeWriter writer, CancellationToken cance writer.NewLine(); writer.Method( - new MethodDeclarationOptions( + new( "FormatCount", new TypeIdentity(SpecialType.System_String).AsTypeReference(), TypeDeclarationAccessibility.Private @@ -822,18 +778,9 @@ static void GenerateValidationHelpers(CodeWriter writer, CancellationToken cance IsStatic = true, Parameters = [ - new ParameterDeclarationOptions( - "count", - new TypeIdentity(SpecialType.System_Int32).AsTypeReference() - ), - new ParameterDeclarationOptions( - "singularNoun", - new TypeIdentity(SpecialType.System_String).AsTypeReference() - ), - new ParameterDeclarationOptions( - "pluralNoun", - new TypeIdentity(SpecialType.System_String).AsTypeReference() - ), + new("count", new TypeIdentity(SpecialType.System_Int32).AsTypeReference()), + new("singularNoun", new TypeIdentity(SpecialType.System_String).AsTypeReference()), + new("pluralNoun", new TypeIdentity(SpecialType.System_String).AsTypeReference()), ], }, body => body.Return("count == 1 ? $\"1 {singularNoun}\" : $\"{count} {pluralNoun}\"") diff --git a/src/src/SourceGenerators/ZodSchemaGenerator.StringValidators.cs b/src/src/SourceGenerators/ZodSchemaGenerator.StringValidators.cs index 9610fe4..6540f82 100644 --- a/src/src/SourceGenerators/ZodSchemaGenerator.StringValidators.cs +++ b/src/src/SourceGenerators/ZodSchemaGenerator.StringValidators.cs @@ -162,11 +162,7 @@ string errorCode { var propertyName = property.Name; var displayName = property.DisplayName; - var messageExpression = BuildErrorMessageExpression( - validationAttribute, - defaultFormat, - CodeGenHelpers.Quote(displayName) - ); + var messageExpression = BuildErrorMessageExpression(validationAttribute, defaultFormat, displayName.Surround()); using (writer.OpenBlockScope()) { From 2fae50bf2aaafb7698bdbc8a110e63d12e69ba13 Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Sat, 5 Sep 2026 09:13:44 +0100 Subject: [PATCH 3/9] refactor: latest structured api --- Directory.Packages.props | 2 +- .../CompilerServices/IsExternalInit.cs | 5 +- .../Helpers/CodeGenHelpers.cs | 3 +- .../ZodSchemaGenerator.BuildSchema.cs | 6 +-- ...ZodSchemaGenerator.CollectionValidators.cs | 10 ++-- .../ZodSchemaGenerator.NumericValidators.cs | 4 +- .../ZodSchemaGenerator.StringValidators.cs | 51 ++++++++++--------- 7 files changed, 42 insertions(+), 39 deletions(-) diff --git a/Directory.Packages.props b/Directory.Packages.props index fea4e2c..fb14c21 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -11,7 +11,7 @@ 4.13.0 5.9.0 1.65.68 - 1.0.0-prerelease.33 + 1.0.0-prerelease.34 diff --git a/src/src/SourceGenerators/Extensions/System/Runtime/CompilerServices/IsExternalInit.cs b/src/src/SourceGenerators/Extensions/System/Runtime/CompilerServices/IsExternalInit.cs index ae5a598..530487c 100644 --- a/src/src/SourceGenerators/Extensions/System/Runtime/CompilerServices/IsExternalInit.cs +++ b/src/src/SourceGenerators/Extensions/System/Runtime/CompilerServices/IsExternalInit.cs @@ -1,14 +1,11 @@ -#if NETSTANDARD2_0 || NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 || NETCOREAPP3_0 || NETCOREAPP3_1 || NET45 || NET451 || NET452 || NET6 || NET461 || NET462 || NET47 || NET471 || NET472 || NET48 +#if NETSTANDARD2_0 || NETSTANDARD2_1_OR_GREATER || NETCOREAPP2_0 || NETCOREAPP2_1 || NETCOREAPP2_2 || NETCOREAPP3_0 || NETCOREAPP3_1 || NET45 || NET451 || NET452 || NET6 || NET461 || NET462 || NET47 || NET471 || NET472 || NET48 using System.ComponentModel; // Compilation error of CS0518 IsExternalInit is not defined when using .NET Standard. // re: https://mking.net/blog/error-cs0518-isexternalinit-not-defined -#pragma warning disable IDE0130 // Namespace does not match folder structure namespace System.Runtime.CompilerServices; -#pragma warning restore IDE0130 // Namespace does not match folder structure - [EditorBrowsable(EditorBrowsableState.Never)] static class IsExternalInit; diff --git a/src/src/SourceGenerators/Helpers/CodeGenHelpers.cs b/src/src/SourceGenerators/Helpers/CodeGenHelpers.cs index d233a20..12b1e94 100644 --- a/src/src/SourceGenerators/Helpers/CodeGenHelpers.cs +++ b/src/src/SourceGenerators/Helpers/CodeGenHelpers.cs @@ -10,7 +10,7 @@ public static CodeWriter Rule( string errorMessage ) { - using (writer.OpenBlockScope($"if ({comparison})")) + using (writer.IfBlockScope(comparison)) { writer.IfBlock( "errors is null", @@ -20,6 +20,7 @@ string errorMessage $"new {TypeLibrary.Collections.List.MakeGeneric(TypeLibrary.ValidationError)}()" ) ); + writer.OpenDelimitedBlock( $"errors.Add(new {TypeLibrary.ValidationError}", "(", diff --git a/src/src/SourceGenerators/ZodSchemaGenerator.BuildSchema.cs b/src/src/SourceGenerators/ZodSchemaGenerator.BuildSchema.cs index e30f76e..df96e97 100644 --- a/src/src/SourceGenerators/ZodSchemaGenerator.BuildSchema.cs +++ b/src/src/SourceGenerators/ZodSchemaGenerator.BuildSchema.cs @@ -459,14 +459,14 @@ CancellationToken cancellationToken : $"value.{propertyName} == null"; writer.Rule(propertyName, comparison, "missing_field", errorMessage); - block = writer.OpenBlockScope("else"); + block = writer.ElseScope(); GenerateValueSetValidations(writer, property); } else { GenerateValueSetValidations(writer, property); if (property.CanBeNull) - block = writer.OpenBlockScope($"if (value.{propertyName} != null)"); + block = writer.IfBlockScope($"value.{propertyName} != null"); } GenerateTypeSpecificValidations(writer, property); @@ -543,7 +543,7 @@ static void GenerateCollectionElementValidation(CodeWriter writer, ZodPropertyDe var schemaType = property.NestedSchemaType.Value; writer.Assignment("var", collectionValueName, $"value.{propertyName}"); - using (writer.OpenBlockScope($"if ({collectionValueName} is not null)")) + using (writer.IfBlockScope($"{collectionValueName} is not null")) { writer.Assignment("var", indexName, "0"); using (writer.ForeachScope($"var {itemValueName} in {collectionValueName}")) diff --git a/src/src/SourceGenerators/ZodSchemaGenerator.CollectionValidators.cs b/src/src/SourceGenerators/ZodSchemaGenerator.CollectionValidators.cs index 1bdb359..9778adc 100644 --- a/src/src/SourceGenerators/ZodSchemaGenerator.CollectionValidators.cs +++ b/src/src/SourceGenerators/ZodSchemaGenerator.CollectionValidators.cs @@ -36,7 +36,7 @@ static void GenerateCollectionValidations(CodeWriter writer, ZodPropertyDescript var origin = lengthAccessor.Origin; writer.Assignment("var", propertyValueName, $"value.{propertyName}"); - using (writer.OpenBlockScope($"if ({propertyValueName} is not null)")) + using (writer.IfBlockScope($"{propertyValueName} is not null")) { writer.Assignment("var", "propertyValue", propertyValueName); writer.Assignment("var", propertyLengthName, lengthAccessor.LengthExpression); @@ -61,7 +61,7 @@ static void GenerateCollectionValidations(CodeWriter writer, ZodPropertyDescript length.MinimumLength.ToString(CultureInfo.InvariantCulture) ); - using (writer.OpenBlockScope($"if ({propertyLengthName} < {length.MinimumLength})")) + using (writer.IfBlockScope($"{propertyLengthName} < {length.MinimumLength}")) { WriteValidationError( writer, @@ -73,7 +73,9 @@ static void GenerateCollectionValidations(CodeWriter writer, ZodPropertyDescript ); } +#pragma warning disable PSGFR23 // ElseIfScope is not yet available in Purview.SourceGeneratorFramework using (writer.OpenBlockScope($"else if ({propertyLengthName} > {length.MaximumLength})")) +#pragma warning restore PSGFR23 { WriteValidationError( writer, @@ -97,7 +99,7 @@ static void GenerateCollectionValidations(CodeWriter writer, ZodPropertyDescript minLength.ToString(CultureInfo.InvariantCulture) ); - using (writer.OpenBlockScope($"if ({propertyLengthName} < {minLength})")) + using (writer.IfBlockScope($"{propertyLengthName} < {minLength}")) { WriteValidationError( writer, @@ -120,7 +122,7 @@ static void GenerateCollectionValidations(CodeWriter writer, ZodPropertyDescript maxLength.ToString(CultureInfo.InvariantCulture) ); - using (writer.OpenBlockScope($"if ({propertyLengthName} > {maxLength})")) + using (writer.IfBlockScope($"{propertyLengthName} > {maxLength}")) { WriteValidationError( writer, diff --git a/src/src/SourceGenerators/ZodSchemaGenerator.NumericValidators.cs b/src/src/SourceGenerators/ZodSchemaGenerator.NumericValidators.cs index 66615ba..9280ddc 100644 --- a/src/src/SourceGenerators/ZodSchemaGenerator.NumericValidators.cs +++ b/src/src/SourceGenerators/ZodSchemaGenerator.NumericValidators.cs @@ -37,8 +37,8 @@ static void GenerateNumericValidations(CodeWriter writer, ZodPropertyDescriptor { writer.Assignment("var", propertyValueName, $"value.{propertyName}"); using ( - writer.OpenBlockScope( - $"if ({propertyValueName} {minComparison} {GetRangeMinimumFieldName(propertyName)} || {propertyValueName} {maxComparison} {GetRangeMaximumFieldName(propertyName)})" + writer.IfBlockScope( + $"{propertyValueName} {minComparison} {GetRangeMinimumFieldName(propertyName)} || {propertyValueName} {maxComparison} {GetRangeMaximumFieldName(propertyName)}" ) ) { diff --git a/src/src/SourceGenerators/ZodSchemaGenerator.StringValidators.cs b/src/src/SourceGenerators/ZodSchemaGenerator.StringValidators.cs index 6540f82..e2b9352 100644 --- a/src/src/SourceGenerators/ZodSchemaGenerator.StringValidators.cs +++ b/src/src/SourceGenerators/ZodSchemaGenerator.StringValidators.cs @@ -222,29 +222,32 @@ static void StringLengthValidators(CodeWriter writer, ZodPropertyDescriptor prop using (writer.IfBlockScope($"({propertyValueName} is not null)")) { writer.Assignment("var", propertyLengthName, $"{propertyValueName}.Length"); - using (writer.OpenBlockScope($"if ({propertyLengthName} < {length.MinimumLength})")) - { - WriteValidationError( - writer, - "too_small", - tooSmallMessage, - propertyPath, - "string", - minimum: length.MinimumLength - ); - } - - using (writer.OpenBlockScope($"else if ({propertyLengthName} > {length.MaximumLength})")) - { - WriteValidationError( - writer, - "too_big", - tooBigMessage, - propertyPath, - "string", - maximum: length.MaximumLength + + writer + .IfBlock( + $"{propertyLengthName} < {length.MinimumLength}", + w => + WriteValidationError( + w, + "too_small", + tooSmallMessage, + propertyPath, + "string", + minimum: length.MinimumLength + ) + ) + .ElseIf( + $"{propertyLengthName} > {length.MaximumLength}", + w => + WriteValidationError( + w, + "too_big", + tooBigMessage, + propertyPath, + "string", + maximum: length.MaximumLength + ) ); - } } } @@ -277,7 +280,7 @@ static void StringLengthValidators(CodeWriter writer, ZodPropertyDescriptor prop writer.Assignment("var", propertyLengthName, $"{propertyValueName}.Length"); if (stringLength.MinimumLength > 0) { - using (writer.OpenBlockScope($"if ({propertyLengthName} < {stringLength.MinimumLength})")) + using (writer.IfBlockScope($"{propertyLengthName} < {stringLength.MinimumLength}")) { WriteValidationError( writer, @@ -290,7 +293,7 @@ static void StringLengthValidators(CodeWriter writer, ZodPropertyDescriptor prop } } - using (writer.OpenBlockScope($"if ({propertyLengthName} > {stringLength.MaximumLength})")) + using (writer.IfBlockScope($"{propertyLengthName} > {stringLength.MaximumLength}")) { WriteValidationError( writer, From 164cd73e5c3a58850f6f8727eade531477f08f8b Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Sat, 5 Sep 2026 12:45:45 +0100 Subject: [PATCH 4/9] chore: removed old agent files for now --- .agents/agents/sdk-consumer-setup.md | 34 -------- ...source-generator-framework-writer.agent.md | 79 ------------------- .agents/agents/test-author-writer.agent.md | 50 ------------ ...odernize-test-to-codequery-tunit.prompt.md | 48 ----------- ...r-source-generator-to-codewriter.prompt.md | 52 ------------ .../prompts/sdk-diagnose-agent-folder-copy.md | 26 ------ .../project-placement-defaults/.gitignore | 8 -- .../sdk-configuration-reference/.gitignore | 8 -- .../.gitignore | 8 -- .../.gitignore | 8 -- .../source-generator-testing/.gitignore | 8 -- .../skills/tunit-test-authoring/.gitignore | 8 -- 12 files changed, 337 deletions(-) delete mode 100644 .agents/agents/sdk-consumer-setup.md delete mode 100644 .agents/agents/source-generator-framework-writer.agent.md delete mode 100644 .agents/agents/test-author-writer.agent.md delete mode 100644 .agents/prompts/modernize-test-to-codequery-tunit.prompt.md delete mode 100644 .agents/prompts/refactor-source-generator-to-codewriter.prompt.md delete mode 100644 .agents/prompts/sdk-diagnose-agent-folder-copy.md delete mode 100644 .agents/skills/project-placement-defaults/.gitignore delete mode 100644 .agents/skills/sdk-configuration-reference/.gitignore delete mode 100644 .agents/skills/sdk-project-behavior-and-detection/.gitignore delete mode 100644 .agents/skills/source-generator-codewriter-modernization/.gitignore delete mode 100644 .agents/skills/source-generator-testing/.gitignore delete mode 100644 .agents/skills/tunit-test-authoring/.gitignore diff --git a/.agents/agents/sdk-consumer-setup.md b/.agents/agents/sdk-consumer-setup.md deleted file mode 100644 index b356a41..0000000 --- a/.agents/agents/sdk-consumer-setup.md +++ /dev/null @@ -1,34 +0,0 @@ -# sdk-consumer-setup (generic agent spec) - -## Goal - -Help a consuming repository adopt or troubleshoot `Purview.DotNetProjectSdk` correctly, without breaking existing build behaviour. - -## Workflow - -1. Confirm the SDK is imported in `Directory.Build.props`/`Directory.Build.targets` via - `` and the matching `Sdk.targets` import. -2. Check pre-import bootstrap properties are set **before** the `Sdk.props` import when they must affect - evaluation: `NamespacePrefix`, `UsePackageJsonVersion`, `RootPackageJson`. -3. If version resolution looks wrong, verify `package.json` discovery: explicit `RootPackageJson`, then CI - variables, `.git` root, or a nearby `package.json`. `UsePackageJsonVersion=Strict` fails fast instead of - silently skipping resolution. -4. If the bundled `.agents/**` content isn't appearing in the repo root, check `EnableAgentFolderInPackage` - (default `true`) and `AgentPackDestinationFolder` (default `.agents`) — the copy runs before build via - `EnsureAgentFolderInPackageTarget`. -5. For test-framework or project-shape questions, confirm the project follows repo naming and placement - conventions the SDK expects, rather than introducing bespoke structure. -6. Re-run `dotnet build` (or the repo's canonical build command) after each configuration change to confirm - the fix. - -## Constraints - -- Prefer minimal, targeted property changes over broad `Directory.Build.props` rewrites. -- Do not disable `PurviewAutoSdkPack` or `EnableAgentFolderInPackage` unless the consumer explicitly asks to - opt out. -- Do not duplicate SDK-managed properties in individual project files unless the scenario is intentionally - project-specific. - -## Related skill - -See `../skills/sdk-configuration-reference/SKILL.md` for the full property reference. diff --git a/.agents/agents/source-generator-framework-writer.agent.md b/.agents/agents/source-generator-framework-writer.agent.md deleted file mode 100644 index 65f5bd0..0000000 --- a/.agents/agents/source-generator-framework-writer.agent.md +++ /dev/null @@ -1,79 +0,0 @@ ---- -name: Source Generator Framework Writer -description: "Specialist for Purview.SourceGeneratorFramework generation code using CodeWriter and XmlCodeWriter-style XML doc extensions; ideal for creating or refactoring generator emitters." -tools: - [ - "search/codebase", - "edit/editFiles", - "search", - "execute/getTerminalOutput", - "execute/runInTerminal", - "read/terminalLastCommand", - "read/terminalSelection", - "execute/createAndRunTask", - "execute/runTask", - "read/getTaskOutput", - "vscodeTasks/createAndRunTask", - "vscodeTasks/getTaskOutput", - "vscodeTasks/runTask", - ] ---- - -You are a specialist for `Purview.SourceGeneratorFramework` emitter authoring. - -## Primary objective - -Produce clear, deterministic, maintainable source-generator emission code using `CodeWriter` and XML extension helpers from `XmlCommentWriter`. - -## Background knowledge - -Before changing any source generator, analyser, or CodeWriter-related code, load and apply the `source-generator-codewriter-modernization` skill. It contains the full source-generator, analyser, and CodeWriter best-practices guidance for this framework, including incremental pipeline design, value equality, deterministic output, and Roslyn version compatibility. - -The most important rules are: - -- **Analyser for validation; generator for generation.** -- **Syntax for syntax, symbols for declarations, operations for executable semantics.** -- **Use `ForAttributeWithMetadataName` whenever possible.** -- **Remove `ISymbol`, `Compilation`, `SemanticModel`, `IOperation`, `SyntaxTree`, `SyntaxNode`, and `Location` from incremental pipeline models as early as possible.** -- **Pipeline models must be immutable and value-equatable; use `EquatableArray` for collections.** -- **Avoid `Collect()` until global knowledge is genuinely required.** -- **Never combine `CompilationProvider` into the pipeline merely because it is convenient.** -- **Generate deterministic output and stable hint names.** -- **Test incrementally, not just generated text.** -- **Compile against the oldest Roslyn API version containing the functionality you need.** -- **Create `CodeWriter` inside the output callback and pass it to helpers within that callback; never create it earlier in the pipeline or store it in incremental provider state or custom contexts.** - -## Available resources - -- `skills/source-generator-codewriter-modernization/SKILL.md` — source-generator, analyser, and CodeWriter best practices for this framework. -- `prompts/refactor-source-generator-to-codewriter.prompt.md` — prompt template for legacy-emitter refactor tasks. - -## Must-follow rules - -1. Load and apply the `source-generator-codewriter-modernization` skill. -2. Prefer structured declaration APIs over handwritten declaration strings. -3. Prefer XML helper extensions (`XmlSummary`, `XmlParam`, etc.) over raw `///` output. -4. Create `CodeWriter` inside each output callback; never create it earlier in the pipeline or cache it in incremental provider state or custom contexts. -5. Preserve semantic behavior while modernizing implementation style. -6. Keep edits minimal and localized to emitter concerns. - -## Refactoring posture - -When modernizing legacy code: - -- Replace manual indentation/braces with scope APIs. -- Replace signature text with declaration option records. -- Replace ad-hoc XML tags with helper APIs. -- Preserve diagnostics and emitted symbol names. - -## Quality gates - -- Build/tests pass for impacted projects. -- No scope leaks when materializing generated source. -- Generated artifacts remain deterministic and reviewable. - -## Skill routing - -When relevant, first load and apply: - -- `source-generator-codewriter-modernization` diff --git a/.agents/agents/test-author-writer.agent.md b/.agents/agents/test-author-writer.agent.md deleted file mode 100644 index fb5fb87..0000000 --- a/.agents/agents/test-author-writer.agent.md +++ /dev/null @@ -1,50 +0,0 @@ ---- -name: Test Author Writer -description: "Specialist for Purview.SourceGeneratorFramework test suites — writing, fixing, and modernising TUnit tests for generators, diagnostic analyzers, code fixes, and refactorings, and for adding stage-by-stage incremental cache tests." -tools: - [ - "search/codebase", - "edit/editFiles", - "search", - "execute/getTerminalOutput", - "execute/runInTerminal", - "read/terminalLastCommand", - "read/terminalSelection", - "execute/createAndRunTask", - "execute/runTask", - "read/getTaskOutput", - "vscodeTasks/createAndRunTask", - "vscodeTasks/getTaskOutput", - "vscodeTasks/runTask", - ] ---- - -You are a specialist for `Purview.SourceGeneratorFramework` test authoring. - -## Primary objective - -Produce correct, maintainable TUnit tests for source generators, diagnostic analyzers, code fix -providers, and refactoring providers, and prove incremental pipelines cache correctly. - -## Background knowledge - -Before writing or changing any test, load and apply the `source-generator-testing` skill (runner layer, -result types, `CodeQuery`, options, cache testing) and the `tunit-test-authoring` skill (base classes, -methods, assertion extensions, modernisation checklist). For source-generator emission work, also load the -`source-generator-codewriter-modernization` skill. - -Key rules: - -- Pick the base class by the Roslyn component type: generator → `TUnitSourceGeneratorTestBase` + - `GenerateAsync`; analyzer → `TUnitDiagnosticAnalyzerTestBase` + `AnalyzeAsync`; code fix → - `TUnitCodeFixTestBase` + `ApplyCodeFixAsync`/`ApplyFixAllAsync`; refactor → - `TUnitRefactoringTestBase` + `RefactorAsync`. -- Prefer `CodeQuery` (`result.Generated()` / `result.FixedCode()` with `Get/Has/TryGet`) over - raw-string assertions. -- Prefer the terminal assertion extensions (`HasGeneratedMethod`, `HasGeneratedClass`, …) that return - syntax nodes. -- Derive a `SourceGeneratorTestOptions` record that seeds namespaces and additional assemblies. -- For incremental pipelines, add a stage-by-stage cache test with `RunIncrementalAsync` / - `GenerateIncrementalAsync`, asserting `New` on first run and `Cached`/`Unchanged` on an identical rerun, - and `Modified` only on the stages whose inputs changed. -- Keep generated-output assertions deterministic (no timestamps); enable CodeWriter scope validation. \ No newline at end of file diff --git a/.agents/prompts/modernize-test-to-codequery-tunit.prompt.md b/.agents/prompts/modernize-test-to-codequery-tunit.prompt.md deleted file mode 100644 index cf463ce..0000000 --- a/.agents/prompts/modernize-test-to-codequery-tunit.prompt.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -agent: ask -description: "Modernise a Roslyn test suite to use CodeQuery + TUnit assertion extensions, and add a stage-by-stage incremental cache test." ---- - -You are modernising tests in this repository. Apply the guidance from the `source-generator-testing` and -`tunit-test-authoring` skills for picking the right base class, querying generated code with `CodeQuery`, -and asserting incremental caching. - -## Inputs - -- Target test file(s): `${input:targetFiles:Path(s) to test file(s)}` -- Roslyn component under test: `${input:componentType:generator|analyzer|codefix|refactor}` (inferred if blank) -- Generator/analyzer/code-fix/refactor type name: `${input:componentName:Component type name}` - -## Task - -Modernise each test so it uses the framework's `CodeQuery` syntax-lookup API and the TUnit assertion -extensions, and add a stage-by-stage cache test proving each incremental pipeline layer caches correctly. - -### Requirements - -1. Choose the correct base class and method for the component type: - - Generator → `TUnitSourceGeneratorTestBase` → `GenerateAsync`. - - Analyzer → `TUnitDiagnosticAnalyzerTestBase` → `AnalyzeAsync`. - - Code fix → `TUnitCodeFixTestBase` → `ApplyCodeFixAsync` / `ApplyFixAllAsync`. - - Refactor → `TUnitRefactoringTestBase` → `RefactorAsync`. -2. Replace `GetGeneratedTree(...)` + `string.Contains(...)` assertions with `CodeQuery` - (`result.Generated().Get/Has/TryGet…`) and the terminal assertion extensions - (`await Assert.That(result).HasGeneratedMethod/Class/Property/Field/SyntaxTree(…)`) that return the node. -3. Replace signature string checks with `TypeReference` parameter/return-type matching. -4. Ensure options come from a derived `SourceGeneratorTestOptions` record seeding the required namespaces - and additional assemblies; remove per-test duplication. -5. Add an incremental cache test using `RunIncrementalAsync` (or `GenerateIncrementalAsync` on the TUnit - base) with the four scenarios from the skills' "Incremental cache testing" sections - (`ServiceRegistrationCacheTests` / `IncrementalPipelineCacheTests` are the reference pattern): - - first run → every framework stage `New`; - - identical rerun (`RunIncrementalAsync(sources, …)` runs the same source twice) → framework stages - `Cached`/`Unchanged`; - - source-only change → `ForAttribute_*` `Modified`, property/config stages stay `Cached`; - - property-only change (`new IncrementalRunInput(sources, [("build_property.X", "value")])`) → - `GetMSBuildPropertyValue_*`/`GetGenerationConfiguration`/`GetGenerationContext_*` `Modified`, - `ForAttribute_*` stays `Cached`. - Use the `StepReasons(IncrementalCacheRun)` flattening helper; if the generator depends on its own - post-init output, assert on the framework-named stages rather than every tracked step. -6. Keep changes minimal and behavior equivalent; do not reformat unrelated tests. - -Verify by building the test project and running its suite before finishing. \ No newline at end of file diff --git a/.agents/prompts/refactor-source-generator-to-codewriter.prompt.md b/.agents/prompts/refactor-source-generator-to-codewriter.prompt.md deleted file mode 100644 index e230d22..0000000 --- a/.agents/prompts/refactor-source-generator-to-codewriter.prompt.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -agent: ask -description: "Refactor a legacy source generator emitter from string/StringBuilder to CodeWriter + XmlCodeWriter-style XML extensions with behavior parity." ---- - -You are modernizing a source generator implementation in this repository. Apply the guidance from the `source-generator-codewriter-modernization` skill for incremental pipelines, value equality, deterministic output, and CodeWriter scope safety. - -## Inputs - -- Target file(s): `${input:targetFiles:Path(s) to emitter file(s)}` -- Generator type name: `${input:generatorName:Generator class name}` -- Generator version: `${input:generatorVersion:Version string (for generated attributes/header)}` -- Keep output byte-identical where possible: `${input:preserveFormatting:true|false}` - -## Task - -Refactor the selected legacy emitter implementation from manual `string` / `StringBuilder` output construction to `CodeWriter` and XML documentation extension helpers from `XmlCommentWriter` (XmlCodeWriter-style API usage). - -### Requirements - -1. Use structured declaration APIs where applicable: - - `Class/Struct/RecordClass/Interface/Enum` - - `Method`, `Property`, `Field`, `Constructor` -2. Use XML helper extensions instead of raw `///` composition: - - `XmlSummary`, `XmlParam`, `XmlReturn`, `XmlRemarks`, `XmlCode` or `XmlCodeBlock` -3. Use `TypeReference` when type text becomes complex (nullability, generics, arrays). -4. Ensure writer lifetime is output-scoped (`generationContext.CreateCodeWriter()` inside callback). -5. Preserve behavior, diagnostics, and generated names. -6. Keep changes minimal and focused; do not reformat unrelated logic. - -### Migration strategy - -- Identify emitter phases: header, namespace, type declarations, member declarations. -- Replace indentation/braces with scoped APIs. -- Replace signature strings with declaration options. -- Replace XML comments with XmlCommentWriter extension methods. -- Keep semantic equivalence; call out any intentional deltas. - -### Verification - -- Run relevant tests. -- Confirm generated files still compile. -- Confirm no `CodeWriter` scope leaks (`OpenScopeCount == 0` when materialized). - -### Output format - -Return: - -1. Files changed -2. Why each change was necessary -3. Risks/behavior differences (if any) -4. Verification performed diff --git a/.agents/prompts/sdk-diagnose-agent-folder-copy.md b/.agents/prompts/sdk-diagnose-agent-folder-copy.md deleted file mode 100644 index 49ad1c2..0000000 --- a/.agents/prompts/sdk-diagnose-agent-folder-copy.md +++ /dev/null @@ -1,26 +0,0 @@ -# sdk-diagnose-agent-folder-copy (generic prompt spec) - -Diagnose why the bundled `.agents/**` folder from `Purview.DotNetProjectSdk` did not appear at the expected -destination in a consuming repository. - -## Required behaviour - -1. Confirm the NuGet package actually contains `.agents/**` content (inspect the `.nupkg` if available). -2. Confirm the consuming project is packable/buildable and imports the SDK via - `Sdk.props`/`Sdk.targets`, since the copy runs in `EnsureAgentFolderInPackageTarget` before build. -3. Check `EnableAgentFolderInPackage` is not set to `false` anywhere in the build (project file, - `Directory.Build.props`, or command-line `-p:` overrides). -4. Confirm the destination folder: default is `.agents` at the repo root, overridable per-build with - `-p:AgentPackDestinationFolder=`. -5. Verify repo-root discovery succeeded: explicit `RepoRoot`, then a nearby `AGENTS.md`, then source-control - root metadata. -6. Re-run the build and confirm the destination folder now contains the copied files (including the - generated `.gitignore` for skill/prompt/agent subfolders). - -## Suggested output - -- A short root-cause explanation (missing import, disabled flag, wrong destination override, or repo-root - discovery miss). -- The exact command used to reproduce/verify the fix (for example - `dotnet build -p:AgentPackDestinationFolder=`). -- Confirmation that the expected files exist at the resolved destination path. diff --git a/.agents/skills/project-placement-defaults/.gitignore b/.agents/skills/project-placement-defaults/.gitignore deleted file mode 100644 index 2799754..0000000 --- a/.agents/skills/project-placement-defaults/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Ignore all files -* - -# Don't ignore directories, so Git can traverse them -!*/ - -# Keep this file -!.gitignore \ No newline at end of file diff --git a/.agents/skills/sdk-configuration-reference/.gitignore b/.agents/skills/sdk-configuration-reference/.gitignore deleted file mode 100644 index 2799754..0000000 --- a/.agents/skills/sdk-configuration-reference/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Ignore all files -* - -# Don't ignore directories, so Git can traverse them -!*/ - -# Keep this file -!.gitignore \ No newline at end of file diff --git a/.agents/skills/sdk-project-behavior-and-detection/.gitignore b/.agents/skills/sdk-project-behavior-and-detection/.gitignore deleted file mode 100644 index 2799754..0000000 --- a/.agents/skills/sdk-project-behavior-and-detection/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Ignore all files -* - -# Don't ignore directories, so Git can traverse them -!*/ - -# Keep this file -!.gitignore \ No newline at end of file diff --git a/.agents/skills/source-generator-codewriter-modernization/.gitignore b/.agents/skills/source-generator-codewriter-modernization/.gitignore deleted file mode 100644 index 2799754..0000000 --- a/.agents/skills/source-generator-codewriter-modernization/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Ignore all files -* - -# Don't ignore directories, so Git can traverse them -!*/ - -# Keep this file -!.gitignore \ No newline at end of file diff --git a/.agents/skills/source-generator-testing/.gitignore b/.agents/skills/source-generator-testing/.gitignore deleted file mode 100644 index 2799754..0000000 --- a/.agents/skills/source-generator-testing/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Ignore all files -* - -# Don't ignore directories, so Git can traverse them -!*/ - -# Keep this file -!.gitignore \ No newline at end of file diff --git a/.agents/skills/tunit-test-authoring/.gitignore b/.agents/skills/tunit-test-authoring/.gitignore deleted file mode 100644 index 2799754..0000000 --- a/.agents/skills/tunit-test-authoring/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ -# Ignore all files -* - -# Don't ignore directories, so Git can traverse them -!*/ - -# Keep this file -!.gitignore \ No newline at end of file From b8825695402bd46de34ab8754deb62e168e74428 Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Sat, 5 Sep 2026 14:15:14 +0100 Subject: [PATCH 5/9] build: migrating to Purview Build --- .agents/agents/sdk-consumer-setup.md | 34 ++++++++ ...source-generator-framework-writer.agent.md | 79 +++++++++++++++++++ ...r-source-generator-to-codewriter.prompt.md | 52 ++++++++++++ .../prompts/sdk-diagnose-agent-folder-copy.md | 26 ++++++ .../project-placement-defaults/.gitignore | 8 ++ .../sdk-configuration-reference/.gitignore | 8 ++ .../.gitignore | 8 ++ .../.gitignore | 8 ++ .github/copilot-instructions.md | 19 +++++ .github/workflows/ci.yml | 35 -------- .github/workflows/pr.yml | 18 +++++ .github/workflows/publish.yml | 45 ----------- .github/workflows/release.yml | 18 +++++ .gitignore | 2 + Justfile | 48 +++++++++++ package.json | 2 +- purview-build.json | 54 +++++++++++++ 17 files changed, 383 insertions(+), 81 deletions(-) create mode 100644 .agents/agents/sdk-consumer-setup.md create mode 100644 .agents/agents/source-generator-framework-writer.agent.md create mode 100644 .agents/prompts/refactor-source-generator-to-codewriter.prompt.md create mode 100644 .agents/prompts/sdk-diagnose-agent-folder-copy.md create mode 100644 .agents/skills/project-placement-defaults/.gitignore create mode 100644 .agents/skills/sdk-configuration-reference/.gitignore create mode 100644 .agents/skills/sdk-project-behavior-and-detection/.gitignore create mode 100644 .agents/skills/source-generator-codewriter-modernization/.gitignore create mode 100644 .github/copilot-instructions.md delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/pr.yml delete mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/release.yml create mode 100644 purview-build.json diff --git a/.agents/agents/sdk-consumer-setup.md b/.agents/agents/sdk-consumer-setup.md new file mode 100644 index 0000000..b356a41 --- /dev/null +++ b/.agents/agents/sdk-consumer-setup.md @@ -0,0 +1,34 @@ +# sdk-consumer-setup (generic agent spec) + +## Goal + +Help a consuming repository adopt or troubleshoot `Purview.DotNetProjectSdk` correctly, without breaking existing build behaviour. + +## Workflow + +1. Confirm the SDK is imported in `Directory.Build.props`/`Directory.Build.targets` via + `` and the matching `Sdk.targets` import. +2. Check pre-import bootstrap properties are set **before** the `Sdk.props` import when they must affect + evaluation: `NamespacePrefix`, `UsePackageJsonVersion`, `RootPackageJson`. +3. If version resolution looks wrong, verify `package.json` discovery: explicit `RootPackageJson`, then CI + variables, `.git` root, or a nearby `package.json`. `UsePackageJsonVersion=Strict` fails fast instead of + silently skipping resolution. +4. If the bundled `.agents/**` content isn't appearing in the repo root, check `EnableAgentFolderInPackage` + (default `true`) and `AgentPackDestinationFolder` (default `.agents`) — the copy runs before build via + `EnsureAgentFolderInPackageTarget`. +5. For test-framework or project-shape questions, confirm the project follows repo naming and placement + conventions the SDK expects, rather than introducing bespoke structure. +6. Re-run `dotnet build` (or the repo's canonical build command) after each configuration change to confirm + the fix. + +## Constraints + +- Prefer minimal, targeted property changes over broad `Directory.Build.props` rewrites. +- Do not disable `PurviewAutoSdkPack` or `EnableAgentFolderInPackage` unless the consumer explicitly asks to + opt out. +- Do not duplicate SDK-managed properties in individual project files unless the scenario is intentionally + project-specific. + +## Related skill + +See `../skills/sdk-configuration-reference/SKILL.md` for the full property reference. diff --git a/.agents/agents/source-generator-framework-writer.agent.md b/.agents/agents/source-generator-framework-writer.agent.md new file mode 100644 index 0000000..65f5bd0 --- /dev/null +++ b/.agents/agents/source-generator-framework-writer.agent.md @@ -0,0 +1,79 @@ +--- +name: Source Generator Framework Writer +description: "Specialist for Purview.SourceGeneratorFramework generation code using CodeWriter and XmlCodeWriter-style XML doc extensions; ideal for creating or refactoring generator emitters." +tools: + [ + "search/codebase", + "edit/editFiles", + "search", + "execute/getTerminalOutput", + "execute/runInTerminal", + "read/terminalLastCommand", + "read/terminalSelection", + "execute/createAndRunTask", + "execute/runTask", + "read/getTaskOutput", + "vscodeTasks/createAndRunTask", + "vscodeTasks/getTaskOutput", + "vscodeTasks/runTask", + ] +--- + +You are a specialist for `Purview.SourceGeneratorFramework` emitter authoring. + +## Primary objective + +Produce clear, deterministic, maintainable source-generator emission code using `CodeWriter` and XML extension helpers from `XmlCommentWriter`. + +## Background knowledge + +Before changing any source generator, analyser, or CodeWriter-related code, load and apply the `source-generator-codewriter-modernization` skill. It contains the full source-generator, analyser, and CodeWriter best-practices guidance for this framework, including incremental pipeline design, value equality, deterministic output, and Roslyn version compatibility. + +The most important rules are: + +- **Analyser for validation; generator for generation.** +- **Syntax for syntax, symbols for declarations, operations for executable semantics.** +- **Use `ForAttributeWithMetadataName` whenever possible.** +- **Remove `ISymbol`, `Compilation`, `SemanticModel`, `IOperation`, `SyntaxTree`, `SyntaxNode`, and `Location` from incremental pipeline models as early as possible.** +- **Pipeline models must be immutable and value-equatable; use `EquatableArray` for collections.** +- **Avoid `Collect()` until global knowledge is genuinely required.** +- **Never combine `CompilationProvider` into the pipeline merely because it is convenient.** +- **Generate deterministic output and stable hint names.** +- **Test incrementally, not just generated text.** +- **Compile against the oldest Roslyn API version containing the functionality you need.** +- **Create `CodeWriter` inside the output callback and pass it to helpers within that callback; never create it earlier in the pipeline or store it in incremental provider state or custom contexts.** + +## Available resources + +- `skills/source-generator-codewriter-modernization/SKILL.md` — source-generator, analyser, and CodeWriter best practices for this framework. +- `prompts/refactor-source-generator-to-codewriter.prompt.md` — prompt template for legacy-emitter refactor tasks. + +## Must-follow rules + +1. Load and apply the `source-generator-codewriter-modernization` skill. +2. Prefer structured declaration APIs over handwritten declaration strings. +3. Prefer XML helper extensions (`XmlSummary`, `XmlParam`, etc.) over raw `///` output. +4. Create `CodeWriter` inside each output callback; never create it earlier in the pipeline or cache it in incremental provider state or custom contexts. +5. Preserve semantic behavior while modernizing implementation style. +6. Keep edits minimal and localized to emitter concerns. + +## Refactoring posture + +When modernizing legacy code: + +- Replace manual indentation/braces with scope APIs. +- Replace signature text with declaration option records. +- Replace ad-hoc XML tags with helper APIs. +- Preserve diagnostics and emitted symbol names. + +## Quality gates + +- Build/tests pass for impacted projects. +- No scope leaks when materializing generated source. +- Generated artifacts remain deterministic and reviewable. + +## Skill routing + +When relevant, first load and apply: + +- `source-generator-codewriter-modernization` diff --git a/.agents/prompts/refactor-source-generator-to-codewriter.prompt.md b/.agents/prompts/refactor-source-generator-to-codewriter.prompt.md new file mode 100644 index 0000000..e230d22 --- /dev/null +++ b/.agents/prompts/refactor-source-generator-to-codewriter.prompt.md @@ -0,0 +1,52 @@ +--- +agent: ask +description: "Refactor a legacy source generator emitter from string/StringBuilder to CodeWriter + XmlCodeWriter-style XML extensions with behavior parity." +--- + +You are modernizing a source generator implementation in this repository. Apply the guidance from the `source-generator-codewriter-modernization` skill for incremental pipelines, value equality, deterministic output, and CodeWriter scope safety. + +## Inputs + +- Target file(s): `${input:targetFiles:Path(s) to emitter file(s)}` +- Generator type name: `${input:generatorName:Generator class name}` +- Generator version: `${input:generatorVersion:Version string (for generated attributes/header)}` +- Keep output byte-identical where possible: `${input:preserveFormatting:true|false}` + +## Task + +Refactor the selected legacy emitter implementation from manual `string` / `StringBuilder` output construction to `CodeWriter` and XML documentation extension helpers from `XmlCommentWriter` (XmlCodeWriter-style API usage). + +### Requirements + +1. Use structured declaration APIs where applicable: + - `Class/Struct/RecordClass/Interface/Enum` + - `Method`, `Property`, `Field`, `Constructor` +2. Use XML helper extensions instead of raw `///` composition: + - `XmlSummary`, `XmlParam`, `XmlReturn`, `XmlRemarks`, `XmlCode` or `XmlCodeBlock` +3. Use `TypeReference` when type text becomes complex (nullability, generics, arrays). +4. Ensure writer lifetime is output-scoped (`generationContext.CreateCodeWriter()` inside callback). +5. Preserve behavior, diagnostics, and generated names. +6. Keep changes minimal and focused; do not reformat unrelated logic. + +### Migration strategy + +- Identify emitter phases: header, namespace, type declarations, member declarations. +- Replace indentation/braces with scoped APIs. +- Replace signature strings with declaration options. +- Replace XML comments with XmlCommentWriter extension methods. +- Keep semantic equivalence; call out any intentional deltas. + +### Verification + +- Run relevant tests. +- Confirm generated files still compile. +- Confirm no `CodeWriter` scope leaks (`OpenScopeCount == 0` when materialized). + +### Output format + +Return: + +1. Files changed +2. Why each change was necessary +3. Risks/behavior differences (if any) +4. Verification performed diff --git a/.agents/prompts/sdk-diagnose-agent-folder-copy.md b/.agents/prompts/sdk-diagnose-agent-folder-copy.md new file mode 100644 index 0000000..49ad1c2 --- /dev/null +++ b/.agents/prompts/sdk-diagnose-agent-folder-copy.md @@ -0,0 +1,26 @@ +# sdk-diagnose-agent-folder-copy (generic prompt spec) + +Diagnose why the bundled `.agents/**` folder from `Purview.DotNetProjectSdk` did not appear at the expected +destination in a consuming repository. + +## Required behaviour + +1. Confirm the NuGet package actually contains `.agents/**` content (inspect the `.nupkg` if available). +2. Confirm the consuming project is packable/buildable and imports the SDK via + `Sdk.props`/`Sdk.targets`, since the copy runs in `EnsureAgentFolderInPackageTarget` before build. +3. Check `EnableAgentFolderInPackage` is not set to `false` anywhere in the build (project file, + `Directory.Build.props`, or command-line `-p:` overrides). +4. Confirm the destination folder: default is `.agents` at the repo root, overridable per-build with + `-p:AgentPackDestinationFolder=`. +5. Verify repo-root discovery succeeded: explicit `RepoRoot`, then a nearby `AGENTS.md`, then source-control + root metadata. +6. Re-run the build and confirm the destination folder now contains the copied files (including the + generated `.gitignore` for skill/prompt/agent subfolders). + +## Suggested output + +- A short root-cause explanation (missing import, disabled flag, wrong destination override, or repo-root + discovery miss). +- The exact command used to reproduce/verify the fix (for example + `dotnet build -p:AgentPackDestinationFolder=`). +- Confirmation that the expected files exist at the resolved destination path. diff --git a/.agents/skills/project-placement-defaults/.gitignore b/.agents/skills/project-placement-defaults/.gitignore new file mode 100644 index 0000000..2799754 --- /dev/null +++ b/.agents/skills/project-placement-defaults/.gitignore @@ -0,0 +1,8 @@ +# Ignore all files +* + +# Don't ignore directories, so Git can traverse them +!*/ + +# Keep this file +!.gitignore \ No newline at end of file diff --git a/.agents/skills/sdk-configuration-reference/.gitignore b/.agents/skills/sdk-configuration-reference/.gitignore new file mode 100644 index 0000000..2799754 --- /dev/null +++ b/.agents/skills/sdk-configuration-reference/.gitignore @@ -0,0 +1,8 @@ +# Ignore all files +* + +# Don't ignore directories, so Git can traverse them +!*/ + +# Keep this file +!.gitignore \ No newline at end of file diff --git a/.agents/skills/sdk-project-behavior-and-detection/.gitignore b/.agents/skills/sdk-project-behavior-and-detection/.gitignore new file mode 100644 index 0000000..2799754 --- /dev/null +++ b/.agents/skills/sdk-project-behavior-and-detection/.gitignore @@ -0,0 +1,8 @@ +# Ignore all files +* + +# Don't ignore directories, so Git can traverse them +!*/ + +# Keep this file +!.gitignore \ No newline at end of file diff --git a/.agents/skills/source-generator-codewriter-modernization/.gitignore b/.agents/skills/source-generator-codewriter-modernization/.gitignore new file mode 100644 index 0000000..2799754 --- /dev/null +++ b/.agents/skills/source-generator-codewriter-modernization/.gitignore @@ -0,0 +1,8 @@ +# Ignore all files +* + +# Don't ignore directories, so Git can traverse them +!*/ + +# Keep this file +!.gitignore \ No newline at end of file diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..6aac13e --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,19 @@ +# GitHub Copilot Instructions + +## Primary instruction source + +Use the repository root [`AGENTS.md`](../AGENTS.md) as the **primary** source of truth for behavior, architecture context, testing standards, and completion criteria. + +If this file and `AGENTS.md` appear to conflict, prefer `AGENTS.md` unless this file explicitly states a GitHub Copilot-only exception. + +## Copilot-specific guidance + +This file should only contain **GitHub Copilot-specific** instruction details. +Keep product, architecture, and general engineering standards centralized in `AGENTS.md`. + +## Operating expectations for Copilot + +- Apply the `AGENTS.md` testing bar strictly (TUnit/TUnit.Mocks, AAA comments, naming, cancellation token rule). +- Treat work as incomplete until relevant tests pass. +- Consult the repository `.agents/` folder for additional skills/workflows that may improve execution quality. +- Keep edits minimal, focused, and aligned with existing SDK and repository conventions. diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 97f6b89..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: CI - -on: - push: - branches: - - develop - - main - pull_request: - branches: - - develop - - main - -jobs: - build-and-test: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v7 - - - name: Setup .NET - uses: actions/setup-dotnet@v6 - with: - dotnet-version: | - 8.0.x - 9.0.x - 10.0.x - - - name: Restore - run: dotnet restore src/ZodSharp.slnx - - - name: Build - run: dotnet build src/ZodSharp.slnx -c Release --no-restore - - - name: Test - run: dotnet test src/ZodSharp.slnx -c Release --no-build --treenode-filter "/*/*/*/*/" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..f3632c2 --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,18 @@ +name: PR + +on: + pull_request: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + name: Build and test + uses: purview-dev/build/.github/workflows/purview-build.yml@main + with: + run-pack: true + validate-pack: true + secrets: inherit diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 740ad0b..0000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Publish NuGet - -on: - push: - tags: - - "v*.*.*" - -jobs: - build-and-publish: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v7 - - - name: Setup .NET - uses: actions/setup-dotnet@v6 - with: - dotnet-version: | - 8.0.x - 9.0.x - 10.0.x - - - name: Extract version from tag - id: version - run: | - TAG=${GITHUB_REF#refs/tags/v} - echo "version=$TAG" >> $GITHUB_OUTPUT - - - name: Restore - run: dotnet restore src/ZodSharp.slnx - - - name: Build (release) - run: dotnet build src/ZodSharp.slnx -c Release --no-restore /p:Version=${{ steps.version.outputs.version }} - - - name: Pack - run: dotnet pack src/ZodSharp.slnx -c Release --no-build -o ./nupkg /p:PackageVersion=${{ steps.version.outputs.version }} - - - name: Push to NuGet - env: - NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - run: | - dotnet nuget push "./nupkg/*.nupkg" \ - --api-key "$NUGET_API_KEY" \ - --source "https://api.nuget.org/v3/index.json" \ - --skip-duplicate diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5f4c7eb --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,18 @@ +name: Release + +on: + push: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +jobs: + release: + name: Release packages + uses: purview-dev/build/.github/workflows/purview-release.yml@main + with: + release-mode: NuGet + release-branch: main + secrets: inherit diff --git a/.gitignore b/.gitignore index 48e2cb7..5e1d8c8 100644 --- a/.gitignore +++ b/.gitignore @@ -658,3 +658,5 @@ sketch !scripts/* BenchmarkDotNet.Artifacts/ + +./.tools/purview-build/** diff --git a/Justfile b/Justfile index e0e8d44..e3fb704 100644 --- a/Justfile +++ b/Justfile @@ -7,10 +7,58 @@ build_configuration := "Release" artifacts_folder := "./artifacts" default_test_filter := "/*/*/*/*/" +pipeline_feed := "https://api.nuget.org/v3/index.json" +pipeline_tool := ".tools/purview-build/purview-build" + [private] default: just --list +# Install the shared Purview.Build tool (authenticated to the Purview-Dev feed) if not present +[private] +ensure-pipeline-tool: + if [ ! -x "{{ pipeline_tool }}" ]; then \ + dotnet tool install Purview.Build --tool-path .tools/purview-build --add-source "{{ pipeline_feed }}"; \ + fi + +# Run the PR pipeline (restore, build, lint, tests) +[group('Pipeline')] +pipeline-pr *args: + just ensure-pipeline-tool + echo "Running PR pipeline..." + "{{ pipeline_tool }}" {{ args }} + +# Run the build pipeline (restore, build, lint) +[group('Pipeline')] +pipeline-build *args: + just ensure-pipeline-tool + echo "Running build pipeline..." + "{{ pipeline_tool }}" --Build:RunTests=false --Release:Mode=None {{ args }} + +# Run the release pipeline (restore, build, lint, tests, pack, publish, GitHub release) +[group('Pipeline')] +pipeline-release *args: + just ensure-pipeline-tool + echo "Running release pipeline..." + "{{ pipeline_tool }}" --Release:Mode=NuGet {{ args }} + +# Run the release pipeline (restore, build, lint, tests, pack, local nuget publish) +# Note: `just` runs recipes through the shell, which strips backslashes from unquoted arguments. +# Use the LOCAL_NUGET_FEED_PATH environment variable or forward slashes, e.g. +# just pipeline-local-release --PublishLocalNuGet:LocalFeedPath=p:/_sync-projects/.local-nuget/ +[group('Pipeline')] +pipeline-local-release *args: + just ensure-pipeline-tool + echo "Running local release pipeline..." + "{{ pipeline_tool }}" --Release:Mode=LocalNuGet {{ args }} + +# Run the pipeline with tests enabled +[group('Pipeline')] +pipeline-tests *args: + just ensure-pipeline-tool + echo "Running tests pipeline..." + "{{ pipeline_tool }}" --Build:RunTests=true --Release:Mode=None {{ args }} + # Build and test with the specified configuration, defaulting to "Release" build solutionOrProject=solution configuration=build_configuration: echo "Building {{ BLUE }}{{ solutionOrProject }}{{ NORMAL }} with configuration {{ YELLOW }}{{ configuration }}{{ NORMAL }}" diff --git a/package.json b/package.json index 22d22b6..8854960 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "zodsharp", - "version": "2.0.0", + "version": "2.0.0-prerelease.1", "private": true, "scripts": { "test": "vitest run", diff --git a/purview-build.json b/purview-build.json new file mode 100644 index 0000000..1829240 --- /dev/null +++ b/purview-build.json @@ -0,0 +1,54 @@ +{ + "Build": { + "Solution": "src/ZodSharp.slnx", + "TestRoot": "src/tests", + "TestPatterns": "*Tests.csproj", + "TestFilter": "/*/*/*/*/" + }, + "PackValidation": { + "RequireSymbolPackage": true, + "RequireSymbolFiles": true, + "RequiredContent": { + "purview.zodsharp": [ + "lib/net10.0/Purview.ZodSharp.dll", + "lib/net10.0/Purview.ZodSharp.xml", + "lib/net9.0/Purview.ZodSharp.dll", + "lib/net9.0/Purview.ZodSharp.xml", + "lib/net8.0/Purview.ZodSharp.dll", + "lib/net8.0/Purview.ZodSharp.xml", + "analyzers/dotnet/cs/Purview.SourceGeneratorFramework.dll", + "analyzers/dotnet/cs/Purview.SourceGeneratorFramework.Shared.dll", + "analyzers/dotnet/cs/Purview.ZodSharp.SourceGenerators.dll", + "buildTransitive/Purview.ZodSharp.props" + ], + "purview.zodsharp.aspnetcore": [ + "lib/net10.0/Purview.ZodSharp.AspNetCore.dll", + "lib/net10.0/Purview.ZodSharp.AspNetCore.xml", + "lib/net9.0/Purview.ZodSharp.AspNetCore.dll", + "lib/net9.0/Purview.ZodSharp.AspNetCore.xml", + "lib/net8.0/Purview.ZodSharp.AspNetCore.dll", + "lib/net8.0/Purview.ZodSharp.AspNetCore.xml" + ], + "purview.zodsharp.newtonsoftjson": [ + "lib/net10.0/Purview.ZodSharp.NewtonsoftJson.dll", + "lib/net10.0/Purview.ZodSharp.NewtonsoftJson.xml", + "lib/net9.0/Purview.ZodSharp.NewtonsoftJson.dll", + "lib/net9.0/Purview.ZodSharp.NewtonsoftJson.xml", + "lib/net8.0/Purview.ZodSharp.NewtonsoftJson.dll", + "lib/net8.0/Purview.ZodSharp.NewtonsoftJson.xml" + ], + "purview.zodsharp.systemtextjson": [ + "lib/net10.0/Purview.ZodSharp.SystemTextJson.dll", + "lib/net10.0/Purview.ZodSharp.SystemTextJson.xml", + "lib/net9.0/Purview.ZodSharp.SystemTextJson.dll", + "lib/net9.0/Purview.ZodSharp.SystemTextJson.xml", + "lib/net8.0/Purview.ZodSharp.SystemTextJson.dll", + "lib/net8.0/Purview.ZodSharp.SystemTextJson.xml" + ] + }, + "ForbiddenContent": {} + }, + "Release": { + "Mode": "None" + } +} \ No newline at end of file From 41781ed1ab12803d15639f9995f6627b52040e71 Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Sat, 5 Sep 2026 15:03:15 +0100 Subject: [PATCH 6/9] refactor: refactoring assemlby/ package ids --- .agents/agents/test-author-writer.agent.md | 50 +++++++++++++++++++ ...odernize-test-to-codequery-tunit.prompt.md | 48 ++++++++++++++++++ .../source-generator-testing/.gitignore | 8 +++ .../skills/tunit-test-authoring/.gitignore | 8 +++ .gitignore | 2 +- src/Directory.Build.props | 6 +-- src/src/AspNetCore/AspNetCore.csproj | 4 +- src/src/NewtonsoftJson/NewtonsoftJson.csproj | 4 +- .../SourceGenerators/SourceGenerators.csproj | 2 +- src/src/SystemTextJson/SystemTextJson.csproj | 4 +- ...{ZodSharp.props => Purview.ZodSharp.props} | 0 src/src/ZodSharp/ZodSharp.csproj | 3 +- .../AspNetCore.UnitTests.csproj | 1 + .../NewtonsoftJson.UnitTests.csproj | 1 + .../SourceGenerators.UnitTests.csproj | 1 + .../SystemTextJson.UnitTests.csproj | 1 + .../ZodSharp.PerformanceTests.csproj | 1 + .../ZodSharp.UnitTests.csproj | 1 + 18 files changed, 133 insertions(+), 12 deletions(-) create mode 100644 .agents/agents/test-author-writer.agent.md create mode 100644 .agents/prompts/modernize-test-to-codequery-tunit.prompt.md create mode 100644 .agents/skills/source-generator-testing/.gitignore create mode 100644 .agents/skills/tunit-test-authoring/.gitignore rename src/src/ZodSharp/Sdk/buildTransitive/{ZodSharp.props => Purview.ZodSharp.props} (100%) diff --git a/.agents/agents/test-author-writer.agent.md b/.agents/agents/test-author-writer.agent.md new file mode 100644 index 0000000..fb5fb87 --- /dev/null +++ b/.agents/agents/test-author-writer.agent.md @@ -0,0 +1,50 @@ +--- +name: Test Author Writer +description: "Specialist for Purview.SourceGeneratorFramework test suites — writing, fixing, and modernising TUnit tests for generators, diagnostic analyzers, code fixes, and refactorings, and for adding stage-by-stage incremental cache tests." +tools: + [ + "search/codebase", + "edit/editFiles", + "search", + "execute/getTerminalOutput", + "execute/runInTerminal", + "read/terminalLastCommand", + "read/terminalSelection", + "execute/createAndRunTask", + "execute/runTask", + "read/getTaskOutput", + "vscodeTasks/createAndRunTask", + "vscodeTasks/getTaskOutput", + "vscodeTasks/runTask", + ] +--- + +You are a specialist for `Purview.SourceGeneratorFramework` test authoring. + +## Primary objective + +Produce correct, maintainable TUnit tests for source generators, diagnostic analyzers, code fix +providers, and refactoring providers, and prove incremental pipelines cache correctly. + +## Background knowledge + +Before writing or changing any test, load and apply the `source-generator-testing` skill (runner layer, +result types, `CodeQuery`, options, cache testing) and the `tunit-test-authoring` skill (base classes, +methods, assertion extensions, modernisation checklist). For source-generator emission work, also load the +`source-generator-codewriter-modernization` skill. + +Key rules: + +- Pick the base class by the Roslyn component type: generator → `TUnitSourceGeneratorTestBase` + + `GenerateAsync`; analyzer → `TUnitDiagnosticAnalyzerTestBase` + `AnalyzeAsync`; code fix → + `TUnitCodeFixTestBase` + `ApplyCodeFixAsync`/`ApplyFixAllAsync`; refactor → + `TUnitRefactoringTestBase` + `RefactorAsync`. +- Prefer `CodeQuery` (`result.Generated()` / `result.FixedCode()` with `Get/Has/TryGet`) over + raw-string assertions. +- Prefer the terminal assertion extensions (`HasGeneratedMethod`, `HasGeneratedClass`, …) that return + syntax nodes. +- Derive a `SourceGeneratorTestOptions` record that seeds namespaces and additional assemblies. +- For incremental pipelines, add a stage-by-stage cache test with `RunIncrementalAsync` / + `GenerateIncrementalAsync`, asserting `New` on first run and `Cached`/`Unchanged` on an identical rerun, + and `Modified` only on the stages whose inputs changed. +- Keep generated-output assertions deterministic (no timestamps); enable CodeWriter scope validation. \ No newline at end of file diff --git a/.agents/prompts/modernize-test-to-codequery-tunit.prompt.md b/.agents/prompts/modernize-test-to-codequery-tunit.prompt.md new file mode 100644 index 0000000..cf463ce --- /dev/null +++ b/.agents/prompts/modernize-test-to-codequery-tunit.prompt.md @@ -0,0 +1,48 @@ +--- +agent: ask +description: "Modernise a Roslyn test suite to use CodeQuery + TUnit assertion extensions, and add a stage-by-stage incremental cache test." +--- + +You are modernising tests in this repository. Apply the guidance from the `source-generator-testing` and +`tunit-test-authoring` skills for picking the right base class, querying generated code with `CodeQuery`, +and asserting incremental caching. + +## Inputs + +- Target test file(s): `${input:targetFiles:Path(s) to test file(s)}` +- Roslyn component under test: `${input:componentType:generator|analyzer|codefix|refactor}` (inferred if blank) +- Generator/analyzer/code-fix/refactor type name: `${input:componentName:Component type name}` + +## Task + +Modernise each test so it uses the framework's `CodeQuery` syntax-lookup API and the TUnit assertion +extensions, and add a stage-by-stage cache test proving each incremental pipeline layer caches correctly. + +### Requirements + +1. Choose the correct base class and method for the component type: + - Generator → `TUnitSourceGeneratorTestBase` → `GenerateAsync`. + - Analyzer → `TUnitDiagnosticAnalyzerTestBase` → `AnalyzeAsync`. + - Code fix → `TUnitCodeFixTestBase` → `ApplyCodeFixAsync` / `ApplyFixAllAsync`. + - Refactor → `TUnitRefactoringTestBase` → `RefactorAsync`. +2. Replace `GetGeneratedTree(...)` + `string.Contains(...)` assertions with `CodeQuery` + (`result.Generated().Get/Has/TryGet…`) and the terminal assertion extensions + (`await Assert.That(result).HasGeneratedMethod/Class/Property/Field/SyntaxTree(…)`) that return the node. +3. Replace signature string checks with `TypeReference` parameter/return-type matching. +4. Ensure options come from a derived `SourceGeneratorTestOptions` record seeding the required namespaces + and additional assemblies; remove per-test duplication. +5. Add an incremental cache test using `RunIncrementalAsync` (or `GenerateIncrementalAsync` on the TUnit + base) with the four scenarios from the skills' "Incremental cache testing" sections + (`ServiceRegistrationCacheTests` / `IncrementalPipelineCacheTests` are the reference pattern): + - first run → every framework stage `New`; + - identical rerun (`RunIncrementalAsync(sources, …)` runs the same source twice) → framework stages + `Cached`/`Unchanged`; + - source-only change → `ForAttribute_*` `Modified`, property/config stages stay `Cached`; + - property-only change (`new IncrementalRunInput(sources, [("build_property.X", "value")])`) → + `GetMSBuildPropertyValue_*`/`GetGenerationConfiguration`/`GetGenerationContext_*` `Modified`, + `ForAttribute_*` stays `Cached`. + Use the `StepReasons(IncrementalCacheRun)` flattening helper; if the generator depends on its own + post-init output, assert on the framework-named stages rather than every tracked step. +6. Keep changes minimal and behavior equivalent; do not reformat unrelated tests. + +Verify by building the test project and running its suite before finishing. \ No newline at end of file diff --git a/.agents/skills/source-generator-testing/.gitignore b/.agents/skills/source-generator-testing/.gitignore new file mode 100644 index 0000000..2799754 --- /dev/null +++ b/.agents/skills/source-generator-testing/.gitignore @@ -0,0 +1,8 @@ +# Ignore all files +* + +# Don't ignore directories, so Git can traverse them +!*/ + +# Keep this file +!.gitignore \ No newline at end of file diff --git a/.agents/skills/tunit-test-authoring/.gitignore b/.agents/skills/tunit-test-authoring/.gitignore new file mode 100644 index 0000000..2799754 --- /dev/null +++ b/.agents/skills/tunit-test-authoring/.gitignore @@ -0,0 +1,8 @@ +# Ignore all files +* + +# Don't ignore directories, so Git can traverse them +!*/ + +# Keep this file +!.gitignore \ No newline at end of file diff --git a/.gitignore b/.gitignore index 5e1d8c8..3100a06 100644 --- a/.gitignore +++ b/.gitignore @@ -659,4 +659,4 @@ sketch BenchmarkDotNet.Artifacts/ -./.tools/purview-build/** +.tools/purview-build/** diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 434f65c..081d64e 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -10,7 +10,7 @@ false true - https://github.com/guinhx/ZodSharp + https://github.com/purview-dev/zodsharp @@ -26,8 +26,8 @@ ZodSharp Contributors - https://github.com/guinhx/ZodSharp - https://github.com/guinhx/ZodSharp + https://github.com/purview-dev/zodsharp + https://github.com/purview-dev/zodsharp MIT README.md diff --git a/src/src/AspNetCore/AspNetCore.csproj b/src/src/AspNetCore/AspNetCore.csproj index b59fa43..8d07f92 100644 --- a/src/src/AspNetCore/AspNetCore.csproj +++ b/src/src/AspNetCore/AspNetCore.csproj @@ -3,8 +3,8 @@ $(ZodSharpNetTargetFrameworks) true true - + Purview.ZodSharp.AspNetCore + Purview.ZodSharp.AspNetCore ASP.NET Core ProblemDetails integration for ZodSharp validation results. zod;validation;aspnetcore;problemdetails diff --git a/src/src/NewtonsoftJson/NewtonsoftJson.csproj b/src/src/NewtonsoftJson/NewtonsoftJson.csproj index 4f533b5..208f01d 100644 --- a/src/src/NewtonsoftJson/NewtonsoftJson.csproj +++ b/src/src/NewtonsoftJson/NewtonsoftJson.csproj @@ -3,12 +3,12 @@ false ZodSharp true - + PurviewZodSharp.NewtonsoftJson true - ZodSharp.NewtonsoftJson + Purview.ZodSharp.NewtonsoftJson A high-performance C# port of Zod schema validation library. Features zero-allocation validation, struct-based rules, fluent API, and source generator support for maximum performance. zod;validation;schema;json diff --git a/src/src/SourceGenerators/SourceGenerators.csproj b/src/src/SourceGenerators/SourceGenerators.csproj index a823f5b..d2fbd71 100644 --- a/src/src/SourceGenerators/SourceGenerators.csproj +++ b/src/src/SourceGenerators/SourceGenerators.csproj @@ -1,7 +1,7 @@  true - + Purview.ZodSharp.SourceGeneration true true diff --git a/src/src/SystemTextJson/SystemTextJson.csproj b/src/src/SystemTextJson/SystemTextJson.csproj index bda6797..d91d65e 100644 --- a/src/src/SystemTextJson/SystemTextJson.csproj +++ b/src/src/SystemTextJson/SystemTextJson.csproj @@ -3,12 +3,12 @@ true false ZodSharp - + Purview.ZodSharp.SystemTextJson true - ZodSharp.SystemTextJson + Purview.ZodSharp.SystemTextJson A high-performance C# port of Zod schema validation library. Features zero-allocation validation, struct-based rules, fluent API, and source generator support for maximum performance. zod;validation;schema;json diff --git a/src/src/ZodSharp/Sdk/buildTransitive/ZodSharp.props b/src/src/ZodSharp/Sdk/buildTransitive/Purview.ZodSharp.props similarity index 100% rename from src/src/ZodSharp/Sdk/buildTransitive/ZodSharp.props rename to src/src/ZodSharp/Sdk/buildTransitive/Purview.ZodSharp.props diff --git a/src/src/ZodSharp/ZodSharp.csproj b/src/src/ZodSharp/ZodSharp.csproj index 8743f64..5adbc78 100644 --- a/src/src/ZodSharp/ZodSharp.csproj +++ b/src/src/ZodSharp/ZodSharp.csproj @@ -1,7 +1,8 @@  true - + Purview.ZodSharp + Purview.ZodSharp A high-performance C# port of Zod schema validation library. Features zero-allocation validation, struct-based rules, fluent API, diff --git a/src/tests/AspNetCore.UnitTests/AspNetCore.UnitTests.csproj b/src/tests/AspNetCore.UnitTests/AspNetCore.UnitTests.csproj index 1ddbc7e..b4d111d 100644 --- a/src/tests/AspNetCore.UnitTests/AspNetCore.UnitTests.csproj +++ b/src/tests/AspNetCore.UnitTests/AspNetCore.UnitTests.csproj @@ -2,6 +2,7 @@ + Purview.ZodSharp.AspNetCore.UnitTests diff --git a/src/tests/AspNetCore.UnitTests/AspNetCore.UnitTests.csproj b/src/tests/AspNetCore.UnitTests/AspNetCore.UnitTests.csproj index b4d111d..7b9245c 100644 --- a/src/tests/AspNetCore.UnitTests/AspNetCore.UnitTests.csproj +++ b/src/tests/AspNetCore.UnitTests/AspNetCore.UnitTests.csproj @@ -1,9 +1,13 @@  + + Purview.ZodSharp.AspNetCore.UnitTests + + - Purview.ZodSharp.AspNetCore.UnitTests + diff --git a/src/tests/SourceGenerators.UnitTests/SourceGenerators.UnitTests.csproj b/src/tests/SourceGenerators.UnitTests/SourceGenerators.UnitTests.csproj index 9f15e69..2d10643 100644 --- a/src/tests/SourceGenerators.UnitTests/SourceGenerators.UnitTests.csproj +++ b/src/tests/SourceGenerators.UnitTests/SourceGenerators.UnitTests.csproj @@ -1,9 +1,13 @@  + + Purview.ZodSharp.SourceGenerators.UnitTests + + - Purview.ZodSharp.SourceGenerators.UnitTests + diff --git a/src/tests/SystemTextJson.UnitTests/SystemTextJson.UnitTests.csproj b/src/tests/SystemTextJson.UnitTests/SystemTextJson.UnitTests.csproj index 850454f..c200a93 100644 --- a/src/tests/SystemTextJson.UnitTests/SystemTextJson.UnitTests.csproj +++ b/src/tests/SystemTextJson.UnitTests/SystemTextJson.UnitTests.csproj @@ -2,6 +2,6 @@ ZodSharp $(NoWarn);CA1849;CA1002;CA2227; - Purview.ZodSharp.AspNetCore.UnitTests + Purview.ZodSharp.SystemTextJson.UnitTests From 15b98025a049e4bedc62c4dd431e923118fcbb52 Mon Sep 17 00:00:00 2001 From: Kieron Lanning Date: Sat, 5 Sep 2026 17:29:28 +0100 Subject: [PATCH 9/9] chore: renamed PerformanceTests Benchmarks to prevent the test runner from picking it up --- src/ZodSharp.slnx | 2 +- .../ArrayPerformanceTests.cs | 0 .../BasicPerformanceTests.cs | 0 .../HeavyPerformanceTests.cs | 0 .../MemoryPerformanceTests.cs | 0 .../ObjectPerformanceTests.cs | 0 .../Program.cs | 0 .../README.md | 0 .../TransformPerformanceTests.cs | 0 .../UnionPerformanceTests.cs | 0 .../ZodSharp.Benchmarks.csproj} | 5 +++-- 11 files changed, 4 insertions(+), 3 deletions(-) rename src/tests/{ZodSharp.PerformanceTests => ZodSharp.Benchmarks}/ArrayPerformanceTests.cs (100%) rename src/tests/{ZodSharp.PerformanceTests => ZodSharp.Benchmarks}/BasicPerformanceTests.cs (100%) rename src/tests/{ZodSharp.PerformanceTests => ZodSharp.Benchmarks}/HeavyPerformanceTests.cs (100%) rename src/tests/{ZodSharp.PerformanceTests => ZodSharp.Benchmarks}/MemoryPerformanceTests.cs (100%) rename src/tests/{ZodSharp.PerformanceTests => ZodSharp.Benchmarks}/ObjectPerformanceTests.cs (100%) rename src/tests/{ZodSharp.PerformanceTests => ZodSharp.Benchmarks}/Program.cs (100%) rename src/tests/{ZodSharp.PerformanceTests => ZodSharp.Benchmarks}/README.md (100%) rename src/tests/{ZodSharp.PerformanceTests => ZodSharp.Benchmarks}/TransformPerformanceTests.cs (100%) rename src/tests/{ZodSharp.PerformanceTests => ZodSharp.Benchmarks}/UnionPerformanceTests.cs (100%) rename src/tests/{ZodSharp.PerformanceTests/ZodSharp.PerformanceTests.csproj => ZodSharp.Benchmarks/ZodSharp.Benchmarks.csproj} (82%) diff --git a/src/ZodSharp.slnx b/src/ZodSharp.slnx index a38d694..140a3ec 100644 --- a/src/ZodSharp.slnx +++ b/src/ZodSharp.slnx @@ -16,7 +16,7 @@ - + diff --git a/src/tests/ZodSharp.PerformanceTests/ArrayPerformanceTests.cs b/src/tests/ZodSharp.Benchmarks/ArrayPerformanceTests.cs similarity index 100% rename from src/tests/ZodSharp.PerformanceTests/ArrayPerformanceTests.cs rename to src/tests/ZodSharp.Benchmarks/ArrayPerformanceTests.cs diff --git a/src/tests/ZodSharp.PerformanceTests/BasicPerformanceTests.cs b/src/tests/ZodSharp.Benchmarks/BasicPerformanceTests.cs similarity index 100% rename from src/tests/ZodSharp.PerformanceTests/BasicPerformanceTests.cs rename to src/tests/ZodSharp.Benchmarks/BasicPerformanceTests.cs diff --git a/src/tests/ZodSharp.PerformanceTests/HeavyPerformanceTests.cs b/src/tests/ZodSharp.Benchmarks/HeavyPerformanceTests.cs similarity index 100% rename from src/tests/ZodSharp.PerformanceTests/HeavyPerformanceTests.cs rename to src/tests/ZodSharp.Benchmarks/HeavyPerformanceTests.cs diff --git a/src/tests/ZodSharp.PerformanceTests/MemoryPerformanceTests.cs b/src/tests/ZodSharp.Benchmarks/MemoryPerformanceTests.cs similarity index 100% rename from src/tests/ZodSharp.PerformanceTests/MemoryPerformanceTests.cs rename to src/tests/ZodSharp.Benchmarks/MemoryPerformanceTests.cs diff --git a/src/tests/ZodSharp.PerformanceTests/ObjectPerformanceTests.cs b/src/tests/ZodSharp.Benchmarks/ObjectPerformanceTests.cs similarity index 100% rename from src/tests/ZodSharp.PerformanceTests/ObjectPerformanceTests.cs rename to src/tests/ZodSharp.Benchmarks/ObjectPerformanceTests.cs diff --git a/src/tests/ZodSharp.PerformanceTests/Program.cs b/src/tests/ZodSharp.Benchmarks/Program.cs similarity index 100% rename from src/tests/ZodSharp.PerformanceTests/Program.cs rename to src/tests/ZodSharp.Benchmarks/Program.cs diff --git a/src/tests/ZodSharp.PerformanceTests/README.md b/src/tests/ZodSharp.Benchmarks/README.md similarity index 100% rename from src/tests/ZodSharp.PerformanceTests/README.md rename to src/tests/ZodSharp.Benchmarks/README.md diff --git a/src/tests/ZodSharp.PerformanceTests/TransformPerformanceTests.cs b/src/tests/ZodSharp.Benchmarks/TransformPerformanceTests.cs similarity index 100% rename from src/tests/ZodSharp.PerformanceTests/TransformPerformanceTests.cs rename to src/tests/ZodSharp.Benchmarks/TransformPerformanceTests.cs diff --git a/src/tests/ZodSharp.PerformanceTests/UnionPerformanceTests.cs b/src/tests/ZodSharp.Benchmarks/UnionPerformanceTests.cs similarity index 100% rename from src/tests/ZodSharp.PerformanceTests/UnionPerformanceTests.cs rename to src/tests/ZodSharp.Benchmarks/UnionPerformanceTests.cs diff --git a/src/tests/ZodSharp.PerformanceTests/ZodSharp.PerformanceTests.csproj b/src/tests/ZodSharp.Benchmarks/ZodSharp.Benchmarks.csproj similarity index 82% rename from src/tests/ZodSharp.PerformanceTests/ZodSharp.PerformanceTests.csproj rename to src/tests/ZodSharp.Benchmarks/ZodSharp.Benchmarks.csproj index 255c0c3..f36b79d 100644 --- a/src/tests/ZodSharp.PerformanceTests/ZodSharp.PerformanceTests.csproj +++ b/src/tests/ZodSharp.Benchmarks/ZodSharp.Benchmarks.csproj @@ -4,8 +4,9 @@ false ZodSharp - $(NoWarn);CA1303; - Purview.ZodSharp.PerformanceTests + $(NoWarn);CA1303;CA1707;CA1822;CA1515; + Exe + Purview.ZodSharp.PerformanceBenchmark