Releases: material-motion/indefinite-observable-swift
v4.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
- Update README with new documentation for subscriptions. (Jeff Verkoeyen)
v3.1.0
New features
- Clients can now create instances of the Subscribe type.
Source changes
- Document Subscription's unsubscribe. (Jeff Verkoeyen)
- Allow Subscriptions to be created by clients. (Jeff Verkoeyen)
- Fixed typo (#8) (Brenton Simpson)
v3.0.0
There is now a distinction between connection and subscription.
Breaking changes
Subscription
is now a public concrete type.noopUnsubscription
has been renamed tonoopDisconnect
.- IndefiniteObservable now accepts a Connect function that returns a non-optional Disconnect
function.
Source changes
- Rename noopDisconnection to noopDisconnect. (Jeff Verkoeyen)
- Introduce distinction between connection and subscription. (Jeff Verkoeyen)
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
- Automatic changelog preparation for release. (Jeff Verkoeyen)
- Remove .jazzy.yaml and .swift-version (Jeff Verkoeyen)
- Send emails on build failures. (Jeff Verkoeyen)
v2.0.0
IndefiniteObservable now supports novel Observer implementations using a genericized Observer type.
Breaking changes
- Removed
AnyObserver
. - Renamed
noUnsubscription
tonoopUnsubscription
.
New features
IndefiniteObservable
now requires a generic Observer type, enabling the creation of custom
observers with channels other thannext
.
Source changes
- Make the shape of the default Observer have a value and next function. (Jeff Verkoeyen)
- Make IndefiniteObservable observer-agnostic. (Jeff Verkoeyen)
- Cleaned up and added some additional unit tests (Jeff Verkoeyen)
- Remove unnecessary UpstreamSubscription. (Jeff Verkoeyen)
- Set next in the ValueObserver wrather than wrap it. (Jeff Verkoeyen)
- Make IndefiniteObservable final so that it can't be subclassed. (Jeff Verkoeyen)
- Rename noUnsubscription to noopUnsubscription. (Jeff Verkoeyen)
- Remove the unused Observer type. (Jeff Verkoeyen)
- Rename AnyObserver to ValueObserver. (Jeff Verkoeyen)
API changes
Auto-generated by running:
apidiff origin/stable release-candidate swift IndefiniteObservable.xcworkspace IndefiniteObservable
noUnsubscription
renamed global var: noUnsubscription
→ noopUnsubscription
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
- Automatic changelog preparation for release. (Jeff Verkoeyen)
- Better podspec description. (Jeff Verkoeyen)
- Fix typo in README.md guides. (Jeff Verkoeyen)
- Undo the previous change. (Jeff Verkoeyen)
- Poke the travis build. (Jeff Verkoeyen)
v1.0.0
Stable release of IndefiniteObservable
.
Source changes
- Fix outdated reference in header docs. (Jeff Verkoeyen)
- Initial commit of IndefiniteObservable. (Jeff Verkoeyen)
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