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

Latest commit

 

History

History
220 lines (131 loc) · 8.58 KB

CHANGELOG.md

File metadata and controls

220 lines (131 loc) · 8.58 KB

4.0.0

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

3.1.0

New features

  • Clients can now create instances of the Subscribe type.

Source changes

3.0.0

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

2.0.0

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

1.0.0

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