Skip to content

Commit

Permalink
Merge pull request #366 from TimeWarpEngineering/Cramer/2023-06-18
Browse files Browse the repository at this point in the history
Major Release do to MediatR update
  • Loading branch information
StevenTCramer authored Aug 23, 2023
2 parents 41ee3ac + 11ffcf4 commit 09fb16a
Show file tree
Hide file tree
Showing 7 changed files with 49 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
with:
dotnet-version: 7.0.x

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 17.x
# - name: Setup Node
# uses: actions/setup-node@v3
# with:
# node-version: 18

- name: Build
run: |
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<Authors>Steven T. Cramer</Authors>
<Product>Blazor State</Product>
<PackageVersion>8.2.7+7.0.400</PackageVersion>
<PackageVersion>9.0.0+7.0.400</PackageVersion>
<PackageProjectUrl>https://timewarpengineering.github.io/blazor-state/</PackageProjectUrl>
<PackageTags>TimeWarp-State; TimeWarpState; BlazorState; Blazor; State; Blazor-State; MediatR; Mediator; Pipeline; Redux; Flux</PackageTags>
<RepositoryUrl>https://github.com/TimeWarpEngineering/blazor-state.git</RepositoryUrl>
Expand Down
8 changes: 4 additions & 4 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project>
<ItemGroup>
<PackageVersion Include="AnyClone" Version="1.1.6" />
<PackageVersion Include="Blazor-State" Version="8.2.6" />
<PackageVersion Include="Blazor-State" Version="9.0.0" />
<PackageVersion Include="coverlet.msbuild" Version="6.0.0" />
<PackageVersion Include="Dawn.Guard" Version="1.12.0" />
<PackageVersion Include="FakeItEasy" Version="7.3.1" />
<PackageVersion Include="Fixie" Version="3.3.0" />
<PackageVersion Include="Fixie.TestAdapter" Version="3.3.0" />
<PackageVersion Include="FluentAssertions" Version="6.11.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="MediatR" Version="12.1.1" />
<PackageVersion Include="Microsoft.AspNetCore.Components.Web" Version="7.0.10" />
<PackageVersion Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.10" />
Expand All @@ -19,8 +19,8 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageVersion>
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.6.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.6.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.7.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.7.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Abstractions" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="6.0.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" />
Expand Down
12 changes: 12 additions & 0 deletions Documentation/Migrations/Migration8-9.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
uid: BlazorState:Migration7-8.md
title: Migrate From 7.X to 8.X
---

# Migration

## From 7.x to 8.x

### MediatR 11 to 12 migration

In this release we migrate from MediatR 11 to 12 see the MediatR migration notes here https://github.com/jbogard/MediatR/wiki/Migration-Guide-11.x-to-12.0
19 changes: 19 additions & 0 deletions Documentation/ReleaseNotes/Release9.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
uid: BlazorState:Release.9.0.0.md
title: Release 9.0.0
---

## Release 9.0.0

### Breaking Changes

* Blazor-State now requires MediatR version 12.1.1 which actually should have been a breaking change on MediatR.

See [Migrations](xref:BlazorState:Migration8-9.md) for instructions on how to migrate from version 7.0.0 to 8.0.0.

### Other Changes

* Updates to the Sample app and test app to use MediatR version 12.1
* Update Microsoft.CodeAnalysis.Common 4.6.0 -> 4.7.0
* Update Microsoft.CodeAnalysis.CSharp.Workspaces 4.6.0 -> 4.7.0
* Updates other development dependencies
6 changes: 4 additions & 2 deletions Source/BlazorState/Extensions/ServiceCollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public static IServiceCollection AddBlazorState
aServiceCollection.AddScoped<BlazorHostingLocation>();
aServiceCollection.AddScoped<JsonRequestHandler>();
aServiceCollection.AddScoped<Subscriptions>();
aServiceCollection.AddScoped(typeof(IRequestPostProcessor<,>), typeof(RenderSubscriptionsPostProcessor<,>));
aServiceCollection.AddScoped<IStore, Store>();
aServiceCollection.AddSingleton(blazorStateOptions);

Expand Down Expand Up @@ -110,8 +109,11 @@ private static void EnsureMediator(IServiceCollection aServiceCollection, Blazor
.AddMediatR
(
aMediatRServiceConfiguration =>
aMediatRServiceConfiguration.RegisterServicesFromAssemblies(aBlazorStateOptions.Assemblies.ToArray())
aMediatRServiceConfiguration
.RegisterServicesFromAssemblies(aBlazorStateOptions.Assemblies.ToArray())
.AddOpenRequestPostProcessor(typeof(RenderSubscriptionsPostProcessor<,>))
);
aServiceCollection.TryAddEnumerable(new ServiceDescriptor(typeof(IPipelineBehavior<,>), typeof(RequestPreProcessorBehavior<,>), ServiceLifetime.Transient));
}
}

Expand Down
5 changes: 5 additions & 0 deletions Tests/TestApp/Client/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ namespace TestApp.Client;
using BlazorState;
using BlazorState.Pipeline.ReduxDevTools;
using MediatR;
using MediatR.Pipeline;
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
Expand All @@ -12,6 +13,8 @@ namespace TestApp.Client;
using System.Net.Http;
using System.Reflection;
using System.Threading.Tasks;
using TestApp.Client.Pipeline.NotificationPostProcessor;
using TestApp.Client.Pipeline.NotificationPreProcessor;

public class Program
{
Expand Down Expand Up @@ -64,6 +67,8 @@ public static void ConfigureServices(IServiceCollection aServiceCollection)
};
}
);
aServiceCollection.AddTransient(typeof(IRequestPreProcessor<>), typeof(PrePipelineNotificationRequestPreProcessor<>));
aServiceCollection.AddTransient(typeof(IRequestPostProcessor<,>), typeof(PostPipelineNotificationRequestPostProcessor<,>));
aServiceCollection.AddScoped(typeof(IPipelineBehavior<,>), typeof(Features.EventStream.EventStreamBehavior<,>));
aServiceCollection.AddSingleton(aServiceCollection);

Expand Down

0 comments on commit 09fb16a

Please sign in to comment.