Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,23 @@
<!-- Keep compiler-facing Roslyn packages aligned with the minimum SDK pinned in global.json so analyser ProjectReferences load on build machines. -->
<RoslynCompilerVersion>5.9.0</RoslynCompilerVersion>
<RoslynAnalyzersVersion>5.9.0</RoslynAnalyzersVersion>
<TUnitVersion>1.68.4</TUnitVersion>
<PurviewSGFrameworkVersion>1.0.0-prerelease.44</PurviewSGFrameworkVersion>
<PurviewValueObjectsVersion>1.0.0-prerelease.2</PurviewValueObjectsVersion>
<PurviewZodSharpVersion>2.0.0-prerelease.9</PurviewZodSharpVersion>
<TUnitVersion>1.68.17</TUnitVersion>
<PurviewSGFrameworkVersion>1.0.0-prerelease.49</PurviewSGFrameworkVersion>
<PurviewValueObjectsVersion>1.0.0-prerelease.5</PurviewValueObjectsVersion>
<PurviewZodSharpVersion>2.0.0-prerelease.20</PurviewZodSharpVersion>
<PurviewTelemetryVersion>5.0.0-prerelease.14</PurviewTelemetryVersion>
<PurviewAspireResourceKitVersion>1.0.0-prerelease.36</PurviewAspireResourceKitVersion>
<PurviewAspireC4Version>13.5.3.4</PurviewAspireC4Version>
<TestcontainersVersion>4.15.0</TestcontainersVersion>
<BenchmarkDotNetVersion>0.14.0</BenchmarkDotNetVersion>
<DotnetRuntimeVersion>10.0.12</DotnetRuntimeVersion>
<AspireVersion>13.5.4</AspireVersion>
<OTelVersion>1.18.0</OTelVersion>
<OTelVersion>1.19.0</OTelVersion>
<MSExtensionVersion>10.10.0</MSExtensionVersion>
</PropertyGroup>
<ItemGroup>
<PackageVersion Include="Aspire.Azure.Storage.Blobs" Version="$(AspireVersion)" />
<PackageVersion Include="AspireC4.Hosting" Version="13.5.3.2" />
<PackageVersion Include="AspireC4.Hosting" Version="$(PurviewAspireC4Version)" />
<PackageVersion Include="Bogus" Version="35.6.5" />
<PackageVersion Include="LinqKit" Version="1.3.11" />
<PackageVersion Include="FluentValidation" Version="12.1.1" />
Expand All @@ -34,13 +37,13 @@
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(DotnetRuntimeVersion)" />
<PackageVersion Include="Microsoft.Extensions.Options" Version="$(DotnetRuntimeVersion)" />
<PackageVersion Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.20.1" />
<PackageVersion Include="Purview.Aspire.ResourceKit" Version="1.0.0-prerelease.30" />
<PackageVersion Include="Purview.Aspire.ResourceKit" Version="$(PurviewAspireResourceKitVersion)" />
<PackageVersion Include="Purview.SourceGeneratorFramework" Version="$(PurviewSGFrameworkVersion)" />
<PackageVersion
Include="Purview.SourceGeneratorFramework.Testing.TUnit"
Version="$(PurviewSGFrameworkVersion)"
/>
<PackageVersion Include="Purview.Telemetry.SourceGenerator" Version="5.0.0-prerelease.11" />
<PackageVersion Include="Purview.Telemetry.SourceGenerator" Version="$(PurviewTelemetryVersion)" />
<PackageVersion Include="Purview.ValueObjects" Version="$(PurviewValueObjectsVersion)" />
<PackageVersion Include="Purview.ZodSharp" Version="$(PurviewZodSharpVersion)" />
<PackageVersion Include="Purview.ZodSharp.AspNetCore" Version="$(PurviewZodSharpVersion)" />
Expand Down
9 changes: 8 additions & 1 deletion Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ set quiet

# Variables
root_folder := "./src"
test_root := root_folder + "/tests"
# test_root := root_folder + "/tests"

solution_file := root_folder + "/EventSourcing.slnx"

Expand Down Expand Up @@ -66,6 +66,13 @@ pipeline-tests *args:
echo "Running tests pipeline..."
"{{ pipeline_tool }}" --Build:RunTests=true --Release:Mode=None {{ args }}

# Run the pipeline through pack + validate (restore, build, lint, tests, pack, validate pack contents) without publishing/releasing
[group('Pipeline')]
pipeline-pack-validate *args:
just ensure-pipeline-tool
echo "Running pack + validate pipeline..."
"{{ pipeline_tool }}" --Build:RunPack=true --Build:ValidatePack=true --Release:Mode=None {{ args }}

# Open the solution in Visual Studio/ Registered application
[group('Utilities')]
vs:
Expand Down
2 changes: 1 addition & 1 deletion global.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"allowPrerelease": false
},
"msbuild-sdks": {
"Purview.BuildSdk": "1.0.0-prerelease.57"
"Purview.BuildSdk": "1.0.0-prerelease.58"
},
"test": {
"runner": "Microsoft.Testing.Platform"
Expand Down
12 changes: 0 additions & 12 deletions package-lock.json

This file was deleted.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "purview-event-sourcing",
"version": "2.0.0-prerelease.35",
"version": "2.0.0-prerelease.36",
"license": "MIT",
"author": {
"name": "Kieron Lanning",
Expand Down
172 changes: 115 additions & 57 deletions purview-build.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,84 +11,142 @@
"RequireSymbolFiles": true,
"RequiredContent": {
"purview.eventsourcing": [
"README.md",
"purview-logo-light.png",
"buildTransitive/Purview.EventSourcing.targets",
".agents/**/*",
"analyzers/dotnet/cs/Purview.EventSourcing.SourceGenerator.CodeFixes.dll",
"analyzers/dotnet/cs/Purview.EventSourcing.SourceGenerator.dll",
"analyzers/dotnet/cs/Purview.EventSourcing.SourceGenerator.CodeFixes.dll"
],
"purview.eventsourcing.sqlserver": [
"README.md",
"lib/net10.0/Purview.EventSourcing.SqlServer.dll",
"analyzers/dotnet/cs/Purview.EventSourcing.EntityFrameworkCore.SourceGenerator.dll"
],
"purview.eventsourcing.postgres": [
"README.md",
"lib/net10.0/Purview.EventSourcing.Postgres.dll",
"analyzers/dotnet/cs/Purview.EventSourcing.EntityFrameworkCore.SourceGenerator.dll"
],
"purview.eventsourcing.azurestorage": [
"README.md",
"lib/net10.0/Purview.EventSourcing.AzureStorage.dll"
],
"purview.eventsourcing.mongodb": [
"README.md",
"lib/net10.0/Purview.EventSourcing.MongoDB.dll"
],
"purview.eventsourcing.cosmosdb": [
"README.md",
"lib/net10.0/Purview.EventSourcing.CosmosDb.dll"
],
"purview.eventsourcing.inmemory": [
"README.md",
"lib/net10.0/Purview.EventSourcing.InMemory.dll"
],
"purview.eventsourcing.validation.fluentvalidation": [
"README.md",
"lib/net10.0/Purview.EventSourcing.Validation.FluentValidation.dll"
],
"purview.eventsourcing.validation.zodsharp": [
"README.md",
"buildTransitive/Purview.EventSourcing.Validation.ZodSharp.targets"
"buildTransitive/Purview.EventSourcing.targets",
"lib/$(TFM)/Purview.EventSourcing.dll",
"lib/$(TFM)/Purview.EventSourcing.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.admin.abstractions": [
"lib/$(TFM)/Purview.EventSourcing.Admin.Abstractions.dll",
"lib/$(TFM)/Purview.EventSourcing.Admin.Abstractions.xml",
"README.md",
"lib/net10.0/Purview.EventSourcing.Admin.Abstractions.dll"
"purview-logo-light.png"
],
"purview.eventsourcing.admin.api": [
"README.md",
"lib/net10.0/Purview.EventSourcing.Admin.API.dll"
"lib/$(TFM)/Purview.EventSourcing.Admin.API.dll",
"lib/$(TFM)/Purview.EventSourcing.Admin.API.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.admin.azurestorage": [
"README.md",
"lib/net10.0/Purview.EventSourcing.Admin.AzureStorage.dll"
"lib/$(TFM)/Purview.EventSourcing.Admin.AzureStorage.dll",
"lib/$(TFM)/Purview.EventSourcing.Admin.AzureStorage.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.admin.client": [
"README.md",
"lib/net10.0/Purview.EventSourcing.Admin.Client.dll"
"lib/$(TFM)/Purview.EventSourcing.Admin.Client.dll",
"lib/$(TFM)/Purview.EventSourcing.Admin.Client.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.admin.mongodb": [
"README.md",
"lib/net10.0/Purview.EventSourcing.Admin.MongoDB.dll"
"lib/$(TFM)/Purview.EventSourcing.Admin.MongoDB.dll",
"lib/$(TFM)/Purview.EventSourcing.Admin.MongoDB.runtimeconfig.json",
"lib/$(TFM)/Purview.EventSourcing.Admin.MongoDB.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.admin.postgres": [
"README.md",
"lib/net10.0/Purview.EventSourcing.Admin.Postgres.dll"
"lib/$(TFM)/Purview.EventSourcing.Admin.Postgres.dll",
"lib/$(TFM)/Purview.EventSourcing.Admin.Postgres.runtimeconfig.json",
"lib/$(TFM)/Purview.EventSourcing.Admin.Postgres.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.admin.security": [
"README.md",
"lib/net10.0/Purview.EventSourcing.Admin.Security.dll"
"lib/$(TFM)/Purview.EventSourcing.Admin.Security.dll",
"lib/$(TFM)/Purview.EventSourcing.Admin.Security.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.admin.site": [
"README.md",
"lib/net10.0/Purview.EventSourcing.Admin.Site.dll"
"content/**/*",
"contentFiles/**/*",
"lib/*/Purview.EventSourcing.Admin.Site.dll",
"lib/*/Purview.EventSourcing.Admin.Site.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.admin.sqlserver": [
"README.md",
"lib/net10.0/Purview.EventSourcing.Admin.SqlServer.dll"
"lib/$(TFM)/Purview.EventSourcing.Admin.SqlServer.dll",
"lib/$(TFM)/Purview.EventSourcing.Admin.SqlServer.runtimeconfig.json",
"lib/$(TFM)/Purview.EventSourcing.Admin.SqlServer.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.azurestorage": [
"lib/$(TFM)/Purview.EventSourcing.AzureStorage.dll",
"lib/$(TFM)/Purview.EventSourcing.AzureStorage.xml",
"lib/$(TFM)/Purview.EventSourcing.ImplementationShared.dll",
"lib/$(TFM)/Purview.EventSourcing.ImplementationShared.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.cosmosdb": [
"lib/$(TFM)/Purview.EventSourcing.CosmosDb.dll",
"lib/$(TFM)/Purview.EventSourcing.CosmosDb.runtimeconfig.json",
"lib/$(TFM)/Purview.EventSourcing.CosmosDb.xml",
"lib/$(TFM)/Purview.EventSourcing.ImplementationShared.dll",
"lib/$(TFM)/Purview.EventSourcing.ImplementationShared.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.inmemory": [
"lib/$(TFM)/Purview.EventSourcing.ImplementationShared.dll",
"lib/$(TFM)/Purview.EventSourcing.ImplementationShared.xml",
"lib/$(TFM)/Purview.EventSourcing.InMemory.dll",
"lib/$(TFM)/Purview.EventSourcing.InMemory.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.mongodb": [
"lib/$(TFM)/Purview.EventSourcing.ImplementationShared.dll",
"lib/$(TFM)/Purview.EventSourcing.ImplementationShared.xml",
"lib/$(TFM)/Purview.EventSourcing.MongoDB.dll",
"lib/$(TFM)/Purview.EventSourcing.MongoDB.runtimeconfig.json",
"lib/$(TFM)/Purview.EventSourcing.MongoDB.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.postgres": [
"analyzers/dotnet/cs/Purview.EventSourcing.EntityFrameworkCore.SourceGenerator.dll",
"lib/$(TFM)/Purview.EventSourcing.ImplementationShared.dll",
"lib/$(TFM)/Purview.EventSourcing.ImplementationShared.xml",
"lib/$(TFM)/Purview.EventSourcing.Postgres.dll",
"lib/$(TFM)/Purview.EventSourcing.Postgres.runtimeconfig.json",
"lib/$(TFM)/Purview.EventSourcing.Postgres.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.sqlserver": [
"analyzers/dotnet/cs/Purview.EventSourcing.EntityFrameworkCore.SourceGenerator.dll",
"lib/$(TFM)/Purview.EventSourcing.ImplementationShared.dll",
"lib/$(TFM)/Purview.EventSourcing.ImplementationShared.xml",
"lib/$(TFM)/Purview.EventSourcing.SqlServer.dll",
"lib/$(TFM)/Purview.EventSourcing.SqlServer.runtimeconfig.json",
"lib/$(TFM)/Purview.EventSourcing.SqlServer.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.validation.fluentvalidation": [
"lib/$(TFM)/Purview.EventSourcing.Validation.FluentValidation.dll",
"lib/$(TFM)/Purview.EventSourcing.Validation.FluentValidation.xml",
"purview-logo-light.png",
"README.md"
],
"purview.eventsourcing.validation.zodsharp": [
"buildTransitive/Purview.EventSourcing.Validation.ZodSharp.targets",
"lib/$(TFM)/Purview.EventSourcing.Validation.ZodSharp.dll",
"lib/$(TFM)/Purview.EventSourcing.Validation.ZodSharp.xml",
"purview-logo-light.png",
"README.md"
]
},
"ForbiddenContent": {}
}
},
"Release": {
"Mode": "None"
Expand Down
11 changes: 3 additions & 8 deletions src/EventSourcing.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<File Path="../.editorconfig" />
<File Path="../Directory.Packages.props" />
<File Path="../package.json" />
<File Path="../purview-build.json" />
<File Path="Directory.Build.props" />
<File Path="Directory.Build.targets" />
</Folder>
Expand Down Expand Up @@ -58,21 +59,15 @@
<Project Path="tests/SourceGenerator.UnitTests/SourceGenerator.UnitTests.csproj" />
</Folder>
<Folder Name="/tests/admin/">
<Project
Path="tests/Admin.SqlServer.UnitTests/Admin.SqlServer.UnitTests.csproj"
DisplayName="Admin.SQLServer.UnitTests"
/>
<Project Path="tests/Admin.SqlServer.UnitTests/Admin.SqlServer.UnitTests.csproj" />
<Project Path="tests/Admin.UnitTests/Admin.UnitTests.csproj" />
</Folder>
<Folder Name="/tests/implementations/">
<Project Path="tests/AzureStorage.IntegrationTests/AzureStorage.IntegrationTests.csproj" />
<Project Path="tests/CosmosDb.IntegrationTests/CosmosDb.IntegrationTests.csproj" />
<Project Path="tests/MongoDB.IntegrationTests/MongoDB.IntegrationTests.csproj" />
<Project Path="tests/Postgres.IntegrationTests/Postgres.IntegrationTests.csproj" />
<Project
Path="tests/SqlServer.IntegrationTests/SqlServer.IntegrationTests.csproj"
DisplayName="SQLServer.IntegrationTests"
/>
<Project Path="tests/SqlServer.IntegrationTests/SqlServer.IntegrationTests.csproj" />
</Folder>
<Folder Name="/tests/samples/">
<Project Path="tests/Samples.AppHost.IntegrationTests/Samples.AppHost.IntegrationTests.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using Microsoft.AspNetCore.Http;
using ZodSharp.AspNetCore;
using ZodSharp;
using ZodSharp.Core;

namespace Purview.EventSourcing.Admin.API.Filters;
Expand Down
2 changes: 2 additions & 0 deletions src/src/AzureStorage/TableEventStore.GetEventRangeAsync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,15 @@ static UnknownEvent ReturnUnknownEvent(EventEntity eventEntity, int aggregateVer
if (blobEvent == null)
return null;

// Apply upcasting chain when a registry is available.
return new EventRecord(blobEvent, metadata);
}
}

if (@event == null)
return null;

// Apply upcasting chain when a registry is available.
return new EventRecord(@event, metadata);
}
#pragma warning disable CA1031
Expand Down
2 changes: 1 addition & 1 deletion src/src/AzureStorage/TableEventStore.SaveOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ CancellationToken cancellationToken
return (null, aggregate, operationContext, idempotencyId, changeEvents, isNew, idempotencyMarkerOperation);
}

[System.Diagnostics.CodeAnalysis.SuppressMessage(
[SuppressMessage(
"Maintainability",
"CA1502:Avoid excessive complexity",
Justification = "Save orchestration handles many interleaved states; keep the flow readable."
Expand Down
6 changes: 2 additions & 4 deletions src/src/Benchmarks/BenchmarkHistoryStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@

namespace Purview.EventSourcing.Benchmarks;

sealed class BenchmarkHistoryStore
sealed class BenchmarkHistoryStore(string mode)
{
static readonly JsonSerializerOptions SerializerOptions = new() { WriteIndented = true };

readonly string _mode;
readonly string _mode = mode;

readonly string _repositoryRoot = FindRepositoryRoot();

public BenchmarkHistoryStore(string mode) => _mode = mode;

string HistoryDirectory => Path.Combine(_repositoryRoot, "artifacts", $"{_mode}-performance", "history");

string LatestPath => Path.Combine(_repositoryRoot, "artifacts", $"{_mode}-performance", "latest.json");
Expand Down
2 changes: 1 addition & 1 deletion src/src/Benchmarks/Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<RootNamespace>Purview.EventSourcing</RootNamespace>
<RootNamespace>Purview.EventSourcing.Benchmarks</RootNamespace>
<LangVersion>preview</LangVersion>
<NoWarn>$(NoWarn);CA1303;CA1308;CA1707;CA1822;CA1515;CA1852;</NoWarn>
<OutputType>Exe</OutputType>
Expand Down
Loading
Loading