You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
New Features:
Implemented a plugin testing DSL. The plugin allows invoking store plugin methods directly and observing any side effects the plugin produced. It also embeds and installs the time travel plugin to keep track of any changes.
Library tests are already using the testing dsl. See the tests for some example usages.
New overload for subscribe that suspends forever. Useful inside other stores and other places
Logging plugin now logs when it is created and exception stacktraces
joinAll method for JobManager with vararg argument
Made compositePlugin public. Composite plugin is the underlying implementation of FlowMVI's plugin logic. It is mostly useful in tests and some very rare edge cases.
Updated docs and readme
Dropped the rc suffix as the library is 70% covered by tests and has been in prod for quite some time
Breaking changes
nameByType has been relocated to a different package
TimeTravelPlugin no longer implements the plugin interface directly. Instead, it uses a TimeTravel object and installs a separate plugin when requested. This is to allow storing the time travel object elsewhere and to not leak plugin methods as public API
Same change for CachePlugin and UndoRedoPlugin. Their plugins are now just hooks and the CachedValue and UndoRedo are completely separate from the store.
NativeStore for iOS code has been changed to implement Store, and some useless methods such as cancel were removed. Canceling the store now also cancels its scope. To cancel just the subscription job, cancel the one returned from subscribe
AbstractStorePlugin is now deprecated. Base classes are evil! Everything that you could do with the base class you can do with a plugin { } builder.
Bug fixes:
Disabled android debug artifacts publishing. FlowMVI does not publish different debug/release configurations
Removed reified parameter from savedStatePlugin builder to allow creating this plugin somewhere else. For example, savers can now be injected, with different savers for testing (NoOpSaver) and main code:
internalclassDefaultStoreConfiguration(
files:FileManager,
privatevalanalytics:Analytics,
privatevaljson:Json,
) : StoreConfiguration() {
overridefun <S:MVIState, I:MVIIntent, A:MVIAction> StoreBuilder<S, I, A>.configure(
serializer:KSerializer<S>,
) {
/* configure the store builder here without exposing any implementation details*/
install(
analyticsPlugin(analytics),
kermitLoggingPlugin(),
serializeStatePlugin(dir = files.cacheDir, json = json, serializer = serializer)
)
}
}
A documentation page is going to be made soon for this functionality.