Skip to content
Open
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
6 changes: 5 additions & 1 deletion .github/workflows/pull-requests-v0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ jobs:
run: |
powershell -NoProfile -ExecutionPolicy unrestricted -Command ".\up-integration-environment.ps1"

- name: Install Bake
run: |
dotnet tool update -g Bake --version 0.37.51

- name: Run Bake
run: |
bake run --build-version 0.85.${{ github.run_number }}
bake run --build-version 0.86.${{ github.run_number }}

- name: Upload NuGet packages
uses: actions/upload-artifact@v4
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/release-v0.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ on:

permissions:
contents: write
packages: write

jobs:
build:
Expand Down Expand Up @@ -36,11 +37,13 @@ jobs:
run: |
powershell -NoProfile -ExecutionPolicy unrestricted -Command ".\up-integration-environment.ps1"

- name: Install Bake
run: |
dotnet tool update -g Bake --version 0.37.51

- name: Run Bake
run: |
declare -i REVISION
REVISION=4714+$GITHUB_RUN_NUMBER
bake run --convention=Release --build-version 0.85.$REVISION --destination="nuget>github,nuget,release>github"
bake run --convention=Release --build-version 0.86.${{ github.run_number }} --destination="nuget>github,nuget,release>github"

- name: Upload NuGet packages
uses: actions/upload-artifact@v4
Expand Down
52 changes: 51 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,54 @@
### New in 0.85 (not released yet)
### New in 0.86 (not released yet)

Additive .NET 10 support plus security dependency floors. Existing target
frameworks and their dependency groups are unchanged except for the security
floors explicitly listed below - net452 and netstandard1.6 consumers resolve
exactly the same assets and dependencies as 0.85.5. Only applications
targeting net10.0 (or later) pick up the new net10.0 assets below.

* New: Added `net10.0` target framework to `EventFlow`, `EventFlow.Sql`,
`EventFlow.MsSql`, `EventFlow.AspNetCore` and `EventFlow.DependencyInjection`
* New: On `net10.0`, the DbUp integration is compiled against `dbup-core` `6.1.1`
(new `IUpgradeLog` interface; adds a transitive dependency on
`Microsoft.Extensions.Logging.Abstractions`) and `dbup-sqlserver` `7.2.0`,
which unblocks consumers that need DbUp 6.x elsewhere in their dependency graph
* New: On `net10.0`, `EventFlow.MsSql` depends on `Microsoft.Data.SqlClient` `6.1.4`
* New: On `net10.0`, `EventFlow.AspNetCore` uses the ASP.NET Core shared framework
reference instead of the legacy `Microsoft.AspNetCore.*` `2.2`/`3.1` packages,
and `Microsoft.AspNetCore.Mvc.NewtonsoftJson` `10.0.0`
* New: On `net10.0`, `EventFlow.DependencyInjection` depends on
`Microsoft.Extensions.DependencyInjection` `10.0.0`
* Fix: Security floor `System.Text.Encodings.Web` `4.7.2` added to
`EventFlow.PostgreSql` (GHSA-ghhp-997w-qr28, pulled in via `Npgsql`)
* Fix: Security floor `Snappier` `1.3.1` added to `EventFlow.MongoDB`
(GHSA-pggp-6c3x-2xmx, pulled in via `MongoDB.Driver`)
* Breaking: Updated `Hangfire.Core` from `1.6.20` to `1.7.37` in
`EventFlow.Hangfire` for `netstandard2.0` only, due to GHSA-xcvr-qv8h-m7xw in
the 1.6 netstandard dependency chain. Consumers using `Hangfire.SqlServer`
(or other Hangfire 1.6.x storage packages) must move them to `1.7.x` together
(1.6.x storage packages pin `Hangfire.Core` exactly and will fail restore
with NU1107 otherwise); see the Hangfire 1.7 upgrade guide if you extend
Hangfire internals. `net452`/`netstandard1.6` keep `Hangfire.Core` `1.6.20`
* Fix: Security floor `System.Text.RegularExpressions` `4.3.1` added to
`EventFlow.EventStores.EventStore` (GHSA-cmhx-cq75-c4mj, via
`EventStore.Client` -> `protobuf-net`)
* Fix: Security floor `System.Text.RegularExpressions` `4.3.1` added to
`EventFlow.SQLite` for `netstandard2.0` only (GHSA-cmhx-cq75-c4mj, via
`dbup-sqlserver` `5.0.40` chain)
* Fix: `EventFlow.TestHelpers` updated `Microsoft.Data.SqlClient` from `5.1.4`
to `5.2.2` and added security floor `System.Text.RegularExpressions` `4.3.1`
(GHSA-cmhx-cq75-c4mj, via `AutoFixture.AutoMoq` and `Moq`)
* Fix: `EventFlow.MsSql` updated `Microsoft.Data.SqlClient` from `5.2.0` to
`5.2.2` on `netstandard2.0` and added security floor
`System.Text.RegularExpressions` `4.3.1` (GHSA-cmhx-cq75-c4mj, via
`dbup-sqlserver` `5.0.40` chain)
* Note: `SharpCompress` (GHSA-6c8g-7p36-r338, via `MongoDB.Driver`) has no
patched release yet; EventFlow does not extract archives - monitor for a
fixed version
* Note: The `net452` and `netstandard1.6` dependency graphs are intentionally
unchanged (legacy, platform-covered)

### New in 0.85.5 (released 2025-05-29)

* New: Update from `System.Data.SqlClient` to `Microsoft.Data.SqlClient` (thanks @janrybka)

Expand Down
8 changes: 8 additions & 0 deletions Source/Common.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<PackageIcon>icon-128.png</PackageIcon>
<CheckEolTargetFramework>false</CheckEolTargetFramework>
<!-- Legacy TFMs flood the SDK 10 audit with known advisories in old transitive chains;
the modern (netstandard2.0+) graphs are kept clean via explicit floors instead -->
<NuGetAudit>false</NuGetAudit>
<NoWarn>$(NoWarn);NETSDK1215</NoWarn>
<!-- Keep nuspec dependency groups for the pre-net10.0 TFMs byte-identical to 0.85.5;
SDK 10 package pruning would otherwise silently drop framework-provided packages
(e.g. Microsoft.CSharp) from the netcoreapp3.x dependency groups. -->
<RestoreEnablePackagePruning>false</RestoreEnablePackagePruning>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net10.0</TargetFrameworks>
<IsPackable>False</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Autofac.Extensions.DependencyInjection" Version="4.2.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.1.5" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\EventFlow.AspNetCore\EventFlow.AspNetCore.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public class EventFlowJsonOptionsMvcConfiguration
#if NETSTANDARD2_0
: IConfigureOptions<MvcJsonOptions>
#endif
#if (NETCOREAPP3_0 || NETCOREAPP3_1)
#if NETCOREAPP3_0_OR_GREATER
: IConfigureOptions<MvcNewtonsoftJsonOptions>
#endif
{
Expand All @@ -47,7 +47,7 @@ public void Configure(MvcJsonOptions options)
_jsonOptions.Apply(options.SerializerSettings);
}
#endif
#if (NETCOREAPP3_0 || NETCOREAPP3_1)
#if NETCOREAPP3_0_OR_GREATER
public void Configure(MvcNewtonsoftJsonOptions options)
{
_jsonOptions.Apply(options.SerializerSettings);
Expand Down
10 changes: 8 additions & 2 deletions Source/EventFlow.AspNetCore/EventFlow.AspNetCore.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Common.props" />
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;netcoreapp3.1</TargetFrameworks>
<TargetFrameworks>netstandard2.0;netcoreapp3.0;netcoreapp3.1;net10.0</TargetFrameworks>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
Expand All @@ -21,11 +21,17 @@
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' != 'net10.0'">
<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Core" Version="2.2.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.5" />
<PackageReference Include="Microsoft.Extensions.Options" Version="3.1.5" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="10.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public AspNetCoreEventFlowOptions UseMvcJsonOptions()
return this;
}
#endif
#if (NETCOREAPP3_0 || NETCOREAPP3_1)
#if NETCOREAPP3_0_OR_GREATER
public AspNetCoreEventFlowOptions UseMvcJsonOptions()
{
_options.RegisterServices(s =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net10.0</TargetFrameworks>
<IsPackable>False</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NUnit" Version="3.12.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\EventFlow.DependencyInjection\EventFlow.DependencyInjection.csproj" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<TargetFrameworks>netstandard2.0;net10.0</TargetFrameworks>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<GenerateAssemblyInfo>True</GenerateAssemblyInfo>
<GeneratePackageOnBuild>False</GeneratePackageOnBuild>
Expand All @@ -21,9 +21,15 @@
<IsPackable>true</IsPackable>
</PropertyGroup>

<ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="2.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="2.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="10.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="10.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
<ItemGroup>
<PackageReference Include="EventStore.Client" Version="5.0.1" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<!-- Security floor for GHSA-cmhx-cq75-c4mj (System.Text.RegularExpressions) via EventStore.Client -> protobuf-net -->
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<Folder Include="Properties\" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Hangfire.SqlServer" Version="1.6.20" />
<PackageReference Include="Hangfire.SqlServer" Version="1.7.37" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
Expand Down
6 changes: 5 additions & 1 deletion Source/EventFlow.Hangfire/EventFlow.Hangfire.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,11 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Hangfire.Core" Version="1.6.20" />
<!-- Security fix for GHSA-xcvr-qv8h-m7xw (Microsoft.NETCore.Jit via the 1.6 netstandard chain);
net452/netstandard1.6 keep 1.6.20 as their 1.6 chain is unaffected and 1.7 pairs
with Hangfire.SqlServer 1.7.x -->
<PackageReference Condition="'$(TargetFramework)' == 'netstandard2.0'" Include="Hangfire.Core" Version="1.7.37" />
<PackageReference Condition="'$(TargetFramework)' != 'netstandard2.0'" Include="Hangfire.Core" Version="1.6.20" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
2 changes: 2 additions & 0 deletions Source/EventFlow.MongoDB/EventFlow.MongoDB.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="MongoDB.Driver" Version="2.28.0" />
<!-- Security floor for GHSA-pggp-6c3x-2xmx (Snappier) pulled in via MongoDB.Driver -->
<PackageReference Include="Snappier" Version="1.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
10 changes: 8 additions & 2 deletions Source/EventFlow.MsSql.Tests/EventFlow.MsSql.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="../Common.props" />
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFrameworks>netcoreapp3.1;net10.0</TargetFrameworks>
<TreatWarningsAsErrors>True</TreatWarningsAsErrors>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
<IsPackable>False</IsPackable>
Expand All @@ -18,10 +18,16 @@
<EmbeddedResource Include="IntegrationTests\ReadStores\Scripts\0002 - Create table ReadModel-ThingyMessage.sql" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="NUnit" Version="3.12.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'netcoreapp3.1'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="NUnit3TestAdapter" Version="3.17.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net10.0'">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>
<ItemGroup>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
// The MIT License (MIT)
//
// Copyright (c) 2015-2024 Rasmus Mikkelsen
// https://github.com/eventflow/EventFlow
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
// the Software without restriction, including without limitation the rights to
// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
// the Software, and to permit persons to whom the Software is furnished to do so,
// subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System;
using EventFlow.Configuration;
using EventFlow.MsSql.EventStores;
using EventFlow.MsSql.Extensions;
using EventFlow.TestHelpers;
using EventFlow.TestHelpers.MsSql;
using NUnit.Framework;

namespace EventFlow.MsSql.Tests.IntegrationTests
{
/// <summary>
/// Exercises the DbUp integration end-to-end (UpgradeEngine + DbUpUpgradeLog) against
/// a real SQL Server. On netcoreapp3.1 this runs against dbup-core 5.x, on net10.0
/// against dbup-core 6.x, proving both TFM-specific dependency sets migrate correctly.
/// </summary>
[Category(Categories.Integration)]
public class MsSqlDatabaseMigratorTests
{
private IMsSqlDatabase _testDatabase;
private IRootResolver _resolver;

[SetUp]
public void SetUp()
{
_testDatabase = MsSqlHelpz.CreateDatabase("eventflow-migrator");
_resolver = EventFlowOptions.New
.ConfigureMsSql(MsSqlConfiguration.New.SetConnectionString(_testDatabase.ConnectionString.Value))
.CreateResolver();
}

[TearDown]
public void TearDown()
{
_resolver?.Dispose();
_testDatabase?.Dispose();
}

[Test]
public void EmbeddedScriptsAreMigratedAndIdempotent()
{
// Arrange
var databaseMigrator = _resolver.Resolve<IMsSqlDatabaseMigrator>();

// Act (twice - DbUp journals executed scripts, so the second run must be a no-op)
EventFlowEventStoresMsSql.MigrateDatabase(databaseMigrator);
EventFlowEventStoresMsSql.MigrateDatabase(databaseMigrator);

// Assert - the migrated table exists and is queryable
_testDatabase.Execute("SELECT TOP 1 GlobalSequenceNumber FROM [dbo].[EventFlow]");
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

using System.Data;
#if NETSTANDARD2_0_OR_GREATER
#if NETSTANDARD2_0_OR_GREATER || NET5_0_OR_GREATER
using Microsoft.Data.SqlClient;
#else
using System.Data.SqlClient;
Expand Down
Loading
Loading