|
1 | 1 | # SwiftObserver Changelog
|
2 | 2 |
|
3 |
| -# v6 |
| 3 | +## v6.1 |
| 4 | + |
| 5 | +All that's new is also compatible with message authors and ad-hoc transform chains: |
| 6 | +* Promises: |
| 7 | + * `Promise<Value>` is a `Messenger<Value>` with some conveniences for async returns |
| 8 | + * Promise composition functions `promise`, `then` and `and` |
| 9 | +* Free Observers: |
| 10 | + * Class for adhoc observers `FreeObserver` |
| 11 | + * Global function `observe(...)`, and `observed(...)` on observables, both use `FreeObserver.shared` |
| 12 | + * Global function `observeOnce(...)`, and `observedOnce(...)` on observables, both use `FreeObserver` |
| 13 | +* `BufferedObservable`: |
| 14 | + * `BufferedObservable` has been renamed to `ObservableCache`. |
| 15 | + * `ObservableCache` can be created via observable transform `cache()`, which makes `Message` optional only when necessary. |
| 16 | + * `whenCached` retrieves non-optional message from caches that have optional `Message`. |
| 17 | +* Observables can stop their observations via `stopBeingObserved()` and `stopBeingObserved(by: observer)`. |
| 18 | +* `Weak` is available as observable transform `weak()` and is generally a regular transform object. |
| 19 | +* All transforms have mutable property `origin` which is the underlying observable whose messages get transformed. |
| 20 | +* It's possible for an observer to do multiple simultaneous observations of the same observable. |
| 21 | + |
| 22 | + |
| 23 | +## v6 |
4 | 24 |
|
5 | 25 | * Memory management is new:
|
6 | 26 | * Before 6.0, memory leaks were *technically* impossible, because SwiftObserver still had a handle on dead observers, and you could flush them out when you wanted "to be sure". Now, dead observations are actually impossible and you don't need to worry about them.
|
|
38 | 58 | * `Update` is `Equatable` when its `Value` is `Equatable`, so messages of variables can be selected via `select(Update(specificOldValue, specificNewValue))` or any specific value update you define.
|
39 | 59 | * The issue that certain Apple classes (like NSTextView) cannot directly be `Observable` because they can't be referenced weakly is gone. SwiftObserver now only references an `Observable`'s `messenger` weakly.
|
40 | 60 |
|
41 |
| -# v5 |
42 |
| - |
43 |
| -## v5.0 |
44 |
| - |
45 |
| -### v5.0.1 Consistent Variable Operators, SPM, Gitter |
| 61 | +## v5.0.1 Consistent Variable Operators, SPM, Gitter |
46 | 62 |
|
47 | 63 | * Removed
|
48 | 64 | * Variable string assignment operator
|
|
55 | 71 | * SPM Support
|
56 | 72 | * Gitter chat
|
57 | 73 |
|
58 |
| -### v5.0.0 Performance, Consistency, Expressiveness, Safety |
| 74 | +## v5 Performance, Consistency, Expressiveness, Safety |
59 | 75 |
|
60 | 76 | * **Renamings:**
|
61 | 77 | * Some memory management functions have been renamed to be more consistent with the overall terminology.
|
|
73 | 89 | * The operators on string- and number variables now work on all combinations of optional and non-optional generic and main types. For instance, string concatenation via `+` works on all pairs of `String`, `String?`, `Var<String>`, `Var<String?>`, `Var<String>?` and `Var<String?>?`.
|
74 | 90 | * All variables with values of type `String`, `Int`, `Float` and `Double` also have a non-optional property that is named after the value type (`string`, `int` ...).
|
75 | 91 |
|
76 |
| -# v4 |
77 |
| - |
78 |
| -## v4.2 |
79 |
| - |
80 |
| -### v4.2.0 Messengers |
| 92 | +## v4.2 Messengers |
81 | 93 |
|
82 | 94 | * Added class `Messenger`
|
83 | 95 | * Added class `ObservabeObject` as a mostly internally used abstract base class for *observables*. `Var`, `Mapping` and `Messenger` now derive from `ObservableObject`.
|
84 | 96 |
|
85 |
| -## v4.1 |
86 |
| - |
87 |
| -### v4.1.0 Consistent Mappings |
| 97 | +## v4.1 Consistent Mappings |
88 | 98 |
|
89 | 99 | * Made *Mapping* API more consistent
|
90 | 100 | * Renamed `prefilter` to `filter`
|
91 | 101 | * Added `filterMap` to *mappings* as their (mostly internally used) designated transform function
|
92 | 102 | * Removed `prefilter` argument from `map` function
|
93 | 103 |
|
94 |
| -### v4.0.0 Ad Hoc Mapping |
| 104 | +## v4 Ad Hoc Mapping |
95 | 105 |
|
96 | 106 | * Added Ad Hoc Mapping of observations
|
97 | 107 | * Added filter mapping `select` for all *observables*
|
|
0 commit comments