Skip to content

Releases: pointfreeco/swift-composable-architecture

0.49.0

09 Jan 16:09
9b5a510

Choose a tag to compare

What's Changed

  • Changed: Depend on swift-dependencies. The Dependencies module has been extracted to its own library so that it can be used in non-TCA apps.

Full Changelog: 0.48.1...0.49.0

0.48.1

06 Jan 16:23
cbf8a45

Choose a tag to compare

What's Changed

  • Fixed: Reverted #1784, which introduced a regression in SwiftUI binding behavior (#1799).

Full Changelog: 0.48.0...0.48.1

0.48.0

06 Jan 01:21
30015d1

Choose a tag to compare

What's Changed

  • Changed: withTaskCancellation(id:) now executes on the current executor without suspension (#1779).
  • Deprecated: Effect has been temporarily deprecated for EffectTask to prepare for renames coming in 1.0 (#1788).
  • Deprecated: EffectPublisher is now soft-deprecated (#1791).
  • Deprecated: The async version of ActorIsolated.withValue has been deprecated. It can introduce re-entrancy bugs. Instead, we have introduced a synchronous version (#1792).
  • Fixed: @Dependency(\.openURL) is now supported in App extensions (thanks @tgrapperon, #1714).
  • Fixed: ButtonRole and Button deprecation warnings have been silenced (thanks @kgrigsby59, #1715).
  • Fixed: A longstanding bug in SwiftUI can cause bindings to be evaluated in views that are no longer rendered. In apps built in the Composable Architecture, which provides flexible tools for deriving custom bindings, this could lead to accessing state that no longer exists, which at worst could try to evaluate an element of an array at an invalidated index, crashing the application. This bug has now been worked around to avoid such crashes. (Thanks @barabashd, #1784; #1785).
  • Fixed: The predicated-based version of TestStore.receive now properly evaluates the given predicate (thanks @pyrtsa, #1780).
  • Infrastructure: Fix typos, etc., in documentation, README, and tests (thanks @ZevEisenberg, #1701; @tgrapperon, #1702; @yimajo, #1725; @yuanhang, #1762; @kalupas226, #1764; @dy-kim, #1773; @Iikeli, #1776; #1787; @jeffersonsetiawan, #1793).
  • Infrastructure: Fix todo deletion in Todos sample app when the list is filtered (#1696).
  • Infrastructure: Bump SwiftUINavigation and update examples (thanks @iampatbrown, #1760).

New Contributors

Full Changelog: 0.47.2...0.48.0

0.47.2

28 Nov 16:38

Choose a tag to compare

What's Changed

  • Fixed: Dependency values test context is no longer implicitly inferred, which could cause unexpected behavior for host applications that run during tests (#1686).

Full Changelog: 0.47.1...0.47.2

0.47.1

22 Nov 13:20
f027afd

Choose a tag to compare

Pinned SwiftUINavigation to its newest release, 0.4.2, to fix an issue with ButtonState's equatable conformance.

Full Changelog: 0.47.0...0.47.1

0.47.0

21 Nov 22:55
0a19581

Choose a tag to compare

What's Changed

  • Depend on SwiftUINavigation for TextState, AlertState, etc... in #1685

    The TextState, AlertState and ConfirmationDialogState types have been moved out of the library and into SwiftUINavigation. It should be completely backwards compatible, and you should not have to change your code, but let us know if you encounter problems.

Full Changelog: 0.46.0...0.47.0

0.46.0

16 Nov 23:21
52dca7e

Choose a tag to compare

What's Changed

  • Added: TestStore now takes a trailing closure for configuring its dependency values (#1620). These dependency values are used when processing initialState, which means state that relies on @Dependency (\.uuid, for example) will use these dependencies.
  • Changed: TestStore was recently, briefly made an open class, but we are marking it final again (#1655). We are open to making it open again, but would like to know if there are use cases, first.
  • Fixed: @Dependency(\.openURL)'s callAsFunctions overloads are no longer ambiguous in certain cases (#1621).
  • Fixed: Printing is now disabled when running debugged reducers from Xcode previews (thanks @tgrapperon, #1625).
  • Fixed: Documentation typos (thanks @PierreCapo, #1609; @tgrapperon, #1608; @ts, #1612; @Jager-yoo, #1638; @hmhv, #1659).
  • Infrastructure: Case Studies modernization (#1623); CI cleanup (#1632); documentation additions (#1642); dependencies test (thanks @crayment, #1644).

New Contributors

Full Changelog: 0.45.0...0.46.0

0.45.0

31 Oct 18:56

Choose a tag to compare

What's Changed

  • Added: TestStore.exhaustivity (thanks @krzysztofzablocki for the inspiration, #1599).
  • Added: UncheckedSendable now conditionally conforms to Equatable (thanks @maxgoedjen), Hashable, Encodable and Decodable.
  • Fixed: Reducer builders would occasionally, incorrectly warn that a deprecated buildFinalResult was being invoked. All known instances of this warning have been eliminated, but if you find another, please let us know!
  • Fixed: Stores accessing dependencies in tests via ReducerProtocol.dependency should no longer erroneously report test failures (#1570)
  • Infrastructure: documentation fixes (thanks @tgrapperon, @onevcat); increased @Dependency test coverage.

New Contributors

Full Changelog: 0.44.1...0.45.0

0.44.1

24 Oct 23:58
ed3a380

Choose a tag to compare

What's Changed

  • Fixed: Bumped swift-clocks to 0.1.4 to address platform compatibility issues (#1561).
  • Fixed: Reducer availability was not correctly deprecated in the previous release. This is now fixed (thanks @konomae, #1550).
  • Infrastructure: Update GitHub bug report template to ask if bug is reproducible in vanilla SwiftUI (#1555; thanks @gohanlon for finesse #1562).

Full Changelog: 0.44.0...0.44.1

0.44.0

24 Oct 05:57

Choose a tag to compare

What's Changed

  • Added: Support for Swift 5.7's Clock protocol as a dependency via swift-clocks (#1547).

  • Fixed: First access of a dependency vended from DependencyKey is now cached (thanks @tgrapperon, #1510). This means that a dependency vended from a computed property, when stateful, is now maintained over time.

    If you are using the Dependencies module outside of the Composable Architecture, make sure your tests fully reset DependencyValues when you first control them. For example:

    func testMyFeature() async throws {
      try await DependencyValues.withValues { values in
        values = DependencyValues() // reset "values"
        values.context = .test // default "values" for testing
        // further mutate "values" for this test
      } operation: {
        // make assertions
      }
    }
  • Infrastructure: Improve the layout of Web Socket case study (thanks @Jager-yoo, #1529); updated XCTUnimplemented calls to unimplemented (#1530); removed unnecessary conformance to Sendable Protocol (thanks @inwoodev; #1535); add a few missing tests (#1539); remove redundant error type in ReusableFavoritingTests.swift (thanks @Jager-yoo, #1538)

New Contributors

Full Changelog: 0.43.0...0.44.0