Skip to content

Releases: copper-leaf/ballast

0.13.1

25 Mar 17:16
Compare
Choose a tag to compare
  • [BUG FIX] Fix regression in debugger, where you could not view or rollback to previous States.

0.13.0

24 Mar 22:09
Compare
Choose a tag to compare
  • [BREAKING CHANGE] Renames ballast-crashlytics module to ballast-firebase-crashlytics
  • [BREAKING CHANGE] Renames sideEffect() to sideJob() to be more accurate and less confusing in comparison to other Kotlin MVI libraries.
  • [BREAKING CHANGE] BallastViewModel no longer implements the SendChannel interface, it exposes the send and trySend methods directly. It also adds sendAndAwaitCompletion() to send an Input and wait for it to completely finish processing.
  • [BREAKING CHANGE] The logger property of BallastViewModelConfiguration.Builder is now a function, which receives the viewModel name when built, to pass as the tag of a logger.
  • [BREAKING CHANGE] Moves annotations for Firebase into commonMain and renames them:
    • @FirebaseCrashlyticsInterceptor.Ignore --> @FirebaseCrashlyticsIgnore
    • @FirebaseAnalyticsInterceptor.TrackInput --> @FirebaseAnalyticsTrackInput
  • [FUNCTIONAL CHANGE] SideJobs are now posted to the VM immediately, rather than collected and dispatched explicitly after handling. The default implementation still requires that SideJobs are sent as the last statements of the InputHandler, though.
    • By writing a custom InputStrategy.Guardian, you could remove the restriction that sideJobs must be started at the end of the Input. This is dangerous and you shouldn't do it unless you really know what you're doing.
  • [BUG FIX] Fixes issue where JS Debugger cannot connect because JS browser websocket clients can't send headers
  • [NEW] Adds platform-specific BallastLogger implementations (AndroidBallastLogger, JsConsoleBallastLogger). The default logger of BallastViewModelConfiguration is still NoOpLogger().

0.12.0

17 Mar 05:12
Compare
Choose a tag to compare
  • Fixes issue with inputHandler { } and eventHandler { } functions, which previously didn't actually send the input or event to the lambda
  • Move all InputHandler checks into the Guardian, so any/all of them could be thrown away by the end-user if needed
  • make a dedicated InputStrategyScope to match the pattern of all other pluggable features

0.11.0

16 Mar 01:19
Compare
Choose a tag to compare
  • Adds "time-travel debugging" to Debugger IntelliJ plugin! Inputs can now be re-sent, and you can roll back the VM state to any previous point in time
  • Makes configuration a builder instead of multiple constructors
  • Allow BallastViewModelImpl to access the host VM, so the user-created VM is what's sent to Interceptors
  • ViewModels now clear themselves when their coroutine scope is closed, rather than having to do it manually
  • Adds a basic Logging facade, so all Ballast components have easy access to a common logger
  • Tighten up the overall API a bit, to be more streamlined

0.10.0

05 Mar 01:41
Compare
Choose a tag to compare
  • Updates to Kotlin 1.6.10
  • Fixes issue running IntelliJ plugin on Windows
  • Starts improving the Interceptor API to eventually allow Interceptors to inject Inputs and restore States

0.9.0

28 Feb 23:18
Compare
Choose a tag to compare
  • Finishes Debugger UI, fully exposing all states of Inputs, Events, and SideEffects
  • Converts Debugger UI to an IntelliJ Plugin, instead of a standalone desktop application
  • Adds a few new BallastNotifications, to notify of Inputs and Events being queued, but not yet processed
  • Fixed bug where SideEffect errors and cancellation was not being notified properly
  • SideEffectcope is now also a CoroutineScope, so you can launch other coroutines directly within the sideEffect(key) { } block without having to manually wrap it in coroutineScope { }

0.8.2

23 Feb 21:44
Compare
Choose a tag to compare

This is a major release, with lots of new features, greatly improved safety, but with several significant breaking changes, as descibed below:

  • Improves side-effects
    • They are now started through a Channel, instead of relying on a Mutex for safety
    • New BallastInterceptor methods added to track sideEffect starts/errors
    • SideEffects (and related APIs) now require a key to be provided, to avoid accidental restarting cause by disparate Inputs forgetting to provide a key
  • Improves safety of ParallelInputStrategy to prevent multiple updates, rather than just throwing an error at the end of the Input handler block if it was used incorrectly
    • Replaces onCompleted callback with a Guardian interface, which each InputStrategy can create for itself to check accesses during the InputHandler, rather than at the end
  • Rewrites Interceptor API
    • Instead of an interface, interceptors "events" are sent as a sealed class, BallastNotification. These Notifications are sent to a SharedFlow inside the core ViewModel, and each Interceptor observes this SharedFlow from its own coroutine, launched in the viewModel coroutineScope
  • Improves Repository Cached DSL:
    • Adds getValueOrThrow()
    • Adds getCachedOrThrow()
  • Introduces Ballast Debugger, a realtime desktop app for observing what is happening within your application's Ballast ViewModels

Full Changelog: 0.7.0...0.8.0

0.7.0

14 Feb 20:35
Compare
Choose a tag to compare
  • Adds Repository module for app-wide caching and communication

0.6.0

28 Jan 02:14
Compare
Choose a tag to compare
  • Improves DSL for restarting SideEffects

0.5.0

16 Jan 19:54
Compare
Choose a tag to compare
  • Fixes issue with input Channel buffer that didn't do exactly what I expected