Skip to content

Commit

Permalink
Sync with the latest changes (#1)
Browse files Browse the repository at this point in the history
* Remove support for obsolete versions of .NET (mrpmorris#385)

* Change IDisposable to IAsyncDisposable (Fixes mrpmorris#324)

* ReduxDevTools should not call UseRouting (Fixes mrpmorris#360) (mrpmorris#388)

* Remove UseRouting from UseReduceDevTools

* Allow action filtering on redux dev tools (fixes mrpmorris#383) (mrpmorris#389)

* Support action filtering in Redux Dev Tools

* Add unit tests

* Remove Newtonsoft.Json (Fixes mrpmorris#386) (mrpmorris#392)

* Remove dependency on Newtonsoft.Json

* Remove support for obsolete versions of .NET (mrpmorris#385)

* Change IDisposable to IAsyncDisposable (Fixes mrpmorris#324)

* ReduxDevTools should not call UseRouting (Fixes mrpmorris#360) (mrpmorris#388)

* Remove UseRouting from UseReduceDevTools

* Allow action filtering on redux dev tools (fixes mrpmorris#383) (mrpmorris#389)

* Support action filtering in Redux Dev Tools

* Add unit tests

* Remove Newtonsoft.Json (Fixes mrpmorris#386) (mrpmorris#392)

* Remove dependency on Newtonsoft.Json

* Allow action filtering on redux dev tools (fixes mrpmorris#383) (mrpmorris#389)

* Support action filtering in Redux Dev Tools

* Add unit tests

* Bump Swashbuckle.AspNetCore.SwaggerUI

Bumps [Swashbuckle.AspNetCore.SwaggerUI](https://github.com/domaindrivendev/Swashbuckle.AspNetCore) from 6.3.0 to 6.4.0.
- [Release notes](https://github.com/domaindrivendev/Swashbuckle.AspNetCore/releases)
- [Commits](domaindrivendev/Swashbuckle.AspNetCore@v6.3.0...v6.4.0)

---
updated-dependencies:
- dependency-name: Swashbuckle.AspNetCore.SwaggerUI
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Deadlock mrpmorris#474 (mrpmorris#476)

* Add lock conflict test
* Alternate locking approach
* Update .net versions

* Eliminate deadlock when executing an action from IDispatcher.ActionDispatched on a different thread mrpmorris#474 (mrpmorris#477)

* Update SourceLink
* Fix flaky tests in ThrottledInvoker
* Execute feature callbacks outside lock()

* Have ThrottledInvoker re-enter if the timer executes too soon.

* Have test ensure the execution window is within (ThrottleWindowMs) and (ThrottleWindowMs* 2)

* Change parameter name from action to throttledAction in test.

* Don't test for too long, only too short.

* Task.Yield to ensure fire-and-forget action logging has time to complete

* Update throttling tests

* Update throttling test comments

* Rewrite ThrottledInvoker to not use Timers

* Source formatting

* Make throttled invoker disposable

* Call ThrottledInvoker.Dispose  from Blazor libraries

* ThrottledInvoke.Dispose tests

* Change style of unit test

* Remove race condition from test

* Change test timings

* Spelling error

* Use IAsyncLifetime instead of using Task.Wait()

* Code tidy

* Remove NCrunch file

* Ignore *ncrunch*

* Use TimeSpan instead of int MS

* 6.0-Beta1

* Fix errors in tests detected by NCrunch.

* Unit tests for navigation fragments

* Rename UrlComparer.SameAs to UrlComparer.AreEqual

* Delete TestNavigationManager

* Add a note to Releases.md about mrpmorris#455

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Peter Morris <mrpmorris@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 22, 2024
1 parent f54be56 commit 419af40
Show file tree
Hide file tree
Showing 305 changed files with 6,414 additions and 6,288 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ publish.bat
**/PublishProfiles/**
secrets.txt
**/MrPMorris.snk
**/*ncrunch*

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
Expand Down Expand Up @@ -263,4 +264,4 @@ paket-files/

# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
*.pyc
2 changes: 1 addition & 1 deletion BuildAndTest.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
@call build.bat
dotnet test -c Release Source\Fluxor.sln
dotnet test --no-build Source\Fluxor.sln
12 changes: 9 additions & 3 deletions Docs/releases.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Releases

## New in 6.0
* **Breaking change**: Remove support for obsolete versions of .NET framework ([#384](https://github.com/mrpmorris/Fluxor/issues/384))
* **Breaking change**: Replace IDisposable with IAsyncDisposable in Blazor components ([#324](https://github.com/mrpmorris/Fluxor/issues/324))
* **Breaking change**: `UseReduxDevTools` no longer ensures `UseRouting` is called ([#360](https://github.com/mrpmorris/Fluxor/issues/360))
* **Breaking change**: `UseReduxDevTools` no longer requires `Newtonsoft.Json` ([#386](https://github.com/mrpmorris/Fluxor/issues/386))
* Support Action Filtering in Redux Dev Tools ([#383](https://github.com/mrpmorris/Fluxor/issues/383))
* Do not consider anchor (Uri.Fragment) when checking Uri for changes in routing middleware ([#455](https://github.com/mrpmorris/Fluxor/issues/455))

## New in 5.9
* Adds additional useful information to exception thrown by `DisposableAction` ([#425](https://github.com/mrpmorris/Fluxor/issues/425))
* Fix deadlock scenario when dispatching actions from an effect triggered by store activation ([#426](https://github.com/mrpmorris/Fluxor/issues/426))

## New in 5.8
* Fixes potential for deadlock ([#407](https://github.com/mrpmorris/Fluxor/issues/407))

## New in 5.7
* Fixes potential for deadlock ([#407](https://github.com/mrpmorris/Fluxor/issues/407))## New in 5.7
* Fixes memory leak when using `ActionSubscriber` or `SubscribeToAction` ([#378](https://github.com/mrpmorris/Fluxor/issues/378))

## New in 5.6
Expand Down
63 changes: 63 additions & 0 deletions Source/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,66 @@ dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
#prefer properties not to be prefaced with this. or Me. in Visual Basic
dotnet_style_qualification_for_property = false:suggestion
csharp_indent_labels = one_less_than_current
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent
csharp_style_namespace_declarations = file_scoped:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_prefer_primary_constructors = true:suggestion
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_operators = false:silent

[*.{cs,vb}]
#### Naming styles ####

# Naming rules

dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i

dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

# Symbol specifications

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_operator_placement_when_wrapping = beginning_of_line
tab_width = 4
indent_size = 4
end_of_line = crlf
dotnet_style_namespace_match_folder = true:suggestion
24 changes: 22 additions & 2 deletions Source/Fluxor.sln
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ MinimumVisualStudioVersion = 10.0.40219.1
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tutorials", "Tutorials", "{1A6663AC-4F1F-40AD-8D03-0B0977ED466D}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{2279CD95-5886-4777-B019-E66683CE32F1}"
ProjectSection(SolutionItems) = preProject
Tests\Directory.Build.props = Tests\Directory.Build.props
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C2B1D7B3-E943-4EA3-88B0-94433B49080C}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
Lib\Directory.Build.props = Lib\Directory.Build.props
..\Build.bat = ..\Build.bat
..\BuildAndTest.bat = ..\BuildAndTest.bat
..\LICENCE = ..\LICENCE
..\Publish.bat = ..\Publish.bat
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fluxor", "Lib\Fluxor\Fluxor.csproj", "{863909D3-7E81-4240-8C0A-6F57768D28FF}"
Expand Down Expand Up @@ -119,6 +124,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluxorBlazorWeb.EffectsTuto
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FluxorBlazorWeb.ActionSubscriberTutorial.Contracts", "Tutorials\02-Blazor\02E-ActionSubscriber\FluxorBlazorWeb.ActionSubscriberTutorial\Shared\FluxorBlazorWeb.ActionSubscriberTutorial.Contracts.csproj", "{AE3CD639-5DE8-43ED-9CE4-8498548ADD28}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Fluxor.Blazor.Web.ReduxDevTools.UnitTests", "Tests\Fluxor.Blazor.Web.ReduxDevTools.UnitTests\Fluxor.Blazor.Web.ReduxDevTools.UnitTests.csproj", "{FD3207E5-1DE9-4526-9C2A-4C18129992D9}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -393,6 +400,18 @@ Global
{AE3CD639-5DE8-43ED-9CE4-8498548ADD28}.Release|iPhone.Build.0 = Release|Any CPU
{AE3CD639-5DE8-43ED-9CE4-8498548ADD28}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{AE3CD639-5DE8-43ED-9CE4-8498548ADD28}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
{FD3207E5-1DE9-4526-9C2A-4C18129992D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FD3207E5-1DE9-4526-9C2A-4C18129992D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FD3207E5-1DE9-4526-9C2A-4C18129992D9}.Debug|iPhone.ActiveCfg = Debug|Any CPU
{FD3207E5-1DE9-4526-9C2A-4C18129992D9}.Debug|iPhone.Build.0 = Debug|Any CPU
{FD3207E5-1DE9-4526-9C2A-4C18129992D9}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
{FD3207E5-1DE9-4526-9C2A-4C18129992D9}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
{FD3207E5-1DE9-4526-9C2A-4C18129992D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
{FD3207E5-1DE9-4526-9C2A-4C18129992D9}.Release|Any CPU.Build.0 = Release|Any CPU
{FD3207E5-1DE9-4526-9C2A-4C18129992D9}.Release|iPhone.ActiveCfg = Release|Any CPU
{FD3207E5-1DE9-4526-9C2A-4C18129992D9}.Release|iPhone.Build.0 = Release|Any CPU
{FD3207E5-1DE9-4526-9C2A-4C18129992D9}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
{FD3207E5-1DE9-4526-9C2A-4C18129992D9}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -431,6 +450,7 @@ Global
{3E8452CA-14A3-432E-8378-99EAC13E5EED} = {B5E9B3FC-1304-4A74-B0A9-607282AB2FD0}
{7A6B9736-6DE1-4B52-8A88-D433C8917731} = {730B26CD-CADC-4CF0-8A1D-3BB174692A40}
{AE3CD639-5DE8-43ED-9CE4-8498548ADD28} = {B5E9B3FC-1304-4A74-B0A9-607282AB2FD0}
{FD3207E5-1DE9-4526-9C2A-4C18129992D9} = {2279CD95-5886-4777-B019-E66683CE32F1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {B1F2E0DF-C651-48A3-83E3-3B77D34EC3A2}
Expand Down
22 changes: 7 additions & 15 deletions Source/Lib/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project>
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netstandard2.1;netcoreapp3.1;net5.0;net6.0;net7.0</TargetFrameworks>
<LangVersion>10</LangVersion>
<Version>5.9.0</Version>
<AssemblyVersion>5.9.0.0</AssemblyVersion>
<FileVersion>5.9.0.0</FileVersion>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<Version>6.0.0-Beta1</Version>
<AssemblyVersion>6.0.0.0</AssemblyVersion>
<FileVersion>6.0.0.0</FileVersion>

<Authors>Peter Morris</Authors>
<Company />
Expand All @@ -21,22 +20,15 @@
<ContinuousIntegrationBuild Condition="'$(GITHUB_ACTIONS)' == 'true'">true</ContinuousIntegrationBuild>

<AssemblyOriginatorKeyFile>..\..\..\..\..\MrPMorris.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<DelaySign>false</DelaySign>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<SignAssembly Condition="'$(Configuration)'=='Release'">true</SignAssembly>
<GeneratePackageOnBuild Condition="'$(Configuration)'=='Release'">true</GeneratePackageOnBuild>
</PropertyGroup>

<PropertyGroup>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>NU5118</NoWarn>
</PropertyGroup>

<ItemGroup>
<SupportedPlatform Include="browser" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.*" PrivateAssets="All" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.*" PrivateAssets="All" />
</ItemGroup>

</Project>
45 changes: 22 additions & 23 deletions Source/Lib/Fluxor.Blazor.Web.ReduxDevTools/ActionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,34 @@
using System.Collections.Generic;
using System.Linq;

namespace Fluxor.Blazor.Web.ReduxDevTools
namespace Fluxor.Blazor.Web.ReduxDevTools;

internal class ActionInfo
{
internal class ActionInfo
{
#pragma warning disable IDE1006 // Naming Styles
public string type { get; }
public string type { get; }
#pragma warning restore IDE1006 // Naming Styles
public object Payload { get; }
public object Payload { get; }

public ActionInfo(object action)
{
if (action is null)
throw new ArgumentNullException(nameof(action));
public ActionInfo(object action)
{
if (action is null)
throw new ArgumentNullException(nameof(action));

type = $"{GetTypeDisplayName(action.GetType())}, {action.GetType().Namespace}";
Payload = action;
}
type = $"{GetTypeDisplayName(action.GetType())}, {action.GetType().Namespace}";
Payload = action;
}

public static string GetTypeDisplayName(Type type)
{
if (!type.IsGenericType)
return type.Name;
public static string GetTypeDisplayName(Type type)
{
if (!type.IsGenericType)
return type.Name;

string name = type.GetGenericTypeDefinition().Name;
name = name.Remove(name.IndexOf('`'));
IEnumerable<string> genericTypes = type
.GetGenericArguments()
.Select(GetTypeDisplayName);
return $"{name}<{string.Join(",", genericTypes)}>";
}
string name = type.GetGenericTypeDefinition().Name;
name = name.Remove(name.IndexOf('`'));
IEnumerable<string> genericTypes = type
.GetGenericArguments()
.Select(GetTypeDisplayName);
return $"{name}<{string.Join(",", genericTypes)}>";
}
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,28 +1,34 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<Product>ReduxDevTools for Fluxor Blazor (Web)</Product>
<Description>Middleware link from a Blazor (Web) Fluxor store to the Redux Dev Tools browser extension for Chrome.</Description>
<PackageIcon>fluxor-blazor-reduxdevtools-small.png</PackageIcon>
<PackageTags>Redux Flux DotNet CSharp Blazor RazorComponents ReduxDevTools</PackageTags>
<SignAssembly Condition="'$(Configuration)'=='Release'">True</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Product>ReduxDevTools for Fluxor Blazor (Web)</Product>
<Description>Middleware link from a Blazor (Web) Fluxor store to the Redux Dev Tools browser extension for Chrome.</Description>
<PackageIcon>fluxor-blazor-reduxdevtools-small.png</PackageIcon>
<PackageTags>Redux Flux DotNet CSharp Blazor RazorComponents ReduxDevTools</PackageTags>
</PropertyGroup>

<PropertyGroup>
<RazorLangVersion>3.0</RazorLangVersion>
</PropertyGroup>
<ItemGroup>
<SupportedPlatform Include="browser" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="8.0.0" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="7.0.0" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.AspNetCore.Components.Web" Version="6.0.0" Condition="'$(TargetFramework)' == 'net6.0'" />

<ItemGroup>
<ProjectReference Include="..\Fluxor.Blazor.Web\Fluxor.Blazor.Web.csproj" />
</ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" Condition="'$(TargetFramework)' == 'net8.0'" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="7.0.0" Condition="'$(TargetFramework)' == 'net7.0'" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="6.0.0" Condition="'$(TargetFramework)' == 'net6.0'" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\..\Images\fluxor-blazor-reduxdevtools-small.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Fluxor.Blazor.Web\Fluxor.Blazor.Web.csproj" />
</ItemGroup>

<ItemGroup>
<None Include="..\..\..\Images\fluxor-blazor-reduxdevtools-small.png">
<Pack>True</Pack>
<PackagePath></PackagePath>
</None>
</ItemGroup>
</Project>
16 changes: 0 additions & 16 deletions Source/Lib/Fluxor.Blazor.Web.ReduxDevTools/IJsonSerialization.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
namespace Fluxor.Blazor.Web.ReduxDevTools.Internal.CallbackObjects;

public class BaseCallbackObject<TPayload>
where TPayload : BasePayload
{
#pragma warning disable IDE1006 // Naming Styles
public string type { get; set; }
public TPayload payload { get; set; }
#pragma warning restore IDE1006 // Naming Styles
}

public class BaseCallbackObject : BaseCallbackObject<BasePayload> { }
Loading

0 comments on commit 419af40

Please sign in to comment.