Skip to content

Commit ff6cc3b

Browse files
chore: Removes unnecessary @available
1 parent f9bbe01 commit ff6cc3b

File tree

9 files changed

+0
-21
lines changed

9 files changed

+0
-21
lines changed

Sources/GraphQL/Map/AnyCoder.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ open class AnyEncoder {
4141
public static let prettyPrinted = OutputFormatting(rawValue: 1 << 0)
4242

4343
/// Produce Any with dictionary keys sorted in lexicographic order.
44-
@available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *)
4544
public static let sortedKeys = OutputFormatting(rawValue: 1 << 1)
4645
}
4746

@@ -57,7 +56,6 @@ open class AnyEncoder {
5756
case millisecondsSince1970
5857

5958
/// Encode the `Date` as an ISO-8601-formatted string (in RFC 3339 format).
60-
@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
6159
case iso8601
6260

6361
/// Encode the `Date` as a string formatted by the given formatter.
@@ -1103,7 +1101,6 @@ open class AnyDecoder {
11031101
case millisecondsSince1970
11041102

11051103
/// Decode the `Date` as an ISO-8601-formatted string (in RFC 3339 format).
1106-
@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
11071104
case iso8601
11081105

11091106
/// Decode the `Date` as a string parsed by the given formatter.
@@ -3258,7 +3255,6 @@ private struct _AnyKey: CodingKey {
32583255
//===----------------------------------------------------------------------===//
32593256

32603257
// NOTE: This value is implicitly lazy and _must_ be lazy. We're compiled against the latest SDK (w/ ISO8601DateFormatter), but linked against whichever Foundation the user has. ISO8601DateFormatter might not exist, so we better not hit this code path on an older OS.
3261-
@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
32623258
private var _iso8601Formatter: ISO8601DateFormatter = {
32633259
let formatter = ISO8601DateFormatter()
32643260
formatter.formatOptions = .withInternetDateTime

Sources/GraphQL/Map/GraphQLJSONEncoder.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ open class GraphQLJSONEncoder {
3939
public static let prettyPrinted = OutputFormatting(rawValue: 1 << 0)
4040

4141
/// Produce JSON with dictionary keys sorted in lexicographic order.
42-
@available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *)
4342
public static let sortedKeys = OutputFormatting(rawValue: 1 << 1)
4443

4544
/// By default slashes get escaped ("/" → "\/", "http://apple.com/" → "http:\/\/apple.com\/")
@@ -61,7 +60,6 @@ open class GraphQLJSONEncoder {
6160
case millisecondsSince1970
6261

6362
/// Encode the `Date` as an ISO-8601-formatted string (in RFC 3339 format).
64-
@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
6563
case iso8601
6664

6765
/// Encode the `Date` as a string formatted by the given formatter.
@@ -1298,7 +1296,6 @@ internal struct _JSONKey: CodingKey {
12981296
//===----------------------------------------------------------------------===//
12991297

13001298
// NOTE: This value is implicitly lazy and _must_ be lazy. We're compiled against the latest SDK (w/ ISO8601DateFormatter), but linked against whichever Foundation the user has. ISO8601DateFormatter might not exist, so we better not hit this code path on an older OS.
1301-
@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
13021299
private var _iso8601Formatter: ISO8601DateFormatter = {
13031300
let formatter = ISO8601DateFormatter()
13041301
formatter.formatOptions = .withInternetDateTime

Sources/GraphQL/Map/MapCoder.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ open class MapEncoder {
4949
public static let prettyPrinted = OutputFormatting(rawValue: 1 << 0)
5050

5151
/// Produce Map with dictionary keys sorted in lexicographic order.
52-
@available(macOS 10.13, iOS 11.0, watchOS 4.0, tvOS 11.0, *)
5352
public static let sortedKeys = OutputFormatting(rawValue: 1 << 1)
5453
}
5554

@@ -65,7 +64,6 @@ open class MapEncoder {
6564
case millisecondsSince1970
6665

6766
/// Encode the `Date` as an ISO-8601-formatted string (in RFC 3339 format).
68-
@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
6967
case iso8601
7068

7169
/// Encode the `Date` as a string formatted by the given formatter.
@@ -1111,7 +1109,6 @@ open class MapDecoder {
11111109
case millisecondsSince1970
11121110

11131111
/// Decode the `Date` as an ISO-8601-formatted string (in RFC 3339 format).
1114-
@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
11151112
case iso8601
11161113

11171114
/// Decode the `Date` as a string parsed by the given formatter.
@@ -3266,7 +3263,6 @@ private struct _MapKey: CodingKey {
32663263
//===----------------------------------------------------------------------===//
32673264

32683265
// NOTE: This value is implicitly lazy and _must_ be lazy. We're compiled against the latest SDK (w/ ISO8601DateFormatter), but linked against whichever Foundation the user has. ISO8601DateFormatter might not exist, so we better not hit this code path on an older OS.
3269-
@available(macOS 10.12, iOS 10.0, watchOS 3.0, tvOS 10.0, *)
32703266
private var _iso8601Formatter: ISO8601DateFormatter = {
32713267
let formatter = ISO8601DateFormatter()
32723268
formatter.formatOptions = .withInternetDateTime

Sources/GraphQL/Map/Number.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@ public struct Number: Sendable {
3535
storageType = .bool
3636
}
3737

38-
@available(OSX 10.5, *)
3938
public init(_ value: Int) {
4039
_number = NSNumber(value: value)
4140
storageType = .int
4241
}
4342

44-
@available(OSX 10.5, *)
4543
public init(_ value: UInt) {
4644
_number = NSNumber(value: value)
4745
storageType = .int
@@ -101,12 +99,10 @@ public struct Number: Sendable {
10199
return _number.boolValue
102100
}
103101

104-
@available(OSX 10.5, *)
105102
public var intValue: Int {
106103
return _number.intValue
107104
}
108105

109-
@available(OSX 10.5, *)
110106
public var uintValue: UInt {
111107
return _number.uintValue
112108
}

Sources/GraphQL/Subscription/EventStream.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ open class EventStream<Element> {
99
}
1010

1111
/// Event stream that wraps an `AsyncThrowingStream` from Swift's standard concurrency system.
12-
@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
1312
public class ConcurrentEventStream<Element>: EventStream<Element> {
1413
public let stream: AsyncThrowingStream<Element, Error>
1514

@@ -28,7 +27,6 @@ public class ConcurrentEventStream<Element>: EventStream<Element> {
2827
}
2928
}
3029

31-
@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
3230
extension AsyncThrowingStream {
3331
func mapStream<To>(_ closure: @escaping (Element) async throws -> To)
3432
-> AsyncThrowingStream<To, Error> {

Tests/GraphQLTests/HelloWorldTests/HelloWorldTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ class HelloWorldTests: XCTestCase {
4848
XCTAssertEqual(result, expected)
4949
}
5050

51-
@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
5251
func testHelloAsync() async throws {
5352
let query = "{ hello }"
5453
let expected = GraphQLResult(data: ["hello": "world"])

Tests/GraphQLTests/SubscriptionTests/SimplePubSub.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import GraphQL
22

33
/// A very simple publish/subscriber used for testing
4-
@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
54
class SimplePubSub<T> {
65
private var subscribers: [Subscriber<T>]
76

Tests/GraphQLTests/SubscriptionTests/SubscriptionSchema.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ let EmailQueryType = try! GraphQLObjectType(
8888

8989
// MARK: Test Helpers
9090

91-
@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
9291
class EmailDb {
9392
var emails: [Email]
9493
let publisher: SimplePubSub<Any>

Tests/GraphQLTests/SubscriptionTests/SubscriptionTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import GraphQL
22
import XCTest
33

44
/// This follows the graphql-js testing, with deviations where noted.
5-
@available(macOS 10.15, iOS 15, watchOS 8, tvOS 15, *)
65
class SubscriptionTests: XCTestCase {
76
let timeoutDuration = 0.5 // in seconds
87

0 commit comments

Comments
 (0)