Skip to content

Commit 60fb498

Browse files
authored
Bump to Swift 6.1 (#170)
1 parent d40da5e commit 60fb498

38 files changed

Lines changed: 112 additions & 74 deletions

.editorconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# EditorConfig is awesome: https://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
max_line_length = 120
11+
12+
[*.swift]
13+
indent_style = tab
14+
15+
[*.md]
16+
indent_style = space
17+
indent_size = 4

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
apple:
3535
if: github.event_name != 'pull_request' || !contains(github.event.pull_request.title, '[skip ci]')
3636
name: ${{ matrix.platform }} (Swift ${{ matrix.swift }})
37-
runs-on: macos-15
37+
runs-on: ${{ matrix.runner }}
3838
strategy:
3939
fail-fast: false
4040
matrix:
@@ -43,9 +43,16 @@ jobs:
4343
- mac-catalyst
4444
- tvOS
4545
swift:
46-
- "6.0"
4746
- "6.1"
4847
- "6.2"
48+
- "6.3"
49+
include:
50+
- swift: "6.1"
51+
runner: macos-15
52+
- swift: "6.2"
53+
runner: macos-26
54+
- swift: "6.3"
55+
runner: macos-26
4956
steps:
5057
- name: Git Checkout
5158
uses: actions/checkout@v5

.swift-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.0
1+
6.1

Examples/Demo/Demo/AppState.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ final class AppState: ObservableObject {
9292
func callAsFunction(
9393
duration: Duration,
9494
stiffness: Stiffness,
95-
damping: Damping
95+
damping: Damping,
9696
) -> AnyNavigationTransition.Animation? {
9797
switch self {
9898
case .none:

Examples/Demo/Demo/PageView.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ struct PageView<Content: View, Link: View, Destination: View>: View {
6060
.navigationBarItems(
6161
trailing: Button(action: { appState.isPresentingSettings = true }) {
6262
Image(systemName: "gearshape").font(.system(size: 16, weight: .semibold))
63-
}
63+
},
6464
)
6565
}
6666
}
@@ -72,15 +72,15 @@ extension PageView {
7272
color: Color,
7373
@ViewBuilder content: () -> Content,
7474
@ViewBuilder link: () -> Link,
75-
@ViewBuilder destination: () -> Destination = { EmptyView() }
75+
@ViewBuilder destination: () -> Destination = { EmptyView() },
7676
) {
7777
self.init(
7878
number: number,
7979
title: title,
8080
color: color,
8181
content: content(),
8282
link: link(),
83-
destination: destination()
83+
destination: destination(),
8484
)
8585
}
8686
}
@@ -90,15 +90,15 @@ extension PageView where Link == EmptyView, Destination == EmptyView {
9090
number: Int,
9191
title: String,
9292
color: Color,
93-
@ViewBuilder content: () -> Content
93+
@ViewBuilder content: () -> Content,
9494
) -> some View {
9595
Self(
9696
number: number,
9797
title: title,
9898
color: color,
9999
content: content(),
100100
link: nil,
101-
destination: nil
101+
destination: nil,
102102
)
103103
}
104104
}
@@ -113,7 +113,7 @@ extension View {
113113
/// - Note: Useful only when you don't need to reuse the closure.
114114
/// If you do, turn the closure into a proper modifier.
115115
public func modifier<ModifiedContent: View>(
116-
@ViewBuilder _ modifier: (Self) -> ModifiedContent
116+
@ViewBuilder _ modifier: (Self) -> ModifiedContent,
117117
) -> ModifiedContent {
118118
modifier(self)
119119
}

Examples/Demo/Demo/Pages.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ struct PageTwo: View {
4343
...
4444
}
4545
.navigationTransition(.slide)
46-
"""
46+
""",
4747
)
4848
}
4949

@@ -69,15 +69,15 @@ struct PageThree: View {
6969
.easeInOut(duration: 0.3)
7070
)
7171
)
72-
"""
72+
""",
7373
)
7474
Text("... and you can even **combine** them too:")
7575
Code(
7676
"""
7777
.navigationTransition(
7878
.slide.combined(with: .fade(.in))
7979
)
80-
"""
80+
""",
8181
)
8282
}
8383

Examples/Demo/Demo/RootView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct RootView: View {
3131
appState.animation(
3232
duration: appState.duration,
3333
stiffness: appState.stiffness,
34-
damping: appState.damping
34+
damping: appState.damping,
3535
)
3636
}
3737

Examples/Demo/Demo/SettingsView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct SettingsView: View {
3333
#endif
3434
.navigationBarItems(
3535
leading: Button("Shuffle", action: shuffle),
36-
trailing: Button(action: dismiss) { Text("Done").bold() }
36+
trailing: Button(action: dismiss) { Text("Done").bold() },
3737
)
3838
}
3939
.navigationViewStyle(.stack)
@@ -47,18 +47,18 @@ struct SettingsView: View {
4747
• Disabled.
4848
• Edge Pan: recognized from the edge of the screen only.
4949
• Pan: recognized anywhere on the screen! ✨
50-
"""
50+
""",
5151
)
5252
}
5353

5454
@ViewBuilder
5555
func picker<Selection: CaseIterable & Hashable & CustomStringConvertible>(
5656
_ label: String,
57-
_ selection: Binding<Selection>
57+
_ selection: Binding<Selection>,
5858
) -> some View where Selection.AllCases: RandomAccessCollection {
5959
Picker(
6060
selection: selection,
61-
label: Text(label)
61+
label: Text(label),
6262
) {
6363
ForEach(Selection.allCases, id: \.self) {
6464
Text($0.description).tag($0)

Examples/Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ import PackageDescription
55
let package = Package(
66
name: "Examples",
77
products: [],
8-
targets: []
8+
targets: [],
99
)

Package.resolved

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)