From 8d0cdc8c2f0bea3406a82c502e0044ab003011bd Mon Sep 17 00:00:00 2001 From: Bela VanderVoort Date: Sat, 12 Jun 2021 13:10:19 -0500 Subject: [PATCH] Bump up version number and update readme (#289) * Bump up version number and update readme * Cleaning up some unneeded code * Fixing typo --- CHANGELOG.md | 16 ++++++++++++++ CSharpier.Build.props | 2 +- Docs/CLI.md | 22 +++++++++++++++++++ Scripts/ChangeLog.ps1 | 11 ++++++++-- Scripts/CreateReviewCodePRs.ps1 | 2 ++ .../ClientApp/src/Header.tsx | 2 +- Src/CSharpier/Program.cs | 8 ------- 7 files changed, 51 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e82118b7..96e142cf2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,19 @@ +# 0.9.6 + +[diff](https://github.com/belav/csharpier/compare/0.9.5...0.9.6) + +- Add options to write the formatted file to stdout and accept a file from stdin [#282](https://github.com/belav/csharpier/issues/282) +- Implement ConditionalGroup doc type [#278](https://github.com/belav/csharpier/issues/278) +- Optimize some hot paths to speed up formatting. [#277](https://github.com/belav/csharpier/issues/277) +- Implement Align Doc Type [#276](https://github.com/belav/csharpier/issues/276) +- Improve formatting of ClassDeclaration with BaseList + Constraints [#275](https://github.com/belav/csharpier/issues/275) +- Switch tests to width 100 so they line up with default option [#256](https://github.com/belav/csharpier/issues/256) +- Improving formatting of generics + variable declarations. [#240](https://github.com/belav/csharpier/pull/240) +- Improve Forrmatting of Field with lambda and generics [#236](https://github.com/belav/csharpier/issues/236) +- Improve Formatting of object initialiser syntax [#234](https://github.com/belav/csharpier/issues/234) +- Improve formatting of generic methods and constructors [#94](https://github.com/belav/csharpier/issues/94) +- Improve formatting of field with generics [#47](https://github.com/belav/csharpier/issues/47) +______ # 0.9.5 [diff](https://github.com/belav/csharpier/compare/0.9.4...0.9.5) diff --git a/CSharpier.Build.props b/CSharpier.Build.props index 838c64ba8..d7fe49a05 100644 --- a/CSharpier.Build.props +++ b/CSharpier.Build.props @@ -1,6 +1,6 @@ - 0.9.5 + 0.9.6 MIT https://github.com/belav/csharpier git diff --git a/Docs/CLI.md b/Docs/CLI.md index a893524c2..b0e642a21 100644 --- a/Docs/CLI.md +++ b/Docs/CLI.md @@ -11,6 +11,7 @@ Options: --check Check that files are formatted. Will not write any changes. --fast Skip comparing syntax tree of formatted file to original file to validate changes. --skip-write Skip writing changes. Generally used for testing to ensure csharpier doesn't throw any errors or cause syntax tree validation failures. + --write-stdout Write the results of formatting any files to stdout. --version Show version information -?, -h, --help Show help and usage information @@ -54,4 +55,25 @@ An example of CSharpier finding a file that failed validation. } if (prefix.Span[^1] is not ':') +``` + +### --write-stdout +By default CSharpier will format files in place. This option allows you to write the formatting results to stdout. + +If you pipe input to CSharpier it will also write the formatting results to stdout. + +*TestFile.cs* +```c# +public class ClassName +{ + public string Field; +} +``` +*shell* +```bash +$ cat TestFile.cs | dotnet csharpier +public class ClassName +{ + public string Field; +} ``` \ No newline at end of file diff --git a/Scripts/ChangeLog.ps1 b/Scripts/ChangeLog.ps1 index f6b08b2e3..fc697ac79 100644 --- a/Scripts/ChangeLog.ps1 +++ b/Scripts/ChangeLog.ps1 @@ -1,8 +1,15 @@ # this uses https://github.com/microsoft/PowerShellForGitHub # you'll need to Set-GitHubAuthentication first -$versionNumber = "0.9.5" -$previousVersionNumber = "0.9.4" +param ( + [string]$previousVersionNumber, + [string]$versionNumber +) + +if ($versionNumber -eq "" -or $previousVersionNumber -eq "") { + Write-Output "Supply version numbers" + exit 1; +} $repository = "https://github.com/belav/csharpier" diff --git a/Scripts/CreateReviewCodePRs.ps1 b/Scripts/CreateReviewCodePRs.ps1 index d23bdbca0..c92d925f8 100644 --- a/Scripts/CreateReviewCodePRs.ps1 +++ b/Scripts/CreateReviewCodePRs.ps1 @@ -6,6 +6,8 @@ param ( [string]$version ) +# TODO this could format from the root folder, so that it is easy to see if anything failed, but do all the git stuff in the repo specific folders. + # aspnetcore # AspNetWebStack # AutoMapper diff --git a/Src/CSharpier.Playground/ClientApp/src/Header.tsx b/Src/CSharpier.Playground/ClientApp/src/Header.tsx index ad16a06ab..c63b3f834 100644 --- a/Src/CSharpier.Playground/ClientApp/src/Header.tsx +++ b/Src/CSharpier.Playground/ClientApp/src/Header.tsx @@ -31,7 +31,7 @@ export const Header = () => { - Copy Left + Copy Left