Skip to content

Commit 2c93195

Browse files
mbrandonwJacksonUtschstephencelisJager-yoobarabashd
authored
Prerelease 1.0 (#1929)
* Converted voice memos back to identified array * update deps * update docs for DismissEffect * wip * Add Sendable conformance to PresentationState (#2086) * wip * swift-format * wip * wip * fix some warnings * docs * wip * wip * Catch some typos in Articles (#2088) * wip * wip * wip * wip * wip * wip * wip * wip * docs * wip * wip * docs * wip * wip * wip * wip * docs * docs * wip * wip * wip * wip * wip * wip * wip * Fix invalid states count for 3 optionals and typos (#2094) * wip * wip * more dismisseffect docs * fixed some references * navigation doc corrections * more nav docs * fix cancellation tests in release mode * wrap some tests in #if DEBUG since they are testing expected failures * update UUIDs in tests to use shorter initializer * fixed a todo * wip * fix merge errors * wip * fix * wip * wip * fixing a bunch of todos * get rid of rawvalue in StackElementID * more todos * NavLinkStore docs * fix swift 5.6 stuff * fix some standups tests * fix * clean up * docs fix * fixes * wip * 5.6 fix * wip * wip * dont parallelize tests * updated demo readmes * wip * Use ObservedObject instead of StateObject for alert/dialog modifiers. * integration tests for bad dismissal behavior * check for runtime warnings in every integration test * wip * wip * wip * fix * wip * wip * wip * wip * wip * wip * Drop a bunch of Hashables. * some nav bug fixes * wip * wip * wip * fix * fix * wip * wip * Simplify recording test. * add concurrent async test * fix * wip * Refact how detail dismisses itself. * fix * 5.6 fix * wip * wip * wip * wip * Add TestStore.assert. * Revert "Add TestStore.assert." This reverts commit a892ccc. * add Ukrainian Readme.md (#2121) * Add TestStore.assert. (#2123) * Add TestStore.assert. * wip * Update Sources/ComposableArchitecture/TestStore.swift Co-authored-by: Stephen Celis <[email protected]> * Update Sources/ComposableArchitecture/Documentation.docc/Extensions/TestStore.md Co-authored-by: Stephen Celis <[email protected]> * fix tests --------- Co-authored-by: Stephen Celis <[email protected]> * Run swift-format * push for store.finish and presentation * wip * move docs around * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * Add case subscripts * wip * wip * wip * 5.7-only * wip * wip * wip * wip * fix * revert store.finish task cancellation * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * add test for presentation scope * wip * wip * wip * wip * wip * cleanup * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * wip * Rename ReducerProtocol.swift to Reducer.swift (#2206) * Hard-deprecate old SwitchStore initializers/overloads * wip * wip * Resolve CaseStudies crash (#2258) * wip * wip * wip * wip * wip * wip * wip * wip * Bump timeout for CI * wip * wip --------- Co-authored-by: Jackson Utsch <[email protected]> Co-authored-by: Stephen Celis <[email protected]> Co-authored-by: 유재호 <[email protected]> Co-authored-by: Dmytro <[email protected]> Co-authored-by: mbrandonw <[email protected]>
1 parent bad761c commit 2c93195

File tree

263 files changed

+2417
-3483
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+2417
-3483
lines changed

Examples/CaseStudies/SwiftUICaseStudies/00-Core.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import ComposableArchitecture
22

3-
struct Root: ReducerProtocol {
3+
struct Root: Reducer {
44
struct State: Equatable {
55
var alertAndConfirmationDialog = AlertAndConfirmationDialog.State()
66
var animation = Animations.State()
@@ -62,7 +62,7 @@ struct Root: ReducerProtocol {
6262

6363
@Dependency(\.continuousClock) var clock
6464

65-
var body: some ReducerProtocol<State, Action> {
65+
var body: some Reducer<State, Action> {
6666
Reduce { state, action in
6767
switch action {
6868
case .onAppear:

Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-AlertsAndConfirmationDialogs.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ private let readMe = """
2121

2222
// MARK: - Feature domain
2323

24-
struct AlertAndConfirmationDialog: ReducerProtocol {
24+
struct AlertAndConfirmationDialog: Reducer {
2525
struct State: Equatable {
2626
var alert: AlertState<Action>?
2727
var confirmationDialog: ConfirmationDialogState<Action>?
@@ -37,7 +37,7 @@ struct AlertAndConfirmationDialog: ReducerProtocol {
3737
case incrementButtonTapped
3838
}
3939

40-
func reduce(into state: inout State, action: Action) -> EffectTask<Action> {
40+
func reduce(into state: inout State, action: Action) -> Effect<Action> {
4141
switch action {
4242
case .alertButtonTapped:
4343
state.alert = AlertState {

Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-Animations.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private let readMe = """
2020

2121
// MARK: - Feature domain
2222

23-
struct Animations: ReducerProtocol {
23+
struct Animations: Reducer {
2424
struct State: Equatable {
2525
var alert: AlertState<Action>?
2626
var circleCenter: CGPoint?
@@ -40,7 +40,7 @@ struct Animations: ReducerProtocol {
4040

4141
@Dependency(\.continuousClock) var clock
4242

43-
func reduce(into state: inout State, action: Action) -> EffectTask<Action> {
43+
func reduce(into state: inout State, action: Action) -> Effect<Action> {
4444
enum CancelID { case rainbow }
4545

4646
switch action {

Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-Bindings-Basics.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ private let readMe = """
2020

2121
// MARK: - Feature domain
2222

23-
struct BindingBasics: ReducerProtocol {
23+
struct BindingBasics: Reducer {
2424
struct State: Equatable {
2525
var sliderValue = 5.0
2626
var stepCount = 10
@@ -35,7 +35,7 @@ struct BindingBasics: ReducerProtocol {
3535
case toggleChanged(isOn: Bool)
3636
}
3737

38-
func reduce(into state: inout State, action: Action) -> EffectTask<Action> {
38+
func reduce(into state: inout State, action: Action) -> Effect<Action> {
3939
switch action {
4040
case let .sliderValueChanged(value):
4141
state.sliderValue = value

Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-Bindings-Forms.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ private let readMe = """
1515

1616
// MARK: - Feature domain
1717

18-
struct BindingForm: ReducerProtocol {
18+
struct BindingForm: Reducer {
1919
struct State: Equatable {
2020
@BindingState var sliderValue = 5.0
2121
@BindingState var stepCount = 10
@@ -28,7 +28,7 @@ struct BindingForm: ReducerProtocol {
2828
case resetButtonTapped
2929
}
3030

31-
var body: some ReducerProtocol<State, Action> {
31+
var body: some Reducer<State, Action> {
3232
BindingReducer()
3333
Reduce { state, action in
3434
switch action {

Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-Composition-TwoCounters.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ private let readMe = """
99

1010
// MARK: - Feature domain
1111

12-
struct TwoCounters: ReducerProtocol {
12+
struct TwoCounters: Reducer {
1313
struct State: Equatable {
1414
var counter1 = Counter.State()
1515
var counter2 = Counter.State()
@@ -20,7 +20,7 @@ struct TwoCounters: ReducerProtocol {
2020
case counter2(Counter.Action)
2121
}
2222

23-
var body: some ReducerProtocol<State, Action> {
23+
var body: some Reducer<State, Action> {
2424
Scope(state: \.counter1, action: /Action.counter1) {
2525
Counter()
2626
}

Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-Counter.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ private let readMe = """
1111

1212
// MARK: - Feature domain
1313

14-
struct Counter: ReducerProtocol {
14+
struct Counter: Reducer {
1515
struct State: Equatable {
1616
var count = 0
1717
}
@@ -21,7 +21,7 @@ struct Counter: ReducerProtocol {
2121
case incrementButtonTapped
2222
}
2323

24-
func reduce(into state: inout State, action: Action) -> EffectTask<Action> {
24+
func reduce(into state: inout State, action: Action) -> Effect<Action> {
2525
switch action {
2626
case .decrementButtonTapped:
2727
state.count -= 1

Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-FocusState.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ private let readMe = """
88

99
// MARK: - Feature domain
1010

11-
struct FocusDemo: ReducerProtocol {
11+
struct FocusDemo: Reducer {
1212
struct State: Equatable {
1313
@BindingState var focusedField: Field?
1414
@BindingState var password: String = ""
@@ -24,7 +24,7 @@ struct FocusDemo: ReducerProtocol {
2424
case signInButtonTapped
2525
}
2626

27-
var body: some ReducerProtocol<State, Action> {
27+
var body: some Reducer<State, Action> {
2828
BindingReducer()
2929
Reduce { state, action in
3030
switch action {

Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-OptionalState.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ private let readMe = """
1414

1515
// MARK: - Feature domain
1616

17-
struct OptionalBasics: ReducerProtocol {
17+
struct OptionalBasics: Reducer {
1818
struct State: Equatable {
1919
var optionalCounter: Counter.State?
2020
}
@@ -24,7 +24,7 @@ struct OptionalBasics: ReducerProtocol {
2424
case toggleCounterButtonTapped
2525
}
2626

27-
var body: some ReducerProtocol<State, Action> {
27+
var body: some Reducer<State, Action> {
2828
Reduce { state, action in
2929
switch action {
3030
case .toggleCounterButtonTapped:

Examples/CaseStudies/SwiftUICaseStudies/01-GettingStarted-SharedState.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ private let readMe = """
1616

1717
// MARK: - Feature domain
1818

19-
struct SharedState: ReducerProtocol {
19+
struct SharedState: Reducer {
2020
enum Tab { case counter, profile }
2121

2222
struct State: Equatable {
@@ -52,7 +52,7 @@ struct SharedState: ReducerProtocol {
5252
case selectTab(Tab)
5353
}
5454

55-
var body: some ReducerProtocol<State, Action> {
55+
var body: some Reducer<State, Action> {
5656
Scope(state: \.counter, action: /Action.counter) {
5757
Counter()
5858
}
@@ -72,7 +72,7 @@ struct SharedState: ReducerProtocol {
7272
}
7373
}
7474

75-
struct Counter: ReducerProtocol {
75+
struct Counter: Reducer {
7676
struct State: Equatable {
7777
var alert: AlertState<Action>?
7878
var count = 0
@@ -88,7 +88,7 @@ struct SharedState: ReducerProtocol {
8888
case isPrimeButtonTapped
8989
}
9090

91-
func reduce(into state: inout State, action: Action) -> EffectTask<Action> {
91+
func reduce(into state: inout State, action: Action) -> Effect<Action> {
9292
switch action {
9393
case .alertDismissed:
9494
state.alert = nil
@@ -119,7 +119,7 @@ struct SharedState: ReducerProtocol {
119119
}
120120
}
121121

122-
struct Profile: ReducerProtocol {
122+
struct Profile: Reducer {
123123
struct State: Equatable {
124124
private(set) var currentTab: Tab
125125
private(set) var count = 0
@@ -140,7 +140,7 @@ struct SharedState: ReducerProtocol {
140140
case resetCounterButtonTapped
141141
}
142142

143-
func reduce(into state: inout State, action: Action) -> EffectTask<Action> {
143+
func reduce(into state: inout State, action: Action) -> Effect<Action> {
144144
switch action {
145145
case .resetCounterButtonTapped:
146146
state.resetCount()

0 commit comments

Comments
 (0)