diff --git a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 7c5b7254b..997af3bc4 100644 --- a/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -30,8 +30,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/devicekit/DeviceKit", "state" : { - "revision" : "d37e70cb2646666dcf276d7d3d4a9760a41ff8a6", - "version" : "4.9.0" + "revision" : "691fe8112cca20ebf0020a1709d4e0205400311c", + "version" : "5.0.0" } }, { @@ -84,8 +84,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/onevcat/Kingfisher", "state" : { - "revision" : "44e891bdb61426a95e31492a67c7c0dfad1f87c5", - "version" : "7.4.1" + "revision" : "af4be924ad984cf4d16f4ae4df424e79a443d435", + "version" : "7.6.2" } }, { @@ -102,8 +102,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/matrix-org/matrix-analytics-events", "state" : { - "revision" : "94598bd8ef3aa2a3d3848c656c37d5e95b6b1cff", - "version" : "0.4.0" + "revision" : "2f5fa5f1e2f6c6ae1a47c33d953a3ce289167eb0", + "version" : "0.5.0" } }, { @@ -120,8 +120,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/PostHog/posthog-ios", "state" : { - "revision" : "d3177a24686ead147f5e4ff4d7e284ca4be33870", - "version" : "1.4.4" + "revision" : "5962d97f30dbe85f8591ee5ba64f671c6bf1770a", + "version" : "2.0.1" } }, { @@ -129,8 +129,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/getsentry/sentry-cocoa", "state" : { - "revision" : "2e7899aff930ed3b8d81be1909492f7684bbd481", - "version" : "8.3.1" + "revision" : "3fc79ea6ebcfd726e48bea1d98f89bc3a32d5cf2", + "version" : "8.3.2" } }, { @@ -163,10 +163,10 @@ { "identity" : "swift-snapshot-testing", "kind" : "remoteSourceControl", - "location" : "https://github.com/pointfreeco/swift-snapshot-testing.git", + "location" : "https://github.com/pointfreeco/swift-snapshot-testing", "state" : { - "revision" : "f29e2014f6230cf7d5138fc899da51c7f513d467", - "version" : "1.10.0" + "revision" : "cef5b3f6f11781dd4591bdd1dd0a3d22bd609334", + "version" : "1.11.0" } }, { @@ -192,8 +192,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/SwiftyBeaver/SwiftyBeaver", "state" : { - "revision" : "12b5acf96d98f91d50de447369bd18df74600f1a", - "version" : "1.9.6" + "revision" : "1080914828ef1c9ca9cd2bad50667b3d847dabff", + "version" : "2.0.0" } }, { diff --git a/ElementX/Sources/Other/Logging/MXLog.swift b/ElementX/Sources/Other/Logging/MXLog.swift index 9a7445b59..bbc015e60 100644 --- a/ElementX/Sources/Other/Logging/MXLog.swift +++ b/ElementX/Sources/Other/Logging/MXLog.swift @@ -71,7 +71,7 @@ public class MXLog: NSObject { function: String = #function, line: Int = #line, context: Any? = nil) { - logger.verbose(message(), file, function, line: line, context: context) + logger.verbose(message(), file: file, function: function, line: line, context: context) } public static func debug(_ message: @autoclosure () -> Any, @@ -79,7 +79,7 @@ public class MXLog: NSObject { function: String = #function, line: Int = #line, context: Any? = nil) { - logger.debug(message(), file, function, line: line, context: context) + logger.debug(message(), file: file, function: function, line: line, context: context) } public static func info(_ message: @autoclosure () -> Any, @@ -87,7 +87,7 @@ public class MXLog: NSObject { function: String = #function, line: Int = #line, context: Any? = nil) { - logger.info(message(), file, function, line: line, context: context) + logger.info(message(), file: file, function: function, line: line, context: context) } public static func warning(_ message: @autoclosure () -> Any, @@ -95,7 +95,7 @@ public class MXLog: NSObject { function: String = #function, line: Int = #line, context: Any? = nil) { - logger.warning(message(), file, function, line: line, context: context) + logger.warning(message(), file: file, function: function, line: line, context: context) } /// Log error with additional details @@ -108,7 +108,7 @@ public class MXLog: NSObject { function: String = #function, line: Int = #line, context: Any? = nil) { - logger.error(message(), file, function, line: line, context: context) + logger.error(message(), file: file, function: function, line: line, context: context) } /// Log failure with additional details @@ -124,7 +124,7 @@ public class MXLog: NSObject { function: String = #function, line: Int = #line, context: Any? = nil) { - logger.error(message, file, function, line: line, context: context) + logger.error(message, file: file, function: function, line: line, context: context) #if DEBUG assertionFailure("\(message)") #endif diff --git a/ElementX/SupportingFiles/target.yml b/ElementX/SupportingFiles/target.yml index d8c618896..d677e7d55 100644 --- a/ElementX/SupportingFiles/target.yml +++ b/ElementX/SupportingFiles/target.yml @@ -96,7 +96,7 @@ targets: if which sourcery >/dev/null; then sourcery --config Tools/Sourcery/sourcery_automockable_config.yml else - echo "warning: Sourcert not installed, run swift run tools setup-project" + echo "warning: Sourcery not installed, run swift run tools setup-project" fi postBuildScripts: diff --git a/Package.resolved b/Package.resolved index 87218ce45..627f170ab 100644 --- a/Package.resolved +++ b/Package.resolved @@ -5,17 +5,17 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/apple/swift-argument-parser", "state" : { - "revision" : "fddd1c00396eed152c45a46bea9f47b98e59301d", - "version" : "1.2.0" + "revision" : "fee6933f37fde9a5e12a1e4aeaa93fe60116ff2a", + "version" : "1.2.2" } }, { "identity" : "yams", "kind" : "remoteSourceControl", - "location" : "https://github.com/jpsim/Yams.git", + "location" : "https://github.com/jpsim/Yams", "state" : { - "revision" : "01835dc202670b5bb90d07f3eae41867e9ed29f6", - "version" : "5.0.1" + "revision" : "f47ba4838c30dbd59998a4e4c87ab620ff959e8a", + "version" : "5.0.5" } } ], diff --git a/Package.swift b/Package.swift index 2d84e0b29..90005dcbb 100644 --- a/Package.swift +++ b/Package.swift @@ -12,14 +12,14 @@ let package = Package( .executable(name: "tools", targets: ["Tools"]) ], dependencies: [ - .package(url: "https://github.com/apple/swift-argument-parser", from: "1.2.0"), - .package(url: "https://github.com/jpsim/Yams", from: "5.0.1") + .package(url: "https://github.com/apple/swift-argument-parser", .upToNextMinor(from: "1.2.0")), + .package(url: "https://github.com/jpsim/Yams", .upToNextMinor(from: "5.0.0")) ], targets: [ .executableTarget(name: "Tools", dependencies: [ - .product(name: "ArgumentParser", package: "swift-argument-parser"), - .product(name: "Yams", package: "Yams") + .product(name: "ArgumentParser", package: "swift-argument-parser"), + .product(name: "Yams", package: "Yams") ], path: "Tools/Sources") ] diff --git a/Tools/Sources/OutdatedPackages.swift b/Tools/Sources/OutdatedPackages.swift new file mode 100644 index 000000000..f882f111a --- /dev/null +++ b/Tools/Sources/OutdatedPackages.swift @@ -0,0 +1,23 @@ +import ArgumentParser +import Foundation + +struct OutdatedPackages: ParsableCommand { + static var configuration = CommandConfiguration(abstract: "A tool to check outdated package dependencies. Please make sure you have already run setup-project before using this tool.") + + private var projectSwiftPMDirectoryURL: URL { Utilities.projectDirectoryURL.appending(path: "ElementX.xcodeproj/project.xcworkspace/xcshareddata/swiftpm") } + + func run() throws { + try checkToolsDependencies() + try checkProjectDependencies() + } + + func checkToolsDependencies() throws { + guard let output = try Utilities.zsh("swift outdated"), !output.isEmpty else { return } + print("outdated tools Swift packages:\n\(output)") + } + + func checkProjectDependencies() throws { + guard let output = try Utilities.zsh("swift outdated", workingDirectoryURL: projectSwiftPMDirectoryURL), !output.isEmpty else { return } + print("outdated project Swift packages:\n\(output)") + } +} diff --git a/Tools/Sources/SetupProject.swift b/Tools/Sources/SetupProject.swift index 2c33b2e0b..88caecd59 100644 --- a/Tools/Sources/SetupProject.swift +++ b/Tools/Sources/SetupProject.swift @@ -15,7 +15,7 @@ struct SetupProject: ParsableCommand { } func brewBundleInstall() throws { - try Utilities.zsh("brew install xcodegen swiftgen swiftlint swiftformat git-lfs sourcery") + try Utilities.zsh("brew install xcodegen swiftgen swiftlint swiftformat git-lfs sourcery kiliankoe/formulae/swift-outdated") } func xcodegen() throws { diff --git a/Tools/Sources/Tools.swift b/Tools/Sources/Tools.swift index 522272363..d9ad51f10 100644 --- a/Tools/Sources/Tools.swift +++ b/Tools/Sources/Tools.swift @@ -5,5 +5,6 @@ import Foundation struct Tools: ParsableCommand { static var configuration = CommandConfiguration(abstract: "A collection of command line tools for ElementX", subcommands: [BuildSDK.self, - SetupProject.self]) + SetupProject.self, + OutdatedPackages.self]) } diff --git a/changelog.d/pr-721.change b/changelog.d/pr-721.change new file mode 100644 index 000000000..5a33e4a7e --- /dev/null +++ b/changelog.d/pr-721.change @@ -0,0 +1 @@ +Updated dependencies, and added a tool to check for outdated ones. \ No newline at end of file diff --git a/project.yml b/project.yml index 79c396e14..4a6379ccb 100644 --- a/project.yml +++ b/project.yml @@ -52,52 +52,52 @@ packages: # path: ../compound-ios Algorithms: url: https://github.com/apple/swift-algorithms - majorVersion: 1.0.0 + minorVersion: 1.0.0 AnalyticsEvents: url: https://github.com/matrix-org/matrix-analytics-events - exactVersion: 0.4.0 + minorVersion: 0.5.0 AppAuth: url: https://github.com/openid/AppAuth-iOS - majorVersion: 1.5.0 + minorVersion: 1.6.0 Collections: url: https://github.com/apple/swift-collections - majorVersion: 1.0.4 + minorVersion: 1.0.0 DeviceKit: url: https://github.com/devicekit/DeviceKit - majorVersion: 4.7.0 + minorVersion: 5.0.0 DTCoreText: url: https://github.com/Cocoanetics/DTCoreText - majorVersion: 1.6.26 + exactVersion: 1.6.26 KeychainAccess: url: https://github.com/kishikawakatsumi/KeychainAccess - majorVersion: 4.2.2 + minorVersion: 4.2.0 Kingfisher: url: https://github.com/onevcat/Kingfisher - majorVersion: 7.2.0 + minorVersion: 7.6.0 KZFileWatchers: url: https://github.com/krzysztofzablocki/KZFileWatchers branch: master Introspect: url: https://github.com/siteline/SwiftUI-Introspect - majorVersion: 0.2.3 + minorVersion: 0.2.0 PostHog: url: https://github.com/PostHog/posthog-ios - majorVersion: 1.4.4 + minorVersion: 2.0.0 SwiftyBeaver: url: https://github.com/SwiftyBeaver/SwiftyBeaver - majorVersion: 1.9.5 + minorVersion: 2.0.0 SwiftState: url: https://github.com/ReactKit/SwiftState - majorVersion: 6.0.0 + minorVersion: 6.0.0 GZIP: url: https://github.com/nicklockwood/GZIP - majorVersion: 1.3.0 + minorVersion: 1.3.0 Sentry: url: https://github.com/getsentry/sentry-cocoa - majorVersion: 8.3.1 + minorVersion: 8.3.0 SnapshotTesting: url: https://github.com/pointfreeco/swift-snapshot-testing - majorVersion: 1.10.0 + minorVersion: 1.11.0 Version: url: https://github.com/mxcl/Version - majorVersion: 2.0.1 + minorVersion: 2.0.0