New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

microcosm

Package Overview
Dependencies
Maintainers
4
Versions
233
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

microcosm - npm Package Versions

1
24

9.0.0

Diff

Changelog

Source

9.0.0

Noticeable changes

  • Microcosm now uses transactions to process state. When an action is pushed, an associated transaction will be created. Transactions are processed in the order in which app.push is called.
  • Added a mechanism for optimistic updates using generators in actions.
  • app.push accepts a callback as the third argument which will be invoked when an action is completely resolved (More in breaking changes)

Breaking Changes

  • Removed Foliage. Microcosm no longer extends from Foliage and its API is no longer available.
  • Instead of app.get or app.toObject() to retrieve state, use app.state.
  • The signature for app.push is now app.push(action, [...arguments], callback).
  • The signature for app.prepare is now app.prepare(action, [...arguments]).

Upgrading

Foliage

For those using the Foliage API, consider using Foliage within Stores themselves.

nhunzaker
published 9.0.0-beta-5 •

nhunzaker
published 8.3.0 •

Changelog

Source

8.3.0

Breaking changes

  • Microcosm will emit events synchronously.

Upgrading

In the past, Microcosm would use requestAnimationFrame to batch together changes. However this can cause unexpected consequences when sequentially performing otherwise synchronous operations. For those who wish to preserve this behavior, consider using debounce to "choke" high frequency changes.

nhunzaker
published 9.0.0-beta-4 •

nhunzaker
published 8.2.0 •

Changelog

Source

8.2.0

Internal Changes

  • Upgrade Foliage to 0.24.0.
  • Moved Store.prototype.send to Store.send. This has always been an internal API, however those using this method for testing will need to update. This change is motivated by a desire to reduce as much surface area from Store instances as possible.
  • We now use babel-plugin-object-assign for extension
  • Microcosm is compiled in normal babel mode (not loose)

Fixes

  • Store responses to actions will always be called within the scope of the store.
  • Addressed classical inheritance issue not caught from loose babel compilation

Upgrading

For those using Store.prototype.send, the following change is necessary:

// Before
store.send(state, action, payload)
// After
Store.send(store, action, state, payload)
nhunzaker
published 9.0.0-beta-3 •

nhunzaker
published 9.0.0-beta-2 •

nhunzaker
published 9.0.0-beta •

nhunzaker
published 9.0.0-alpha •

nhunzaker
published 9.0.0-pre-alpha-2 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc