diff --git a/.editorconfig b/.editorconfig index cfdab13ec..1fbb86aae 100644 --- a/.editorconfig +++ b/.editorconfig @@ -479,6 +479,7 @@ csharp_style_pattern_local_over_anonymous_function = false # IDE0039: Use local # AsyncFixer # http://www.asyncfixer.com dotnet_diagnostic.AsyncFixer01.severity = none # AsyncFixer01: Unnecessary async/await usage +dotnet_diagnostic.AsyncFixer04.severity = none # 'cts' is not awaited inside a using block - the resource may be disposed before the async operation completes. Add 'await' to ensure proper resource lifetime. # Meziantou # https://www.meziantou.net/enforcing-asynchronous-code-good-practices-using-a-roslyn-analyzer.htm diff --git a/Directory.Packages.props b/Directory.Packages.props index 9a478743b..ad9882d5a 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -5,17 +5,17 @@ - - + + - + - + @@ -72,18 +72,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -116,6 +116,6 @@ - + diff --git a/docs/site/docs/migrations/1to2.md b/docs/site/docs/migrations/1to2.md index 0555f58a2..29664ab7c 100644 --- a/docs/site/docs/migrations/1to2.md +++ b/docs/site/docs/migrations/1to2.md @@ -4,10 +4,10 @@ title: Migrating from 1.x to 2.x --- # Migrating from bUnit 1.x to 2.x -This document describes the changes made in bUnit 2.x that may affect existing tests written for bUnit 1.x. The old documentation for bUnit 1.x is available at: https://v1.bunit.dev. +This document describes the changes made in bUnit 2.x that may affect existing tests written for bUnit 1.x. The old documentation for bUnit 1.x is available at: https://v1.bunit.dev. ## One package to rule them all -`bunit.core` and `bunit.web` have be merged into a single package called `bunit`. The seperation was used to allow for extensibitlity, which isn't used anymore. Therefore `bunit.core` and `bunit.web` will stay on version 1.x, while `bunit` will be the only package going forward. To migrate, simply remove the `bunit.core` and `bunit.web` packages and add the `bunit` package. We don't expect many users to have used the `bunit.core` or `bunit.web` package directly, but may hit 3rd party packages that depend on them. +`bunit.core` and `bunit.web` have been merged into a single package called `bunit`. The separation was used to allow for extensibility, which isn't used anymore. Therefore `bunit.core` and `bunit.web` will stay on version 1.x, while `bunit` will be the only package going forward. To migrate, simply remove the `bunit.core` and `bunit.web` packages and add the `bunit` package. We don't expect many users to have used the `bunit.core` or `bunit.web` package directly, but may hit 3rd party packages that depend on them. ## `TestContext` renamed to `BunitContext` @@ -26,8 +26,8 @@ The `Fake` prefix used for various fake implementations has been renamed to `Bun * `FakeNavigationManager` to `BunitNavigationManager` * `FakeJSRuntime` to `BunitJSRuntime` * `FakeAuthenticationStateProvider` to `BunitAuthenticationStateProvider` - * `FakeAuthrozitationContext` to `BunitAuthorizationContext` - * `FakeuthorizationPolicyProvider` to `BunitAuthorizationPolicyProvider` + * `FakeAuthorizationContext` to `BunitAuthorizationContext` + * `FakeAuthorizationPolicyProvider` to `BunitAuthorizationPolicyProvider` ## Unified the `Render` methods In v1 there were multiple `RenderXXX`methods (like `RenderComponent`, `Render` and `SetParametersAndRender`) that were used to render components and markup. In v2, these methods have been unified into a single `Render` method that can handle both components and markup) via the simple `Render` method: @@ -89,7 +89,7 @@ The `DisposeComponents` method has been renamed to `DisposeComponentsAsync` and + await DisposeComponentsAsync(); ``` -## The `ComponentParameterFactory` and `ComponentParameter` has been removed +## The `ComponentParameterFactory` and `ComponentParameter` has been removed The `ComponentParameterFactory` class has been removed (and therefore the usage of `ComponentParameter`). Instead, use the `Render` method (and its overloads) to pass parameters to components. diff --git a/version.json b/version.json index d486ef3e8..035a06cb3 100644 --- a/version.json +++ b/version.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json", - "version": "2.7", + "version": "2.8-preview", "assemblyVersion": { "precision": "revision" },