Skip to content

Releases: vigetlabs/microcosm

Version 9.18.0

21 Jan 21:49
Compare
Choose a tag to compare
  • When registered, the options argument of plugins default to an empty object.
  • Added warning when a Store's registration method is configured to listen to a particular action, however it is undefined. The message should read "Store for [key] is registered to [action], but the handler is undefined!"
  • Upgraded patch release of Diode that fixed strange compilation issues with Babel 5.x in a Node environment.

v9.17.0

13 Jan 18:22
Compare
Choose a tag to compare

Plugins no longer require a next argument. For example, consider:

function Plugin (app, options, next) {
  app.listen(function() {
    console.log("I changed!")
  })

  next()
}

This plugin is entirely synchronous, yet relies on next() to advance plugin installation forward. As of this release, omitting the next argument causes a plugin to be synchronously processed:

function Plugin (app, options) {
  app.listen(function() {
    console.log("I changed!")
  })
}

This is not mandatory, and designed to streamline simple plugins.

v9.16.0

13 Jan 18:23
Compare
Choose a tag to compare

The history tree now properly implements "redo". Before this release, moving forward in the tree would walk the oldest branch. From this point forward, it will take the newest path. This should not impact projects not utilizing undo history.

v9.15.2

13 Jan 18:23
Compare
Choose a tag to compare

Republishing mistake. This patch release sets the current version on NPM to 9.15.2.

v9.15.1

13 Jan 18:24
Compare
Choose a tag to compare

Removes extraneous dependency on mustache.

v9.15.0

13 Jan 18:25
Compare
Choose a tag to compare
  • Fix bug where history would not completely flush all transactions,
    causing store handlers to fire twice.
  • start() must be invoked

Potentially breaking changes

In a previous update, we made a change that allowed instances of microcosm to work without invoking start(). This update reverts that decision. Without intentionaly invoking start, transactional state becomes hard to predict. This is potentially a breaking change; for those upgrading, verify that you are calling start before using a microcosm.

v9.14.1

13 Jan 18:24
Compare
Choose a tag to compare

Properly clear history so that store handlers do not fire twice

v9.14.0

13 Jan 18:25
Compare
Choose a tag to compare

Noticeable Changes

We improved the validation of stores to help improve debugging of bad inputs to Microcosm::addStore.

Internal Changes

  • Small change to dispatch process so that accessing state only happens when necessary. This should provide a small performance boost.

v9.13.1

13 Jan 18:25
Compare
Choose a tag to compare
  • Addressed an IE9 bug where stores passed without key paths did not install properly.

v9.13.0

13 Jan 18:26
Compare
Choose a tag to compare

Noticeable Changes

  • Microcosm::addStore mounts stores to a given key path, like: app.addStore([ 'path', 'to', 'key' ], Store). Additionally, adding a store without a keypath will mount it to the entire application state. This is to improve the useability of Stores that must operate all state (such as make decisions about game state).
  • Renamed setFocus to checkout in internal Tree structure. This is a breaking change. The goal is to move towards a more intuitive API.
  • Tweaked build process to prevent babel compilation errors when developing for React Native development.

Upgrading

The enhancement Microcosm::addStore is not a breaking change, all ld use cases will continue to work.

Those experimenting with app.history will need to rename calls to setFocustocheckout`.