Skip to content

Commit 8261d43

Browse files
committed
upgrade packages
1 parent 1aa325d commit 8261d43

16 files changed

+1391
-116
lines changed

.config/dotnet-tools.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
"version": 1,
33
"isRoot": true,
44
"tools": {
5-
"extLauncher": {
6-
"version": "1.0.0",
5+
"fantomas": {
6+
"version": "6.2.3",
77
"commands": [
8-
"extLauncher"
8+
"fantomas"
99
]
1010
},
11-
"fantomas": {
12-
"version": "6.1.1",
11+
"paket": {
12+
"version": "8.0.0",
1313
"commands": [
14-
"fantomas"
14+
"paket"
1515
]
1616
}
1717
}

.editorconfig

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,14 @@
1+
root = true
2+
3+
[paket.*]
4+
insert_final_newline = false
5+
16
[*.{fs,fsx}]
27
fsharp_multiline_bracket_style = stroustrup
38
fsharp_multi_line_lambda_closing_newline = true
4-
9+
fsharp_bar_before_discriminated_union_declaration = true
10+
fsharp_keep_max_number_of_blank_lines = 1
11+
fsharp_record_multiline_formatter = number_of_items
12+
fsharp_max_record_number_of_items = 1
13+
fsharp_array_or_list_multiline_formatter = number_of_items
14+
fsharp_max_array_or_list_number_of_items = 1

.paket/Paket.Restore.targets

Lines changed: 557 additions & 0 deletions
Large diffs are not rendered by default.

build.cmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@ECHO OFF
2+
3+
dotnet tool restore
4+
dotnet build -- %*

extLauncher.Tests/AppTests.fs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ let ``should not load a folder if no result`` () =
4747
[<Fact>]
4848
let ``refresh should synchronize files`` () =
4949
let newFolder =
50-
let loadFiles _ _ = [| FilePath "file1", FileName ""; FilePath "file3", FileName "" |]
50+
let loadFiles _ _ = [|
51+
FilePath "file1", FileName ""
52+
FilePath "file3", FileName ""
53+
|]
54+
5155
let save = id
5256

5357
{
@@ -68,7 +72,11 @@ let ``refresh should synchronize files`` () =
6872
[<Fact>]
6973
let ``refresh should keep triggers`` () =
7074
let newFolder =
71-
let loadFiles _ _ = [| FilePath "file1", FileName ""; FilePath "file2", FileName "" |]
75+
let loadFiles _ _ = [|
76+
FilePath "file1", FileName ""
77+
FilePath "file2", FileName ""
78+
|]
79+
7280
let save = id
7381

7482
{

extLauncher.Tests/ConsoleTests.fs

Lines changed: 109 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -81,67 +81,127 @@ let ``prompt should print choices`` () =
8181
let term = newTerminal keyReader lines
8282

8383
let _ =
84-
fun _ -> [| 1; 2; 3 |]
84+
fun _ -> [|
85+
1
86+
2
87+
3
88+
|]
8589
|> Console.prompt term PromptTitle (sprintf "%i") 5
8690

8791
List.ofSeq lines =! printedLines 5 3 1
8892

8993
[<Fact>]
9094
let ``prompt should go down`` () =
9195
let lines = ResizeArray()
92-
let keyReader = Queue [ downKey; escapeKey ]
96+
97+
let keyReader =
98+
Queue [
99+
downKey
100+
escapeKey
101+
]
102+
93103
let term = newTerminal keyReader lines
94104

95105
let _ =
96-
fun _ -> [| 1; 2; 3 |]
106+
fun _ -> [|
107+
1
108+
2
109+
3
110+
|]
97111
|> Console.prompt term PromptTitle (sprintf "%i") 5
98112

99113
List.ofSeq lines =! printedLines 5 3 2
100114

101115
[<Fact>]
102116
let ``prompt should go up`` () =
103117
let lines = ResizeArray()
104-
let keyReader = Queue [ downKey; upKey; escapeKey ]
118+
119+
let keyReader =
120+
Queue [
121+
downKey
122+
upKey
123+
escapeKey
124+
]
125+
105126
let term = newTerminal keyReader lines
106127

107128
let _ =
108-
fun _ -> [| 1; 2; 3 |]
129+
fun _ -> [|
130+
1
131+
2
132+
3
133+
|]
109134
|> Console.prompt term PromptTitle (sprintf "%i") 5
110135

111136
List.ofSeq lines =! printedLines 5 3 1
112137

113138
[<Fact>]
114139
let ``prompt should stay up`` () =
115140
let lines = ResizeArray()
116-
let keyReader = Queue [ upKey; upKey; escapeKey ]
141+
142+
let keyReader =
143+
Queue [
144+
upKey
145+
upKey
146+
escapeKey
147+
]
148+
117149
let term = newTerminal keyReader lines
118150

119151
let _ =
120-
fun _ -> [| 1; 2; 3 |]
152+
fun _ -> [|
153+
1
154+
2
155+
3
156+
|]
121157
|> Console.prompt term PromptTitle (sprintf "%i") 5
122158

123159
List.ofSeq lines =! printedLines 5 3 1
124160

125161
[<Fact>]
126162
let ``prompt should stay down`` () =
127163
let lines = ResizeArray()
128-
let keyReader = Queue [ downKey; downKey; downKey; downKey; downKey; escapeKey ]
164+
165+
let keyReader =
166+
Queue [
167+
downKey
168+
downKey
169+
downKey
170+
downKey
171+
downKey
172+
escapeKey
173+
]
174+
129175
let term = newTerminal keyReader lines
130176

131177
let _ =
132-
fun _ -> [| 1; 2; 3 |]
178+
fun _ -> [|
179+
1
180+
2
181+
3
182+
|]
133183
|> Console.prompt term PromptTitle (sprintf "%i") 5
134184

135185
List.ofSeq lines =! printedLines 5 3 3
136186

137187
[<Fact>]
138188
let ``prompt should choose the second choice and clear`` () =
139189
let lines = ResizeArray()
140-
let keyReader = Queue [ downKey; enterKey ]
190+
191+
let keyReader =
192+
Queue [
193+
downKey
194+
enterKey
195+
]
196+
141197
let term = newTerminal keyReader lines
142198

143199
let chosen =
144-
fun _ -> [| 1; 2; 3 |]
200+
fun _ -> [|
201+
1
202+
2
203+
3
204+
|]
145205
|> Console.prompt term PromptTitle (sprintf "%i") 5
146206

147207
chosen =! Some 2
@@ -157,16 +217,33 @@ let ``prompt should print error if no match`` () =
157217
fun _ -> Array.empty
158218
|> Console.prompt term PromptTitle (sprintf "%i") 1
159219

160-
List.ofSeq lines =! [ PrintedTitle; "No items match your search." ]
220+
List.ofSeq lines
221+
=! [
222+
PrintedTitle
223+
"No items match your search."
224+
]
161225

162226
[<Fact>]
163227
let ``prompt should print the search title`` () =
164228
let lines = ResizeArray()
165-
let keyReader = Queue [ aKey 't'; aKey 'e'; aKey 's'; aKey 't'; escapeKey ]
229+
230+
let keyReader =
231+
Queue [
232+
aKey 't'
233+
aKey 'e'
234+
aKey 's'
235+
aKey 't'
236+
escapeKey
237+
]
238+
166239
let term = newTerminal keyReader lines
167240

168241
let _ =
169-
fun _ -> [| 1; 2; 3 |]
242+
fun _ -> [|
243+
1
244+
2
245+
3
246+
|]
170247
|> Console.prompt term PromptTitle (sprintf "%i") 1
171248

172249
Seq.head lines =! $"%s{PrintedTitle}test"
@@ -176,12 +253,23 @@ let ``prompt should print the search chars supporting backspace`` () =
176253
let lines = ResizeArray()
177254

178255
let keyReader =
179-
Queue [ aKey 't'; aKey 'e'; backspaceKey; aKey 's'; aKey 't'; escapeKey ]
256+
Queue [
257+
aKey 't'
258+
aKey 'e'
259+
backspaceKey
260+
aKey 's'
261+
aKey 't'
262+
escapeKey
263+
]
180264

181265
let term = newTerminal keyReader lines
182266

183267
let _ =
184-
fun _ -> [| 1; 2; 3 |]
268+
fun _ -> [|
269+
1
270+
2
271+
3
272+
|]
185273
|> Console.prompt term PromptTitle (sprintf "%i") 1
186274

187275
Seq.head lines =! $"%s{PrintedTitle}tst"
@@ -196,7 +284,11 @@ let ``prompt should clear when exit`` () =
196284
let term = newTerminal keyReader lines
197285

198286
let _ =
199-
fun _ -> [| 1; 2; 3 |]
287+
fun _ -> [|
288+
1
289+
2
290+
3
291+
|]
200292
|> Console.prompt term PromptTitle (sprintf "%i") 5
201293

202294
Seq.forall ((=) "") lines =! true

extLauncher.Tests/DomainTests.fs

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,21 @@ let ``File with the same Path should be equal`` (file1: File) (file2: File) =
1111

1212
[<Property>]
1313
let ``File with different Path should not be equal`` (file1: File) (file2: File) =
14-
let file1 = {
15-
file1 with
16-
Path = Guid.NewGuid().ToString() |> FilePath
17-
}
14+
let file1 = { file1 with Path = Guid.NewGuid().ToString() |> FilePath }
1815

19-
let file2 = {
20-
file2 with
21-
Path = Guid.NewGuid().ToString() |> FilePath
22-
}
16+
let file2 = { file2 with Path = Guid.NewGuid().ToString() |> FilePath }
2317

2418
file1 <>! file2
2519

2620
[<Property>]
2721
let ``File with a higher trigger should precede in the sort order`` (file1: File) (file2: File) =
28-
let file1 = {
29-
file1 with
30-
Triggered = file2.Triggered + 1
31-
}
22+
let file1 = { file1 with Triggered = file2.Triggered + 1 }
3223

3324
compare file1 file2 =! -1
3425

3526
[<Property>]
3627
let ``File with a lower trigger should follow in the sort order`` (file1: File) (file2: File) =
37-
let file1 = {
38-
file1 with
39-
Triggered = file2.Triggered - 1
40-
}
28+
let file1 = { file1 with Triggered = file2.Triggered - 1 }
4129

4230
compare file1 file2 =! 1
4331

@@ -59,10 +47,7 @@ let ``File with the same trigger should be sorted alphabetically`` (file1: File)
5947

6048
[<Property>]
6149
let ``searchByName should search for the containing string ignoring case`` (file: File) (files: File array) =
62-
let file = {
63-
file with
64-
Name = FileName "Hello World"
65-
}
50+
let file = { file with Name = FileName "Hello World" }
6651

6752
let files = Array.insertAt 0 file files
6853
Helpers.searchByName files (fun f -> f.Name.value) "world" =! [| file |]
Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<Project Sdk="Microsoft.NET.Sdk">
2-
33
<PropertyGroup>
4-
<TargetFramework>net6.0</TargetFramework>
5-
4+
<TargetFramework>net8.0</TargetFramework>
65
<IsPackable>false</IsPackable>
76
<GenerateProgramFile>false</GenerateProgramFile>
7+
<WarningsAsErrors>FS0025</WarningsAsErrors>
8+
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
89
</PropertyGroup>
9-
1010
<ItemGroup>
11+
<None Include="paket.references" />
1112
<Compile Include="DomainTests.fs" />
1213
<Compile Include="AppTests.fs" />
1314
<Compile Include="ConsoleTests.fs" />
1415
<Compile Include="Program.fs" />
1516
</ItemGroup>
16-
17-
<ItemGroup>
18-
<PackageReference Include="FsCheck.Xunit" Version="2.16.5" />
19-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.0" />
20-
<PackageReference Include="Unquote" Version="6.1.0" />
21-
<PackageReference Include="xunit" Version="2.4.2" />
22-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5">
23-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
24-
<PrivateAssets>all</PrivateAssets>
25-
</PackageReference>
26-
<PackageReference Include="coverlet.collector" Version="6.0.0">
27-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
28-
<PrivateAssets>all</PrivateAssets>
29-
</PackageReference>
30-
</ItemGroup>
31-
3217
<ItemGroup>
3318
<ProjectReference Include="..\extLauncher\extLauncher.fsproj" />
3419
</ItemGroup>
35-
36-
</Project>
20+
<Import Project="..\.paket\Paket.Restore.targets" />
21+
</Project>

extLauncher.Tests/paket.references

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FsCheck.Xunit
2+
Microsoft.NET.Test.Sdk
3+
Unquote
4+
xunit
5+
xunit.runner.visualstudio
6+
coverlet.collector

extLauncher/App.fs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,7 @@ let refresh loadFiles save (folder: Folder) : Folder option =
3434
newFiles
3535
|> Array.map (fun newFile ->
3636
match currentFiles.TryFind newFile.Path with
37-
| Some current -> {
38-
newFile with
39-
Triggered = current.Triggered
40-
}
37+
| Some current -> { newFile with Triggered = current.Triggered }
4138
| None -> newFile
4239
)
4340
|> fun files -> { folder with Files = files }

0 commit comments

Comments
 (0)