Releases: SwiftedMind/Processed
Releases · SwiftedMind/Processed
Release list
2.2.0
What's Changed
- Added new product "ProcessedUtility" with a
loadedBindingextension. See #10 for more information. Thanks @gsipic for the suggestion! - Added new
.constantinitializers toLoadable.BindingandProcess.Binding
Full Changelog: 2.1.0...2.2.0
2.1.0
2.0.1
Fixed
- Fixed a small bug that would return an Optional
LoadableState<Value>when using themapfunction. It does not need to be Optional
2.0.0
New
- In the closures passed to the methods of
ProcessSupportandLoadableSupport, you now don't need to provide explicitselfanymore, since those closures are simply passed into aTask, so reference cycles are no real concern - Added concept of "interrupts" for both
@Loadableand@Process(as well as their protocol counterparts) - The closures passed to the
runmethods of theProcessSupportprotocol are now isolated to theMainActor - Added new method
LoadableState<Value>.map(transform:)to allow convenient mapping of loadable values. - Added new properties to the projected values of
@Loadableand@Processthat give access to a SwiftUI binding to the underlyingLoadableStateandProcessState:$process.bindingand$loadable.binding. - Added
@TaskIdentifierproperty wrapper, which is a convenience wrapper around aUUIDSwiftUI state that helps with task restarts, e.g..task(id: taskIdentifier) { ... } - Reworked the demo app and fixed a few bugs and issues
- The demo app now has more examples:
Restartable Loadable,Refreshable Loadable,Process Interrrupts,Loadable InterruptsandFailure Alert Process - Added error types
ResetProcessandResetLoadablethat can be thrown to reset a process or loadable - Added typealias
typealias SingleProcessState = ProcessState<SingleProcess>for convenience
Changed
- Renamed generic process type
ProcessIDtoProcessKindto better communicate its purpose. This should not affect your code at all.
Fixed
- Removed redundancies in the
ProcessSupportprotocol code to simplify implementation - Fixed incorrect
CancelProcessandCancelLoadableerror behavior inProcessSupportandLoadableSupport; they used to perform a reset instead of a cancel - Added a missing
Taskpriorityargument in an overload of theProcess.runmethod - Fixed a few typos in the documentation.
Warning
This is a release that introduces breaking changes, due to a few unfortunate bugs in 1.0.0. The migration process should not be complicated, though. You can read more about it in the migration guide.
1.0.0
0.6.2
0.6.1
0.6.0
Refactor internals and add missing documentation
0.5.3
0.5.2
- Restrict
@Loadableand@Processto@MainActor
They are only ever going to be used from SwiftUI Views, so this makes the code a lot more convenient. Also, it's easy to await a Task.detached if needed