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

6.2.0

Diff

Changelog

Source

6.2.0

  • Microcosm's event system has been replaced with Diode. The APIs are the same. This should not lead to any breaking changes.
nhunzaker
published 6.1.0 •

Changelog

Source

6.1.0

  • Microcosm::pull can now accept an array of keys for the first argument. This will traverse the nested keys of state to calculate value.
nhunzaker
published 6.0.0 •

Changelog

Source

6.0.0

6.0.0 is the second effort to reduce the surface area of the Microcosm API.

  • Removed Upstream and Downstream mixins. They used the undocumented context API and introduced some complexity in testing
  • Microcosm::send is now Microcosm::push
  • Microcosm::push is now Microcosm::replace
  • Microcosm::dispatch and Microcosm::commit are now private. These are important methods that should not be overridden
nhunzaker
published 5.2.0 •

Changelog

Source

5.2.0

  • Microcosm::pull accepts a callback that allows you to modify the result. This should help to make data queries more terse.
  • Removed Microcosm::clone, the functionality is not gone, but it has been internalized to mitigate the cost of future changes
  • Removed mixins from main payload to improve size
nhunzaker
published 5.1.1 •

Changelog

Source

5.1.1

  • Fix build process mistake :-/
nhunzaker
published 5.1.0 •

Changelog

Source

5.1.0

  • Removed fallback from Microcosm::pull which returns all state
  • Added an Upstream and Downstream mixin, however it is experimental. More details will come as the feature develops.
  • Microcosm::send will throw an error if given an undefined action parameter
nhunzaker
published 5.0.0 •

Changelog

Source

5.0.0

Version 5 represents an attempt to address some growth pains from rapidly adding new features to Microcosm. Names have been changed to improve consistency and internal APIs have been refactored. The overall surface area of the app has been reduced and more opinions have been made.

  • Renamed Microcosm::seed to Microcosm::push
  • Renamed Microcosm::get to Microcosm::pull
  • Removed Microcosm::has
  • Removed Microcosm::getInitialState. the Store API still provides this function, however it is the expectation of the system that value of state is a primitive object. This is so that Microcosm always knows how to smartly clone its state, regardless of if another data library is used for its values.
  • Removed Microcosm::swap, this was an internal API that is no longer required
  • Renamed Microcosm::reset to Microcosm::commit
  • Removed Microcosm::shouldUpdate. If no stores respond to an action, a change event will not fire anyway. Placing this concern in the view layer keeps React's shouldComponentUpdate as the single responsibility for this task.
  • Added Microcosm::toObject
  • Internal function mapBy has been renamed to remap. It now operates primarily upon objects.
  • Microcosm::pump is now Microcosm::emit, this is to better match existing event emitter libraries (including the one in Node's standard library)

As an additional illustration, the Microcosm API has been logistically sorted within ./cheatsheet.md

nhunzaker
published 4.0.0 •

Changelog

Source

4.0.0

  • Added concept of plugins. Plugins provide a way to layer on additional functionality. This has specifically been added so that environment specific behavior may be added to an app.
  • Added Microcosm::start. Calling start() will bootstrap initial state, run all plugins, then execute a callback.
nhunzaker
published 3.3.0 •

Changelog

Source

3.3.0

  • mapBy internal function now accepts an initial value
  • Changed Microcosm::dispatch copy strategy. Instead of merging a change set, it now directly modifies a clone of the previous state.
  • Added Microcosm::clone. This method defines how state is copied before dispatching an action.
nhunzaker
published 3.2.0 •

Changelog

Source

3.2.0

  • Changed default shouldUpdate algorithm
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