Skip to content

Commit 0425539

Browse files
authored
Releasing 0.30.0 (#1381)
1 parent 4dfa243 commit 0425539

File tree

5 files changed

+120
-7
lines changed

5 files changed

+120
-7
lines changed

CHANGELOG.md

Lines changed: 112 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,114 @@
1-
# 0.29.2
1+
# 0.30.0
2+
## Breaking Changes
3+
The CSharpier dotnet tool no longer supports net6 & net7.
4+
## What's Changed
5+
### Support C# 13 & dotnet 9. [#1318](https://github.com/belav/csharpier/issues/1318)
6+
CSharpier now supports dotnet 9 along with formatting all C# 13 language features.
7+
### Inconsistent Formatting for new() Operator Compared to Explicit Object Constructors [#1364](https://github.com/belav/csharpier/issues/1364)
8+
Implicit and explicit object initialization with constructors was not formatted consistently
9+
```c#
10+
// input & expected output
11+
SomeObject someObject = new(
12+
someLongParameter___________________,
13+
someLongParameter___________________
14+
)
15+
{
16+
Property = longValue_______________________________________________________________________,
17+
};
18+
19+
SomeObject someObject = new SomeObject(
20+
someLongParameter___________________,
21+
someLongParameter___________________
22+
)
23+
{
24+
Property = longValue_______________________________________________________________________,
25+
};
26+
27+
// 0.29.2
28+
SomeObject someObject =
29+
new(someLongParameter___________________, someLongParameter___________________)
30+
{
31+
Property = longValue_______________________________________________________________________,
32+
};
33+
34+
SomeObject someObject = new SomeObject(
35+
someLongParameter___________________,
36+
someLongParameter___________________
37+
)
38+
{
39+
Property = longValue_______________________________________________________________________,
40+
};
41+
42+
```
43+
### Adds additional space before each member access in verbatim interpolated multiline string [#1358](https://github.com/belav/csharpier/issues/1358)
44+
When an interpolated verbatim string contained line breaks, the code within the interpolations would contain extra spaces.
45+
```c#
46+
// input & expected output
47+
var someStringWithLineBreakAndLongValue =
48+
$@"
49+
{someValue.GetValue().Name} someLongText________________________________________________________________";
50+
51+
// 0.29.2
52+
var someStringWithLineBreakAndLongValue =
53+
$@"
54+
{someValue .GetValue() .Name} someLongText________________________________________________________________";
55+
```
56+
57+
### Inserting trailing comma with trailing comment causes problems. [#1354](https://github.com/belav/csharpier/issues/1354)
58+
CSharpier would insert a trailing comma after a trailing comment and format the end result poorly.
59+
```c#
60+
// input
61+
var someObject = new SomeObject()
62+
{
63+
Property1 = 1,
64+
Property2 = 2 // Trailing Comment
65+
};
66+
67+
// 0.29.2
68+
var someObject = new SomeObject()
69+
{
70+
Property1 = 1,
71+
Property2 =
72+
2 // Trailing Comment
73+
,
74+
};
75+
76+
// 0.30.0
77+
var someObject = new SomeObject()
78+
{
79+
Property1 = 1,
80+
Property2 = 2, // Trailing Comment
81+
};
82+
```
83+
84+
### Double line break before collection expression in field [#1351](https://github.com/belav/csharpier/issues/1351)
85+
CSharpier was inserting an extra line break on a long field name followed by a collection expression to initialize it.
86+
```c#
87+
// input & expected output
88+
class ClassName
89+
{
90+
public SomeType[] LongName____________________________________________________________________________ =
91+
[
92+
someLongValue___________________________________________________,
93+
someLongValue___________________________________________________,
94+
];
95+
}
96+
97+
// 0.29.2
98+
class ClassName
99+
{
100+
public SomeType[] LongName____________________________________________________________________________ =
101+
102+
[
103+
someLongValue___________________________________________________,
104+
someLongValue___________________________________________________,
105+
];
106+
}
107+
108+
```
109+
110+
**Full Changelog**: https://github.com/belav/csharpier/compare/0.29.2...0.30.0
111+
# 0.29.2
2112
## What's Changed
3113
### Comments don't follow tabs indent style [#1343](https://github.com/belav/csharpier/issues/1343)
4114
Prior to `0.29.2` CSharpier was converting any tabs within the block of a multiline comment to spaces.
@@ -2653,3 +2763,4 @@ Thanks go to @pingzing
26532763
26542764
26552765
2766+

Nuget/Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project>
22
<PropertyGroup>
3-
<Version>0.29.2</Version>
3+
<Version>0.30.0</Version>
44
<PackageLicenseExpression>MIT</PackageLicenseExpression>
55
<RepositoryUrl>https://github.com/belav/csharpier</RepositoryUrl>
66
<RepositoryType>git</RepositoryType>

Src/Website/docs/Editors.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Use the [official plugin](https://plugins.jetbrains.com/plugin/18243-csharpier)
2222

2323
It can be installed via the Plugins dialog.
2424
### Neovim
25+
Use [conform.nvim](https://github.com/stevearc/conform.nvim)
26+
or
2527
Use [neoformat](https://github.com/sbdchd/neoformat)
2628

2729
### Emacs

Src/Website/docs/EditorsTroubleshooting.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ When the extension is unable to format files, it is generally a problem with bei
3434
- Change the dropdown to `CSharpier`
3535

3636
### Rider
37-
- Execute the action `Show Log in Explorer
37+
- Execute the action `Show Log in Explorer`
3838
- Look for lines that contain `#c.i.c.CSharpierLogger`
3939

4040
## Troubleshooting Steps
@@ -46,7 +46,7 @@ The following can help track down issues with the extension being unable to inst
4646
`C:\Users\[UserName]\AppData\Local\CSharpier\[CSharpierVersion]` or<br/>
4747
`$HOME/.cache/csharpier/[CSharpierVersion]`
4848
3. Assuming the directory above exists, attempt to run the following in that directory<br/>
49-
`dotnet-csharpier --version`
49+
`dotnet csharpier --version`
5050
4. If the installation appears to be corrupt, delete the directory and install CSharpier there yourself<br/>
5151
`dotnet tool install csharpier --version [CSharpierVersion] --tool-path [PathFromStep2]`
5252
5. Repeat step 3 to validate the install

Src/Website/docs/MsBuild.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ Valid options are:
5151
- Debug
5252

5353
### Target Frameworks
54-
CSharpier.MSBuild will be run with net6.0, net7.0 or net8.0 if the project targets one of the three frameworks. In cases where the project targets something else (net48, netstandard2.0) `CSharpier_FrameworkVersion` will default to net7.0
55-
This can be controlled with the following property. This property is required if the csproj is targeting < net6.0 (netstandard2.0, net48, etc) and net7.0 is not installed.
54+
CSharpier.MSBuild will be run with net8.0 or net9.0 if the project targets one of the three frameworks. In cases where the project targets something else (net48, netstandard2.0) `CSharpier_FrameworkVersion` will default to net8.0
55+
This can be controlled with the following property. This property is required if the csproj is targeting < net8.0 (netstandard2.0, net48, etc) and net8.0 is not installed.
5656
```xml
5757
<PropertyGroup>
58-
<CSharpier_FrameworkVersion>net6.0</CSharpier_FrameworkVersion>
58+
<CSharpier_FrameworkVersion>net8.0</CSharpier_FrameworkVersion>
5959
</PropertyGroup>
6060
```

0 commit comments

Comments
 (0)