Skip to content

Releases: SwiftedMind/Processed

2.2.0

27 Mar 17:24
Compare
Choose a tag to compare

What's Changed

  • Added new product "ProcessedUtility" with a loadedBinding extension. See #10 for more information. Thanks @gsipic for the suggestion!
  • Added new .constant initializers to Loadable.Binding and Process.Binding

Full Changelog: 2.1.0...2.2.0

2.1.0

29 Feb 14:41
90bad98
Compare
Choose a tag to compare

What's Changed

New Contributors

  • @tinora made their first contribution in #9

Full Changelog: 2.0.1...2.1.0

2.0.1

24 Nov 11:24
Compare
Choose a tag to compare

Fixed

  • Fixed a small bug that would return an Optional LoadableState<Value> when using the map function. It does not need to be Optional

2.0.0

22 Nov 17:11
21d3d1c
Compare
Choose a tag to compare

New

  • In the closures passed to the methods of ProcessSupport and LoadableSupport, you now don't need to provide explicit self anymore, since those closures are simply passed into a Task, so reference cycles are no real concern
  • Added concept of "interrupts" for both @Loadable and @Process (as well as their protocol counterparts)
  • The closures passed to the run methods of the ProcessSupport protocol are now isolated to the MainActor
  • Added new method LoadableState<Value>.map(transform:) to allow convenient mapping of loadable values.
  • Added new properties to the projected values of @Loadable and @Process that give access to a SwiftUI binding to the underlying LoadableState and ProcessState: $process.binding and $loadable.binding.
  • Added @TaskIdentifier property wrapper, which is a convenience wrapper around a UUID SwiftUI 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 Interrupts and Failure Alert Process
  • Added error types ResetProcess and ResetLoadable that can be thrown to reset a process or loadable
  • Added typealias typealias SingleProcessState = ProcessState<SingleProcess> for convenience

Changed

  • Renamed generic process type ProcessID to ProcessKind to better communicate its purpose. This should not affect your code at all.

Fixed

  • Removed redundancies in the ProcessSupport protocol code to simplify implementation
  • Fixed incorrect CancelProcess and CancelLoadable error behavior in ProcessSupport and LoadableSupport; they used to perform a reset instead of a cancel
  • Added a missing Task priority argument in an overload of the Process.run method
  • 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

19 Sep 19:19
044882f
Compare
Choose a tag to compare
Update README.md

0.6.2

18 Sep 20:43
Compare
Choose a tag to compare
Add more missing documentation

0.6.1

18 Sep 20:37
Compare
Choose a tag to compare
Fix documentation

0.6.0

18 Sep 19:52
Compare
Choose a tag to compare
Refactor internals and add missing documentation

0.5.3

18 Sep 05:16
Compare
Choose a tag to compare

Fix commit messages

0.5.2

18 Sep 05:12
Compare
Choose a tag to compare
  • Restrict @Loadableand @Process to @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