Skip to content

Commit

Permalink
Bump version to v3.3.0 (#356)
Browse files Browse the repository at this point in the history
  • Loading branch information
axunonb committed Sep 25, 2023
1 parent 746ef9d commit a9b0fb3
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 98 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/SonarCloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
83 changes: 2 additions & 81 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -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<T>` 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`.<br/>
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"
```
<br/>
Please see release notes for all versions after v3.0.0 on https://github.com/axuno/SmartFormat/releases/

v3.0.0
===
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<Copyright>Copyright 2011-$(CurrentYear) SmartFormat Project</Copyright>
<RepositoryUrl>https://github.com/axuno/SmartFormat.git</RepositoryUrl>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<Version>3.2.2</Version>
<FileVersion>3.2.2</FileVersion>
<Version>3.3.0</Version>
<FileVersion>3.3.0</FileVersion>
<AssemblyVersion>3.0.0</AssemblyVersion> <!--only update AssemblyVersion with major releases -->
<LangVersion>latest</LangVersion>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ It uses extensions to provide named placeholders, localization, pluralization, g
<AssemblyTitle>SmartFormat.Extensions.Newtonsoft.Json</AssemblyTitle>
<AssemblyName>SmartFormat.Extensions.Newtonsoft.Json</AssemblyName>
<PackageId>SmartFormat.Extensions.Newtonsoft.Json</PackageId>
<PackageReleaseNotes>See the change log for the main project at
https://github.com/axuno/SmartFormat/blob/main/CHANGES.md
<PackageReleaseNotes>Please see release notes on
https://github.com/axuno/SmartFormat/releases/
</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageLicenseFile></PackageLicenseFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ It uses extensions to provide named placeholders, localization, pluralization, g
<AssemblyTitle>SmartFormat.Extensions.System.Text.Json</AssemblyTitle>
<AssemblyName>SmartFormat.Extensions.System.Text.Json</AssemblyName>
<PackageId>SmartFormat.Extensions.System.Text.Json</PackageId>
<PackageReleaseNotes>See the change log for the main project at
https://github.com/axuno/SmartFormat/blob/main/CHANGES.md
<PackageReleaseNotes>Please see release notes on
https://github.com/axuno/SmartFormat/releases/
</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageLicenseFile></PackageLicenseFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ It uses extensions to provide named placeholders, localization, pluralization, g
<AssemblyTitle>SmartFormat.Extensions.Time</AssemblyTitle>
<AssemblyName>SmartFormat.Extensions.Time</AssemblyName>
<PackageId>SmartFormat.Extensions.Time</PackageId>
<PackageReleaseNotes>See the change log for the main project at
https://github.com/axuno/SmartFormat/blob/main/CHANGES.md
<PackageReleaseNotes>Please see release notes on
https://github.com/axuno/SmartFormat/releases/
</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageLicenseFile></PackageLicenseFile>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ It uses extensions to provide named placeholders, localization, pluralization, g
<AssemblyTitle>SmartFormat.Extensions.Xml</AssemblyTitle>
<AssemblyName>SmartFormat.Extensions.Xml</AssemblyName>
<PackageId>SmartFormat.Extensions.Xml</PackageId>
<PackageReleaseNotes>See the change log for the main project at
https://github.com/axuno/SmartFormat/blob/main/CHANGES.md
<PackageReleaseNotes>Please see release notes on
https://github.com/axuno/SmartFormat/releases/
</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageLicenseFile></PackageLicenseFile>
Expand Down
4 changes: 2 additions & 2 deletions src/SmartFormat.Net/SmartFormat.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ It uses extensions to provide named placeholders, localization, pluralization, g
<AssemblyOriginatorKeyFile>../SmartFormat/SmartFormat.snk</AssemblyOriginatorKeyFile>
<SignAssembly>true</SignAssembly>
<PackageId>SmartFormat.NET</PackageId>
<PackageReleaseNotes>See the change log for details of this release:
https://github.com/axuno/SmartFormat/blob/main/CHANGES.md
<PackageReleaseNotes>Please see release notes on
https://github.com/axuno/SmartFormat/releases/
</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageLicenseFile></PackageLicenseFile>
Expand Down
4 changes: 2 additions & 2 deletions src/SmartFormat/SmartFormat.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ It uses extensions to provide named placeholders, localization, pluralization, g
<AssemblyTitle>SmartFormat</AssemblyTitle>
<AssemblyName>SmartFormat</AssemblyName>
<PackageId>SmartFormat</PackageId>
<PackageReleaseNotes>See the change log for details of this release:
https://github.com/axuno/SmartFormat/blob/main/CHANGES.md
<PackageReleaseNotes>Please see release notes on
https://github.com/axuno/SmartFormat/releases/
</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageLicenseFile></PackageLicenseFile>
Expand Down

0 comments on commit a9b0fb3

Please sign in to comment.