From 3a75ad6095b9883ff7c24a2360904d8b2bfa0dd5 Mon Sep 17 00:00:00 2001 From: IvanStepanok Date: Thu, 14 Nov 2024 11:24:55 +0200 Subject: [PATCH] update to swift6 --- Package.resolved | 10 +++++----- Package.swift | 4 ++-- Sources/OEXFoundation/Network/API.swift | 4 ++-- .../OEXFoundation/Network/HeadersRedirectHandler.swift | 2 +- Sources/OEXFoundation/Network/NetworkLogger.swift | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Package.resolved b/Package.resolved index 0570d1e..47d3dac 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,13 +1,13 @@ { - "originHash" : "5e69a65bc13b6866cc012a28d126dae3f03ac53e850f32034103be9b5d345cad", + "originHash" : "ee6d6be087c1c8e2ed6684d6a4f831d394852582ea94dc76e1bf4efa9f1768b8", "pins" : [ { "identity" : "alamofire", "kind" : "remoteSourceControl", "location" : "https://github.com/Alamofire/Alamofire.git", "state" : { - "revision" : "b2fa556e4e48cbf06cf8c63def138c98f4b811fa", - "version" : "5.8.0" + "revision" : "e16d3481f5ed35f0472cb93350085853d754913f", + "version" : "5.10.1" } }, { @@ -15,8 +15,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/onevcat/Kingfisher.git", "state" : { - "revision" : "b6f62758f21a8c03cd64f4009c037cfa580a256e", - "version" : "7.9.1" + "revision" : "c0940e241945e6378c01fbd45fd3815579d47ef5", + "version" : "8.1.0" } }, { diff --git a/Package.swift b/Package.swift index ffc473d..7a51c2b 100644 --- a/Package.swift +++ b/Package.swift @@ -17,8 +17,8 @@ let package = Package( ) ], dependencies: [ - .package(url: "https://github.com/Alamofire/Alamofire.git", exact: "5.8.0"), - .package(url: "https://github.com/onevcat/Kingfisher.git", exact: "7.9.1"), + .package(url: "https://github.com/Alamofire/Alamofire.git", exact: "5.10.1"), + .package(url: "https://github.com/onevcat/Kingfisher.git", exact: "8.1.0"), .package(url: "https://github.com/siteline/swiftui-introspect", from: "1.3.0"), .package(url: "https://github.com/Swinject/Swinject.git", from: "2.9.1"), .package(url: "https://github.com/SimplyDanny/SwiftLintPlugins", from: "0.57.0") diff --git a/Sources/OEXFoundation/Network/API.swift b/Sources/OEXFoundation/Network/API.swift index 4fd7bbe..451a31a 100644 --- a/Sources/OEXFoundation/Network/API.swift +++ b/Sources/OEXFoundation/Network/API.swift @@ -262,12 +262,12 @@ public struct CustomGetEncoding: ParameterEncoding { } extension Encodable { - func asDictionary() throws -> [String: Any] { + func asDictionary() throws -> [String: any Any & Sendable] { let data = try JSONEncoder().encode(self) guard let dictionary = try JSONSerialization.jsonObject( with: data, options: .fragmentsAllowed - ) as? [String: Any] else { + ) as? [String: any Any & Sendable] else { throw NSError( domain: "com.oexfoundation.error", code: 1, diff --git a/Sources/OEXFoundation/Network/HeadersRedirectHandler.swift b/Sources/OEXFoundation/Network/HeadersRedirectHandler.swift index 3653392..dc9a708 100644 --- a/Sources/OEXFoundation/Network/HeadersRedirectHandler.swift +++ b/Sources/OEXFoundation/Network/HeadersRedirectHandler.swift @@ -8,7 +8,7 @@ import Foundation import Alamofire -public class HeadersRedirectHandler: RedirectHandler { +public final class HeadersRedirectHandler: RedirectHandler { public init() { } diff --git a/Sources/OEXFoundation/Network/NetworkLogger.swift b/Sources/OEXFoundation/Network/NetworkLogger.swift index 7335be2..5b56eec 100644 --- a/Sources/OEXFoundation/Network/NetworkLogger.swift +++ b/Sources/OEXFoundation/Network/NetworkLogger.swift @@ -8,7 +8,7 @@ import Alamofire import Foundation -public class NetworkLogger: EventMonitor { +public final class NetworkLogger: EventMonitor { public let queue = DispatchQueue(label: "com.raccoongang.networklogger")