Skip to content

Releases: pointfreeco/swift-composable-architecture

0.16.0

08 Mar 16:12
a116fff
Compare
Choose a tag to compare
  • Changed: Reducer.optional reducers no longer trigger assertionFailures. Instead, by default they set a breakpoint that can be resumed in DEBUG mode. This breakpoint can be disabled with an argument. RELEASE builds remain unaffected. (#296)
  • Changed: Test Stores now collocate unfinished effect failures with the originating action that kicked each effect off. These failures were previously aggregated to the unrelated line in which store.assert was called. (#413)
  • Infrastructure: Improved documentation (thanks @Steven0351).

0.15.0

22 Feb 20:39
Compare
Choose a tag to compare
  • Added: A new ViewStore.send(_:animation:) helper for SwiftUI, which wraps an action in a withAnimation block.
  • Added: TestStore steps can now group a series of steps together into a single .sequence step.

0.14.0

05 Feb 19:09
0fb6c9b
Compare
Choose a tag to compare
  • Changed: FormAction and Reducer.form have been renamed to BindingAction and Reducer.binding based on community feedback and the more general, non-form-based use cases. Migration path: FormAction and Reducer.form have been deprecated and Xcode can automatically migrate them to their newer names.

    // before:
    
    enum SettingsAction {
      case form(FormAction<SettingsState>)
    }
    
    let settingsReducer = Reducer<
      SettingsState, SettingsAction, SettingsEnvironment
    > { state, action, environment in
      switch action {
      ...
      case .form:
        return .none
      }
    }
    . form(action: /SettingsAction.form)
    
    TextField(
      "Display name",
      text: viewStore.binding(keyPath: \.displayName, send: SettingsAction.form)
    )
    
    // after:
    
    enum SettingsAction {
      case binding(BindingAction<SettingsState>)
    }
    
    let settingsReducer = Reducer<
      SettingsState, SettingsAction, SettingsEnvironment
    > { state, action, environment in
      switch action {
      ...
      case .binding:
        return .none
      }
    }
    .binding(action: /SettingsAction.binding)
    
    TextField(
      "Display name",
      text: viewStore.binding(keyPath: \.displayName, send: SettingsAction.binding)
    )

0.13.0

01 Feb 20:01
e51fb00
Compare
Choose a tag to compare

Quick turnaround for this release. Should have waited for Xcode 12.5 to download 😅

  • Changed: replacing an identified array's element with one that has a mismatched id will now fatal error in debug builds.
  • Fixed: worked around a Xcode 12.5 beta compilation error.
  • Infrastructure: fleshed out Store.scope documentation.

0.12.0

01 Feb 18:43
ff57565
Compare
Choose a tag to compare
  • Added: First-class forms support via FormAction and Reducer.form().
  • Fixed: Re-publicized AlertState.Button.type.

0.11.0

21 Jan 23:13
Compare
Choose a tag to compare
  • Added: TextState, a testable, equatable description of SwiftUI Text. Useful for when you want to store dynamic, stylized text in your app's state.
  • Changed: AlertState and ActionSheetState now use TextState under the hood.
  • Fixed: worked around a bug affecting iOS 13.0-13.2 that prevented state changes from being reflected in the view (thanks @nsillik).
  • Fixed: AlertState and ActionSheetState can once again be used with verbatim strings (thanks @ohitsdaniel).
  • Deprecated: AlertState and ActionSheetState initializers that take LocalizedStringKey. Migration path: use the initializers that take explicit TextState instead (which can be initialized with both LocalizedStringKey and verbatim Strings).

0.10.0

12 Jan 15:20
6d4c40d
Compare
Choose a tag to compare
  • Added: WithViewStore now conforms to Scene and can be used in App.body content.
  • Changed: Store.scope's less commonly used overload that transforms publishers of Stores has been deprecated and renamed to publisherScope.
  • Fixed: a few Test Store failure messages were reporting the wrong debug information. They have been fixed.
  • Fixed: view store-derived bindings that do not have animation modifiers applied will not properly animated when mutated explicitly in withAnimation.
  • Fixed: documentation improvements (thanks @nspavlo, @SteinerHannes, @mluisbrown).x
  • Infrastructure: better support dark mode in the Voice Memos demo (thanks @willisplummer).
  • Infrastructure: use serial queue in Tic Tac Toe demo.

0.9.0

29 Oct 20:18
b67569f
Compare
Choose a tag to compare

0.8.0

04 Sep 16:49
Compare
Choose a tag to compare
  • Improved: better error messaging around testing uncompleted effects: it will now print the action the effect was kicked off from (thanks @mackoj).
  • Bug fix: fixed identified array implementations of shuffle, reverse (thanks @jeffersonsetiawan).
  • Bug fix: test stores should now perform effects in the same order as a live store.
  • Infrastructure: better document TCA acronym.
  • Infrastructure: document Apple bug with WithViewStore and ScrollViewReader.
  • Infrastructure: fix recursive higher-order reducer demo to map its effects recursively.
  • Infrastructure: Xcode 12 CI.

0.7.0

10 Aug 18:06
7f482ac
Compare
Choose a tag to compare
  • Changed: LocationManager mock initializers now take the correct, optional signature for the location dependency (thanks @mackoj ).
  • Changed: Reducer.optional is now a method so that its assertions can include file/line context (thanks @alexito4). The optional property has been deprecated in favor of the method.
  • Changed: previously-deprecated interfaces have been obsoleted.
  • Bug fixed: Store.ifLet no longer evaluates the else branch too often (thanks @mluisbrown).
  • Bug fixed: more than one alert can now be presented in a row, as can more than one action sheet.
  • Infrastructure: documentation fixes (thanks @jasdev, @artnest, @mmatoszko).
  • Infrastructure: Store.ifLet can take advantage of a scope overload (thanks @fonkadelic).
  • Infrastructure: fixed Voice Memos bug around deleting a memo that is playing.
  • Infrastructure: new demo for tvOS focus.
  • Infrastructure: added key frame effect to animation demo (thanks @boudavid).
  • Infrastructure: fixed Tic-Tac-Toe demo bug around error display (thanks @heiberg).