Skip to content

Commit

Permalink
Remove @available around swift concurrency code
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Jan 7, 2022
1 parent 8b76a56 commit 6c84bbb
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.DS_Store
/.build
/.swiftpm
/.vscode
/Packages
/*.xcodeproj
xcuserdata/
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ let package = Package(
],
dependencies: [
.package(url: "https://github.com/apple/swift-crypto.git", .upToNextMajor(from: "1.0.0")),
.package(url: "https://github.com/soto-project/soto.git", .upToNextMajor(from: "5.10.0")),
.package(url: "https://github.com/soto-project/soto.git", .upToNextMajor(from: "5.12.0")),
.package(url: "https://github.com/vapor/jwt-kit.git", .upToNextMajor(from: "4.2.6")),
// for SRP
.package(url: "https://github.com/adam-fowler/big-num.git", .upToNextMajor(from: "2.0.0")),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import JWTKit
import NIO

/// Public interface functions for authenticating with CognitoIdentityProvider access and id tokens
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
public extension CognitoAuthenticatable {
// MARK: Async/Await Methods

Expand Down Expand Up @@ -65,7 +64,6 @@ public extension CognitoAuthenticatable {
}
}

@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
extension CognitoAuthenticatable {
/// load JSON web keys and create JWT signers from them
func loadSigners(region: Region, on eventLoop: EventLoop) async throws -> JWTSigners {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import NIO
@_exported import SotoCognitoIdentityProvider

/// Public interface functions for authenticating with CognitoIdentityProvider and generating access and id tokens.
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
extension CognitoAuthenticatable {
// MARK: Async/Await Methods

Expand Down Expand Up @@ -425,7 +424,6 @@ extension CognitoAuthenticatable {
}
}

@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
public extension CognitoAuthenticatable {
/// Return an authorization request future. This is an internal function and shouldn't need to be called
func initiateAuthRequest(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import NIO
import SotoCognitoIdentity

/// Public interface functions for authenticating with CognitoIdentityProvider and generating access and id tokens.
@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
extension CognitoIdentifiable {
// MARK: Async/Await Methods

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import Foundation
import NIO
import SotoCognitoAuthenticationKit

@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
public extension CognitoAuthenticatable {
// MARK: Secure Remote Password

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import SotoCognitoIdentityProvider
import SotoCore
import XCTest

@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
public func XCTRunAsyncAndBlock(_ closure: @escaping () async throws -> Void) {
let dg = DispatchGroup()
dg.enter()
Expand All @@ -39,7 +38,6 @@ public func XCTRunAsyncAndBlock(_ closure: @escaping () async throws -> Void) {
dg.wait()
}

@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
final class CognitoAsyncTests: XCTestCase {
static var middlewares: [AWSServiceMiddleware] {
ProcessInfo.processInfo.environment["CI"] == "true" ? [] : [AWSLoggingMiddleware()]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import SotoCognitoIdentityProvider
import SotoCore
import XCTest

@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
public func XCTRunAsyncAndBlock(_ closure: @escaping () async throws -> Void) {
let dg = DispatchGroup()
dg.enter()
Expand All @@ -39,7 +38,6 @@ public func XCTRunAsyncAndBlock(_ closure: @escaping () async throws -> Void) {
dg.wait()
}

@available(macOS 12.0, iOS 15.0, watchOS 8.0, tvOS 15.0, *)
final class CognitoSRPAsyncTests: XCTestCase {
static var middlewares: [AWSServiceMiddleware] {
ProcessInfo.processInfo.environment["CI"] == "true" ? [] : [AWSLoggingMiddleware()]
Expand Down

0 comments on commit 6c84bbb

Please sign in to comment.