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-pre-alpha

Diff

nhunzaker
published 8.2.0-rc3 •

nhunzaker
published 8.2.0-rc2 •

nhunzaker
published 8.2.0-rc1 •

nhunzaker
published 8.2.0-alpha •

nhunzaker
published 8.1.0 •

Changelog

Source

8.1.0

Noticeable changes

  • Stores no longer return this from register() by default. This is a potentially breaking change, however should not pose a problem to projects using idiomatic Store registration.
  • Scope of store reducers when dispatching will always be the Store

Internal Changes

  • Added plugin class to manage defaults
  • tag now includes the name of the function in toString()
  • Unique ids for plugins and actions are internally generated with counters
nhunzaker
published 8.1.0-alpha •

nhunzaker
published 8.0.0 •

Changelog

Source

8.0.0

Noticeable changes

  • Stores now contain the logic for how it should receive an action. logic is contained under send.
  • Stores now contain the logic to determine what method should resolve an action sent to it. This is defined in register
  • Microcosm::deserialize will now only operate on the keys provided by the seed object. This means that data passed into replace will only blow way keys provided in the data object.
  • The signaling logic for dispatching actions will throw an error if the action provided is not a function
  • Internalized tag, it will now lazy evaluate as actions are fired
  • Upgraded Foliage, Microcosm now contains subscribe, unsubscribe, and publish aliases for listen, ignore, and publish

Breaking Changes

  • Remove all uses of the tag module.
Changes to Stores

Before this release, stores would listen to actions using the stringified value of their functions:

var MyStore = {
  [Action.add](state, params) {}
}

This was terse, however required actions to be tagged with a special helper method. It also required any module that needed access to a Store's method to also know what actions it implemented.

To address these concerns, Stores now communicate with a Microcosm using the register method:

var MyStore = {
  register() {
    return {
      [Action.add]: this.add
    }
  },
  add(state, params) {}
}

Under the hood, Microcosm tags functions automatically.

nhunzaker
published 8.0.0-beta •

nhunzaker
published 8.0.0-alpha3 •

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