Skip to content

Commit 1d8a316

Browse files
committed
Merge branch 'main' into ah/firebaseai-503-trait
# Conflicts: # FirebaseAI/Tests/TestApp/Tests/Integration/SchemaTests.swift
2 parents b39a840 + b51d06b commit 1d8a316

File tree

10 files changed

+18
-20
lines changed

10 files changed

+18
-20
lines changed

FirebaseAI/Tests/TestApp/Tests/Integration/SchemaTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import VertexAITestApp
2525

2626
@testable import struct FirebaseAI.BackendError
2727

28-
@Suite(.serialized, .ignoreBackendOverloaded)
2928
/// Test the schema fields.
29+
@Suite(.serialized, .ignoreBackendOverloaded)
3030
struct SchemaTests {
3131
// Set temperature, topP and topK to lowest allowed values to make responses more deterministic.
3232
let generationConfig = GenerationConfig(temperature: 0.0, topP: 0.0, topK: 1)

FirebaseAuth/Sources/Swift/User/User.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,8 @@ extension User: NSSecureCoding {}
10811081
anonymous: Bool) async throws -> User {
10821082
guard let accessToken = accessToken,
10831083
let refreshToken = refreshToken else {
1084-
throw AuthErrorUtils.invalidUserTokenError(message: "Invalid user token: accessToken or refreshToken is nil")
1084+
throw AuthErrorUtils
1085+
.invalidUserTokenError(message: "Invalid user token: accessToken or refreshToken is nil")
10851086
}
10861087
let tokenService = SecureTokenService(withRequestConfiguration: auth.requestConfiguration,
10871088
accessToken: accessToken,

FirebaseAuth/Tests/SampleSwift/SwiftApiTests/GoogleTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,12 @@ class GoogleTests: TestsBase {
8484
return returnValue
8585
}
8686

87-
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
8887
/// Sends http request to Google OAuth2 token server to use refresh token to exchange for Google
8988
/// access token.
9089
/// Returns a dictionary that constains "access_token", "token_type", "expires_in" and sometimes
9190
/// the "id_token". (The id_token is not guaranteed to be returned during a refresh exchange;
9291
/// see https://openid.net/specs/openid-connect-core-1_0.html#RefreshTokenResponse)
92+
@available(iOS 13, tvOS 13, macOS 10.15, macCatalyst 13, watchOS 7, *)
9393
func getGoogleAccessTokenAsync() async throws -> [String: Any] {
9494
let googleOauth2TokenServerUrl = "https://www.googleapis.com/oauth2/v4/token"
9595
let bodyString = "client_id=\(Credentials.kGoogleClientID)&grant_type=refresh_token" +

FirebaseAuth/Tests/Unit/ActionCodeURLTests.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import XCTest
1818

1919
/// Unit tests for ActionCodeURL
2020
class ActionCodeURLTests: XCTestCase {
21-
2221
/// Tests parsing a valid URL with resetPassword mode.
2322
func testParseURL() {
2423
let urlString = "https://www.example.com?apiKey=API_KEY&mode=resetPassword&oobCode=OOB_CODE"

FirebaseFunctions/Sources/Callable+Codable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ public extension Callable where Request: Sendable, Response: Sendable {
282282
// `StreamResponseProtocol`, we know the `Response` generic argument
283283
// is `StreamResponse<_, _>`.
284284
let responseJSON = switch response {
285-
case .message(let json), .result(let json): json
285+
case let .message(json), let .result(json): json
286286
}
287287
let response = try decoder.decode(Response.self, from: responseJSON)
288288
if response is StreamResponseProtocol {

FirebaseFunctions/Sources/Functions.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ enum FunctionsConstants {
461461
options: HTTPSCallableOptions?,
462462
timeout: TimeInterval,
463463
context: FunctionsContext,
464-
completion: @escaping @MainActor (Result<HTTPSCallableResult, Error>) -> Void) {
464+
completion: @escaping @MainActor (Result<HTTPSCallableResult, Error>)
465+
-> Void) {
465466
let fetcher: GTMSessionFetcher
466467
do {
467468
fetcher = try makeFetcher(

FirebaseFunctions/Sources/HTTPSCallable.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ open class HTTPSCallable: NSObject {
7777
/// - completion: The block to call when the HTTPS request has completed.
7878
@objc(callWithObject:completion:) open func call(_ data: Any? = nil,
7979
completion: @escaping @MainActor (HTTPSCallableResult?,
80-
Error?) -> Void) {
80+
Error?)
81+
-> Void) {
8182
if #available(iOS 13, macCatalyst 13, macOS 10.15, tvOS 13, watchOS 7, *) {
8283
Task {
8384
do {

FirebaseStorage/Sources/StorageTask.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,20 @@ import Foundation
104104
/**
105105
* Prepares a task and begins execution.
106106
*/
107-
@objc func enqueue() -> Void
107+
@objc func enqueue()
108108

109109
/**
110110
* Pauses a task currently in progress.
111111
*/
112-
@objc optional func pause() -> Void
112+
@objc optional func pause()
113113

114114
/**
115115
* Cancels a task.
116116
*/
117-
@objc optional func cancel() -> Void
117+
@objc optional func cancel()
118118

119119
/**
120120
* Resumes a paused task.
121121
*/
122-
@objc optional func resume() -> Void
122+
@objc optional func resume()
123123
}

Mintfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nicklockwood/SwiftFormat@0.54.0
1+
nicklockwood/SwiftFormat@0.55.5

scripts/style.sh

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,14 +180,10 @@ s%^./%%
180180
needs_formatting=false
181181
for f in $files; do
182182
if [[ "${f: -6}" == '.swift' ]]; then
183-
if [[ "$system" == 'Darwin' ]]; then
184-
# Match output that says:
185-
# 1/1 files would have been formatted. (with --dryrun)
186-
# 1/1 files formatted. (without --dryrun)
187-
mint run swiftformat "${swift_options[@]}" "$f" 2>&1 | grep '^1/1 files' > /dev/null
188-
else
189-
false
190-
fi
183+
# Match output that says:
184+
# 1/1 files would have been formatted. (with --dryrun)
185+
# 1/1 files formatted. (without --dryrun)
186+
mint run swiftformat "${swift_options[@]}" "$f" 2>&1 | grep '^1/1 files' > /dev/null
191187
else
192188
"$clang_format_bin" "${clang_options[@]}" "$f" | grep "<replacement " > /dev/null
193189
fi

0 commit comments

Comments
 (0)