Skip to content

Releases: vigetlabs/microcosm

v9.12.0

13 Jan 18:26
Compare
Choose a tag to compare

This is a big update, however there should be no breaking changes
(assuming you are not referencing Microcosm internals).

Noticeable Changes

  • Microcosm now stores transactions created by actions as a tree. The
    long term plan for this change is to support undo trees.
  • Stores determine initial state when they are added to a
    Microcosm. This allows for Microcosms to be created without needing
    to start().
  • Added history API. This is an unstable API. However, for those
    curious, check out the undo-tree example.
  • Added some additional validations to ensure proper use of Microcosm.
  • Actions that are generators now receive the last payload as the
    returned value from yield. This should help to improve sequential,
    daisy chained, calls.
  • Adjusted build tooling to expose Microcosm modules at microcosm/*
    instead of microcosm/src/*
  • Stores and Plugins can now be functions. When this is the case, they
    will act as the register function in each instance.

Internal Changes

  • Adjustments to improve v8 performance. All Microcosm operations
    should occur without deoptimization penalties.

Upgrading

For those referencing Microcosm internals, we have moved their hosted
directory from src to the folder root. This means the following
changes are necessary:

Instead of:

require('microcosm/src/lifecycle')

Change this to:

require('microcosm/lifecycle')

v9.11.0

13 Jan 18:26
Compare
Choose a tag to compare
  • Generators used for Microcosm actions can now yield other
    generators. In these instances, child generators operate to
    completion before the next iteration of the parent generator.

v9.10.0

13 Jan 18:26
Compare
Choose a tag to compare
  • Upgrade Diode to 6.1.0. listen now supports a second argument that
    defines the scope of the callback.
  • Respect scope of bound functions when executing callbacks via app.push

v9.9.2

13 Jan 18:26
Compare
Choose a tag to compare
  • Fixed bug where eventually would try to execute a non-function value

v9.9.1

13 Jan 18:27
Compare
Choose a tag to compare

Noticeable changes

  • Improved the error messages for addStore

Internal changes

  • Changed order of execution in tag to prevent unnecessary work

v9.9.0

13 Jan 18:27
Compare
Choose a tag to compare

Noticeable changes

  • Each store will receive the reduced state from all prior
    stores. This means that stores can respond to the result from prior
    operations. This should not affect any stores that do not access the
    third argument of store callbacks (all application state).

Internal changes

  • Rewrites and improvements to dispatch and send methods to
    achieve higher v8 optimization.

v9.8.0

13 Jan 18:27
Compare
Choose a tag to compare

Noticeable changes

  • If a store returns undefined, no state change will occur. This is
    potentially a breaking change. If you have stores that return
    undefined, consider changing your logic to support returning null

v9.7.0

13 Jan 18:27
Compare
Choose a tag to compare
  • The third argument of store callbacks now contains all application
    state. The intention behind this addition is to allow for stores
    that must make decisions based upon input from multiple sources.

v9.6.0

13 Jan 18:27
Compare
Choose a tag to compare

Noticeable changes

  • The deserialize lifecycle method is now provided the entire raw
    state as the action parameters. This means that it is now available
    as the second argument in store callbacks.
  • Similarly, the serialize lifecycle method is now provided the
    entire app state in the action. This means that it is now available
    as the second argument in store callbacks.

Internal changes

  • Tweaks to lazy callback executed after app.push for better
    optimization
  • Tweaks to flatten for better optimization
  • Renamed async utility to coroutine
  • Reworked transactions to expose future lifecycle methods
  • Retain 100% test coverage

Upgrading

There are no breaking changes for this release.

v9.5.0

13 Jan 18:28
Compare
Choose a tag to compare
  • Upgrade dependencies
  • Use fixed versions for dependencies