Releases: pointfreeco/swift-composable-architecture
0.49.0
What's Changed
- Changed: Depend on swift-dependencies. The
Dependenciesmodule 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
What's Changed
Full Changelog: 0.48.0...0.48.1
0.48.0
What's Changed
- Changed:
withTaskCancellation(id:)now executes on the current executor without suspension (#1779). - Deprecated:
Effecthas been temporarily deprecated forEffectTaskto prepare for renames coming in 1.0 (#1788). - Deprecated:
EffectPublisheris now soft-deprecated (#1791). - Deprecated: The
asyncversion ofActorIsolated.withValuehas 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:
ButtonRoleandButtondeprecation 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.receivenow 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
- @ZevEisenberg made their first contribution in #1701
- @yuanhang made their first contribution in #1762
- @dy-kim made their first contribution in #1773
- @Iikeli made their first contribution in #1776
- @barabashd made their first contribution in #1784
- @pyrtsa made their first contribution in #1780
Full Changelog: 0.47.2...0.48.0
0.47.2
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
0.47.0
What's Changed
-
Depend on SwiftUINavigation for TextState, AlertState, etc... in #1685
The
TextState,AlertStateandConfirmationDialogStatetypes 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
What's Changed
- Added:
TestStorenow takes a trailing closure for configuring its dependency values (#1620). These dependency values are used when processinginitialState, which means state that relies on@Dependency(\.uuid, for example) will use these dependencies. - Changed:
TestStorewas recently, briefly made anopenclass, but we are marking itfinalagain (#1655). We are open to making itopenagain, but would like to know if there are use cases, first. - Fixed:
@Dependency(\.openURL)'scallAsFunctions 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
- @PierreCapo made their first contribution in #1609
- @crayment made their first contribution in #1644
- @hmhv made their first contribution in #1659
Full Changelog: 0.45.0...0.46.0
0.45.0
What's Changed
- Added:
TestStore.exhaustivity(thanks @krzysztofzablocki for the inspiration, #1599). - Added:
UncheckedSendablenow conditionally conforms toEquatable(thanks @maxgoedjen),Hashable,EncodableandDecodable. - Fixed: Reducer builders would occasionally, incorrectly warn that a deprecated
buildFinalResultwas 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.dependencyshould no longer erroneously report test failures (#1570) - Infrastructure: documentation fixes (thanks @tgrapperon, @onevcat); increased
@Dependencytest coverage.
New Contributors
- @maxgoedjen made their first contribution in #1565
Full Changelog: 0.44.1...0.45.0
0.44.1
What's Changed
- Fixed: Bumped swift-clocks to 0.1.4 to address platform compatibility issues (#1561).
- Fixed:
Reduceravailability 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
What's Changed
-
Added: Support for Swift 5.7's
Clockprotocol as a dependency via swift-clocks (#1547). -
Fixed: First access of a dependency vended from
DependencyKeyis 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
Dependenciesmodule outside of the Composable Architecture, make sure your tests fully resetDependencyValueswhen 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 Socketcase study (thanks @Jager-yoo, #1529); updatedXCTUnimplementedcalls tounimplemented(#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