Skip to content
This repository has been archived by the owner on Oct 14, 2021. It is now read-only.

Releases: material-motion/indefinite-observable-swift

v4.0.0

27 Apr 05:24
Compare
Choose a tag to compare

This major release improves the general usage of the observable pattern by removing the
auto-unsubscription behavior from the Subscription type on deallocation.

// Pre-4.0 usage required that you held on to the Subscription instance in order to continue
// receiving values
let subscription = observable.subscribe { value in
  print(value)
}

// 4.0 allows you to subscribe to streams without holding on to the Subscription instance.
observable.subscribe { value in
  print(value)
}

Breaking changes

• Subscriptions no longer unsubscribe automatically upon deallocation.

This means that you no longer need to hold on to a Subscription in order to continue receiving
values from a subscribed stream.

If you were previously depending on this behavior then you must now ensure that you explicitly
unsubscribe from subscriptions.

Source changes

API changes

Auto-generated by running:

apidiff origin/stable release-candidate swift IndefiniteObservable.xcworkspace IndefiniteObservable

Subscription

IndefiniteObservable

modified method: subscribe(observer:) in IndefiniteObservable

Type of change: key.attributes
From: ( { "key.attribute" = "source.decl.attribute.final"; } )
To: ( { "key.attribute" = "source.decl.attribute.final"; }, { "key.attribute" = "source.decl.attribute.discardableResult"; } )

Non-source changes

v3.1.0

14 Dec 20:35
Compare
Choose a tag to compare

New features

  • Clients can now create instances of the Subscribe type.

Source changes

v3.0.0

13 Dec 16:04
Compare
Choose a tag to compare

There is now a distinction between connection and subscription.

Breaking changes

  • Subscription is now a public concrete type.
  • noopUnsubscription has been renamed to noopDisconnect.
  • IndefiniteObservable now accepts a Connect function that returns a non-optional Disconnect
    function.

Source changes

API changes

Auto-generated by running:

apidiff origin/stable release-candidate swift IndefiniteObservable.xcworkspace IndefiniteObservable

Subscription

new class: Subscription

removed protocol: Subscription

noopDisconnect

new global var: noopDisconnect

noopUnsubscription

removed global var: noopUnsubscription

Non-source changes

v2.0.0

07 Dec 02:21
Compare
Choose a tag to compare

IndefiniteObservable now supports novel Observer implementations using a genericized Observer type.

Breaking changes

  • Removed AnyObserver.
  • Renamed noUnsubscription to noopUnsubscription.

New features

  • IndefiniteObservable now requires a generic Observer type, enabling the creation of custom
    observers with channels other than next.

Source changes

API changes

Auto-generated by running:

apidiff origin/stable release-candidate swift IndefiniteObservable.xcworkspace IndefiniteObservable

noUnsubscription

renamed global var: noUnsubscriptionnoopUnsubscription

Observer

new var: next in Observer

removed method: next(_:) in Observer

AnyObserver

removed class: AnyObserver

removed method: next(_:) in AnyObserver

IndefiniteObservable

new method: subscribe(observer:) in IndefiniteObservable

removed method: subscribe(next:) in IndefiniteObservable

modified class: IndefiniteObservable

Type of change: key.doc.declaration
From: open class IndefiniteObservable<T>
To: open class IndefiniteObservable<O : Observer>

Non-source changes

v1.0.0

03 Dec 21:18
Compare
Choose a tag to compare

Stable release of IndefiniteObservable.

Source changes

API changes

Auto-generated by running:

apidiff origin/stable release-candidate swift IndefiniteObservable.xcworkspace IndefiniteObservable

Subscription

new method: unsubscribe() in Subscription

new protocol: Subscription

noUnsubscription

new global var: noUnsubscription

Observer

new protocol: Observer

new method: next(_:) in Observer

AnyObserver

new class: AnyObserver

new method: next(_:) in AnyObserver

IndefiniteObservable

new method: init(_:) in IndefiniteObservable

new method: subscribe(next:) in IndefiniteObservable

new class: IndefiniteObservable