Skip to content

Commit 8d60150

Browse files
authored
Update to match FluentKit's declared version minimums (#761)
* Update to match FluentKit's declared version minimums
1 parent 892bfee commit 8d60150

13 files changed

+21
-23
lines changed

Package.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
// swift-tools-version:5.5
1+
// swift-tools-version:5.5.2
22
import PackageDescription
33

44
let package = Package(
55
name: "fluent",
66
platforms: [
7-
.macOS(.v10_15),
7+
.macOS(.v10_15),
8+
.iOS(.v13),
9+
.watchOS(.v6)
810
],
911
products: [
1012
.library(name: "Fluent", targets: ["Fluent"]),

Sources/Fluent/Concurrency/FluentProvider+Concurrency.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
#if compiler(>=5.5) && canImport(_Concurrency)
2-
import NIOCore
1+
32
import Vapor
3+
import FluentKit
44

5-
@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
65
extension Application {
76
/// Automatically runs forward migrations without confirmation.
87
/// This can be triggered by passing `--auto-migrate` flag.
@@ -20,5 +19,3 @@ extension Application {
2019
}.get()
2120
}
2221
}
23-
24-
#endif

Sources/Fluent/Concurrency/ModelCredentialsAuthenticatable+Concurrency.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#if compiler(>=5.5) && canImport(_Concurrency)
21
import NIOCore
32
import Vapor
43
import FluentKit
54

6-
@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
75
extension ModelCredentialsAuthenticatable {
86
public static func asyncCredentialsAuthenticator(
97
_ database: DatabaseID? = nil
@@ -12,7 +10,6 @@ extension ModelCredentialsAuthenticatable {
1210
}
1311
}
1412

15-
@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
1613
private struct AsyncModelCredentialsAuthenticator<User>: AsyncCredentialsAuthenticator
1714
where User: ModelCredentialsAuthenticatable
1815
{
@@ -29,6 +26,3 @@ private struct AsyncModelCredentialsAuthenticator<User>: AsyncCredentialsAuthent
2926
}
3027
}
3128
}
32-
33-
#endif
34-
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#if compiler(>=5.5) && canImport(_Concurrency)
21
import NIOCore
32
import Vapor
43
import FluentKit
54

6-
@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
75
extension QueryBuilder {
86
public func paginate(
97
for request: Request
@@ -12,5 +10,3 @@ extension QueryBuilder {
1210
return try await self.paginate(page)
1311
}
1412
}
15-
16-
#endif
Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
1-
#if compiler(>=5.5) && canImport(_Concurrency)
21
import NIOCore
32
import Vapor
43
import FluentKit
54

6-
@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
75
extension Model where Self: SessionAuthenticatable, Self.SessionID == Self.IDValue {
86
public static func asyncSessionAuthenticator(
97
_ databaseID: DatabaseID? = nil
@@ -12,7 +10,6 @@ extension Model where Self: SessionAuthenticatable, Self.SessionID == Self.IDVal
1210
}
1311
}
1412

15-
@available(macOS 12, iOS 15, watchOS 8, tvOS 15, *)
1613
private struct AsyncDatabaseSessionAuthenticator<User>: AsyncSessionAuthenticator
1714
where User: SessionAuthenticatable, User: Model, User.SessionID == User.IDValue
1815
{
@@ -24,6 +21,3 @@ private struct AsyncDatabaseSessionAuthenticator<User>: AsyncSessionAuthenticato
2421
}
2522
}
2623
}
27-
28-
#endif
29-

Sources/Fluent/Fluent+Cache.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import NIOCore
2+
import Foundation
13
import Vapor
24
import FluentKit
35

Sources/Fluent/Fluent+Paginate.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Vapor
2+
import NIOCore
23
import FluentKit
34

45
extension QueryBuilder {

Sources/Fluent/Fluent+Sessions.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import Foundation
2+
import NIOCore
13
import Vapor
24
import FluentKit
35

Sources/Fluent/FluentProvider.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import ConsoleKit
2+
import NIOCore
3+
import NIOPosix
4+
import Logging
15
import Vapor
26
import FluentKit
37

Sources/Fluent/MigrateCommand.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
import ConsoleKit
3+
import FluentKit
14
import Vapor
25

36
public final class MigrateCommand: Command {

0 commit comments

Comments
 (0)