Skip to content

1.2.0

Compare
Choose a tag to compare
@jakehawken jakehawken released this 08 Jun 06:27
· 20 commits to main since this release

Additions:

  • DEBUGGING! Users can now add the .debug(logLevel:_:) method during development to more easily debug issues with Publishers and Subscribers. Both arguments have default values, so if you just want to drink from the firehose of logs, you can simply call .debug().
  • Added combine methods for up to 6 separate items on Future and Subscriber, and added instance method versions for all 6.
  • Added ability for UpdateOnlySubscriber and ValueOnlySubscriber to be inflated back to regular Subscribers
  • Added combine methods to ValueOnlySubscriber.
  • Added a distinctValues() method for ValueOnlySubscribers where T is Equatable.
  • Added splitErrorMap() method to Future.
  • Added splitMapValues(_:) and splitMapErrors(_:) methods to Subscriber to match the methods on Future.
  • Added self reference to valueOnly() method to allow for easier chaining of operators without having to retain a reference to the intervening Subscriber.

Changes:

  • Updated the subscription methods on UpdateOnlySubscriber and ValueOnlySubscriber to return self for easier chaining.
  • Updated combine methods on Subscriber to retain a reference to the source subscribers.
  • Updated ValueOnlySubscriber to call cancel() on deinit.
  • Updated name of mapState to mapStates on Subscriber to be more semantically accurate.
  • Updated subscribe(onQueue:performing:) to call a given callback immediately with .cancelled if the subscriber has been cancelled.
  • Updated Subscriber to immediately trigger it's own .cancelled event on cancel().
  • Updated executeCallbacks(forState:) to no-op if isCancelled is true.
  • Updated subscribe(onQueue:performing:) to exit early and not save the callback if isCancelled is true.

Fixes:

  • Fixed bug on UpdateOnlySubscriber and ValueOnlySubscriber so that all of their subscription methods return @discardableResult self.