diff --git a/.github/workflows/SonarCloud.yml b/.github/workflows/SonarCloud.yml index 0be93b08..da6a269a 100644 --- a/.github/workflows/SonarCloud.yml +++ b/.github/workflows/SonarCloud.yml @@ -13,8 +13,8 @@ jobs: # (PRs from forks can't access secrets other than secrets.GITHUB_TOKEN for security reasons) if: ${{ !github.event.pull_request.head.repo.fork }} env: - version: '3.2.2' - versionFile: '3.2.2' + version: '3.3.0' + versionFile: '3.3.0' steps: - name: Set up JDK 17 uses: actions/setup-java@v3 diff --git a/CHANGES.md b/CHANGES.md index 1c08e8d1..29f42318 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,89 +1,10 @@ Latest Changes ==== -v3.2.2 +Changes after v3.0.0 === -See https://github.com/axuno/SmartFormat/releases/tag/v3.2.2 - -v3.2.1 -=== - -### PluralLocalizationFormatter - -* Fix: Auto-detection of PluralLocalizationFormatter does not throw for values not convertible to decimal by @axunonb in https://github.com/axuno/SmartFormat/pull/330 Resolves #329 (Thanks to @BtbN) - - * Current behavior, introduced in v3.2.0: - When `PluralLocalizationFormatter.CanAutoDetect == true`, values that are not convertible to `decimal` will throw then trying to `IConvertible.ToDecimal(...)` - - * New behavior, equivalent to v3.1.0: - When `PluralLocalizationFormatter.CanAutoDetect == true`, for values that are not convertible to `decimal`, `IFormatter.TryEvaluateFormat(...)` will return `false` - -* Fix processing for Singular languages by @axunonb in https://github.com/axuno/SmartFormat/pull/322 - -### Other Changes - -* EditorConfig and appveyor.yml by @axunonb in https://github.com/axuno/SmartFormat/pull/319 -* Integrate Cysharp.ZString release v2.5.0 (26 Oct 2022) by @axunonb in https://github.com/axuno/SmartFormat/pull/323 -* Fix: PluralRules for Czech locale by @alexheb in https://github.com/axuno/SmartFormat/pull/325 -* Fixes for Demo App and NUnit TestAdapter by @axunonb in https://github.com/axuno/SmartFormat/pull/328 - -**Full Changelog**: https://github.com/axuno/SmartFormat/compare/v3.2.0...v3.2.1 - -v3.2.0 -=== -### Enhancements - -* Remove usage of Linq for less GC -* Add `IConvertable` support for `PluralLocalizationFormatter` and `ConditionalFormatter` -* `ListFormatter` - * ListFormatter handles selector name "Index" in `IEnumerable`s and `IList`s: In `v1.6.1` a Selector was tested for having the name **"index"**, even if data was not an `IList`, and returned the `CollectionIndex`. This is now implemented again in the `ListFormatter.TryEvaluateSelector(...)` - * Set the `ParentPlaceholder` property for item `Format`s - * Use `PooledObject` where possible, so objects will be returned to `ObjectPool` also in case of exceptions - -### Fixes -* `FormatItem.AsSpan()` returns the correct name -* Remove potential namespace collisions: All public types in namespace `Cysharp.Text` are now internal - - -v3.1.0 -=== - -This is a feature update, that is released upon feedback from the community. - -### Thread-safe Mode - -Thread-safe mode is now enabled by default: -`SmartSettings.IsThreadSafeMode == true`.
-This has no impact on the API. - -In case *SmartFormat* is *exclusively* utilized in a single-threaded context, `SmartSettings.IsThreadSafeMode=false` should be considered for enhanced performance. - -### Static `Smart` Methods for Formatting - -Static `Smart` methods like Smart.Format(*format*, *args*) can now be called in an `async` / multi-threaded context. - -The `SmartFormatter` instance returned by `Smart.Default` is flagged with the `ThreadStatic` attribute. - -### `ListFormatter` may have Placeholders in "spacers" - -Thanks to **[karljj1](https://github.com/axuno/SmartFormat/commits?author=karljj1)** for the PR. - -Before *v3.1.0* the format options for `ListFormatter` could only contain literal text. Now `Placeholder`s are allowed. - -#### Example: - -```CSharp -var args = new { - Names = new[] { "John", "Mary", "Amy" }, - IsAnd = true, // true or false - Split = ", " // comma and space as list separator -}; -_ = Smart.Format("{Names:list:{}|{Split}| {IsAnd:and|nor} }", args); -// Output for "IsAnd=true": "John, Mary and Amy" -// Output for "IsAnd=false": "John, Mary nor Amy" -``` -
+Please see release notes for all versions after v3.0.0 on https://github.com/axuno/SmartFormat/releases/ v3.0.0 === diff --git a/appveyor.yml b/appveyor.yml index b352f4a0..a892f0c1 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -23,7 +23,7 @@ for: - ps: dotnet restore SmartFormat.sln --verbosity quiet - ps: dotnet add .\SmartFormat.Tests\SmartFormat.Tests.csproj package AltCover - ps: | - $version = "3.2.2" + $version = "3.3.0" $versionFile = $version + "." + ${env:APPVEYOR_BUILD_NUMBER} if ($env:APPVEYOR_PULL_REQUEST_NUMBER) { diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 754858ee..c0445645 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -8,8 +8,8 @@ Copyright 2011-$(CurrentYear) SmartFormat Project https://github.com/axuno/SmartFormat.git true - 3.2.2 - 3.2.2 + 3.3.0 + 3.3.0 3.0.0 latest true diff --git a/src/SmartFormat.Extensions.Newtonsoft.Json/SmartFormat.Extensions.Newtonsoft.Json.csproj b/src/SmartFormat.Extensions.Newtonsoft.Json/SmartFormat.Extensions.Newtonsoft.Json.csproj index b389d73e..fa34feb8 100644 --- a/src/SmartFormat.Extensions.Newtonsoft.Json/SmartFormat.Extensions.Newtonsoft.Json.csproj +++ b/src/SmartFormat.Extensions.Newtonsoft.Json/SmartFormat.Extensions.Newtonsoft.Json.csproj @@ -10,8 +10,8 @@ It uses extensions to provide named placeholders, localization, pluralization, g SmartFormat.Extensions.Newtonsoft.Json SmartFormat.Extensions.Newtonsoft.Json SmartFormat.Extensions.Newtonsoft.Json - See the change log for the main project at - https://github.com/axuno/SmartFormat/blob/main/CHANGES.md + Please see release notes on +https://github.com/axuno/SmartFormat/releases/ MIT diff --git a/src/SmartFormat.Extensions.System.Text.Json/SmartFormat.Extensions.System.Text.Json.csproj b/src/SmartFormat.Extensions.System.Text.Json/SmartFormat.Extensions.System.Text.Json.csproj index 1a8786c9..0352c255 100644 --- a/src/SmartFormat.Extensions.System.Text.Json/SmartFormat.Extensions.System.Text.Json.csproj +++ b/src/SmartFormat.Extensions.System.Text.Json/SmartFormat.Extensions.System.Text.Json.csproj @@ -10,8 +10,8 @@ It uses extensions to provide named placeholders, localization, pluralization, g SmartFormat.Extensions.System.Text.Json SmartFormat.Extensions.System.Text.Json SmartFormat.Extensions.System.Text.Json - See the change log for the main project at - https://github.com/axuno/SmartFormat/blob/main/CHANGES.md + Please see release notes on +https://github.com/axuno/SmartFormat/releases/ MIT diff --git a/src/SmartFormat.Extensions.Time/SmartFormat.Extensions.Time.csproj b/src/SmartFormat.Extensions.Time/SmartFormat.Extensions.Time.csproj index f6085315..3cea6994 100644 --- a/src/SmartFormat.Extensions.Time/SmartFormat.Extensions.Time.csproj +++ b/src/SmartFormat.Extensions.Time/SmartFormat.Extensions.Time.csproj @@ -10,8 +10,8 @@ It uses extensions to provide named placeholders, localization, pluralization, g SmartFormat.Extensions.Time SmartFormat.Extensions.Time SmartFormat.Extensions.Time - See the change log for the main project at - https://github.com/axuno/SmartFormat/blob/main/CHANGES.md + Please see release notes on +https://github.com/axuno/SmartFormat/releases/ MIT diff --git a/src/SmartFormat.Extensions.Xml/SmartFormat.Extensions.Xml.csproj b/src/SmartFormat.Extensions.Xml/SmartFormat.Extensions.Xml.csproj index dc41e49c..7357d98b 100644 --- a/src/SmartFormat.Extensions.Xml/SmartFormat.Extensions.Xml.csproj +++ b/src/SmartFormat.Extensions.Xml/SmartFormat.Extensions.Xml.csproj @@ -10,8 +10,8 @@ It uses extensions to provide named placeholders, localization, pluralization, g SmartFormat.Extensions.Xml SmartFormat.Extensions.Xml SmartFormat.Extensions.Xml - See the change log for the main project at - https://github.com/axuno/SmartFormat/blob/main/CHANGES.md + Please see release notes on +https://github.com/axuno/SmartFormat/releases/ MIT diff --git a/src/SmartFormat.Net/SmartFormat.Net.csproj b/src/SmartFormat.Net/SmartFormat.Net.csproj index b5cbfdaf..aaf139b6 100644 --- a/src/SmartFormat.Net/SmartFormat.Net.csproj +++ b/src/SmartFormat.Net/SmartFormat.Net.csproj @@ -15,8 +15,8 @@ It uses extensions to provide named placeholders, localization, pluralization, g ../SmartFormat/SmartFormat.snk true SmartFormat.NET - See the change log for details of this release: - https://github.com/axuno/SmartFormat/blob/main/CHANGES.md + Please see release notes on +https://github.com/axuno/SmartFormat/releases/ MIT diff --git a/src/SmartFormat/SmartFormat.csproj b/src/SmartFormat/SmartFormat.csproj index 0915b60d..4751bf85 100644 --- a/src/SmartFormat/SmartFormat.csproj +++ b/src/SmartFormat/SmartFormat.csproj @@ -10,8 +10,8 @@ It uses extensions to provide named placeholders, localization, pluralization, g SmartFormat SmartFormat SmartFormat - See the change log for details of this release: -https://github.com/axuno/SmartFormat/blob/main/CHANGES.md + Please see release notes on +https://github.com/axuno/SmartFormat/releases/ MIT