Skip to content

Commit

Permalink
Merge pull request #4 from riiid/infra/update-TCA
Browse files Browse the repository at this point in the history
Update TCA to 0.45.0
  • Loading branch information
yermukhanbet authored Nov 3, 2022
2 parents ea8cbeb + b7ae2a8 commit eea29b9
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
21 changes: 15 additions & 6 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,17 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-case-paths",
"state" : {
"revision" : "7346701ea29da0a85d4403cf3d7a589a58ae3dee",
"version" : "0.9.2"
"revision" : "bb436421f57269fbcfe7360735985321585a86e5",
"version" : "0.10.1"
}
},
{
"identity" : "swift-clocks",
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-clocks",
"state" : {
"revision" : "692ec4f5429a667bdd968c7260dfa2b23adfeffc",
"version" : "0.1.4"
}
},
{
Expand All @@ -50,8 +59,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/swift-composable-architecture",
"state" : {
"revision" : "9ea8c763061287052a68d5e6723fed45e898b7d9",
"version" : "0.40.2"
"revision" : "1fcd53fc875bade47d850749ea53c324f74fd64d",
"version" : "0.45.0"
}
},
{
Expand All @@ -77,8 +86,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/pointfreeco/xctest-dynamic-overlay",
"state" : {
"revision" : "30314f1ece684dd60679d598a9b89107557b67d9",
"version" : "0.4.1"
"revision" : "16e6409ee82e1b81390bdffbf217b9c08ab32784",
"version" : "0.5.0"
}
}
],
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let package = Package(
targets: ["TCALogsSheetKit"]),
],
dependencies: [
.package(url: "https://github.com/pointfreeco/swift-composable-architecture", exact: "0.40.2"),
.package(url: "https://github.com/pointfreeco/swift-composable-architecture", exact: "0.45.0"),
.package(url: "https://github.com/riiid/LogsSheetKit", from: "1.0.0")
],
targets: [
Expand Down
2 changes: 1 addition & 1 deletion Sources/TCALogsSheetKit/Examples/CounterReducer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import ComposableArchitecture

struct CounterEnvironment { }

let counterReducer = Reducer<CounterState, CounterAction, CounterEnvironment> { state, action, _ in
let counterReducer = AnyReducer<CounterState, CounterAction, CounterEnvironment> { state, action, _ in
switch action {
case .increase:
state.count = state.count + 1
Expand Down
6 changes: 3 additions & 3 deletions Sources/TCALogsSheetKit/TCALogger.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ import Foundation
import ComposableArchitecture
import LogsSheetKit

extension Reducer {
extension AnyReducer {
/// Saves each action run through the reducer as the log message if debug build configuration is on
/// - Parameters:
/// - isDebug: is debug configuration on
public func log(isDebug: Bool) -> Self {
Reducer.init { state, action, environment in
AnyReducer.init { state, action, environment in
if isDebug {
LogsSheetManager.shared.log(message: "\(action)")
}
Expand All @@ -31,7 +31,7 @@ extension Reducer {
isDebug: Bool,
with message: @escaping ((Action) -> String)
) -> Self {
Reducer.init { state, action, environment in
AnyReducer.init { state, action, environment in
if isDebug {
LogsSheetManager.shared.log(message: message(action))
}
Expand Down

0 comments on commit eea29b9

Please sign in to comment.