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

microcosm

Package Overview
Dependencies
Maintainers
1
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

12.6.1

Diff

Changelog

Source

12.6.1

  • Corrected generator check to be resistant to minification
nhunzaker
published 12.6.1-alpha •

nhunzaker
published 12.6.0 •

Changelog

Source

12.6.0

  • Actions may now create workflows of sequential actions using generators. See ./docs/api/actions for more information
  • Added WrappedComponent property to the component returned from withSend(). This may be used to access the original component.
  • Added strict mode validations for undefined Domain registrations
nhunzaker
published 12.6.0-rc2 •

nhunzaker
published 12.6.0-rc •

nhunzaker
published 12.6.0-beta •

nhunzaker
published 12.5.0 •

Changelog

Source

12.5.0

  • Added a defaults static to Microcosm that passes default options to the constructor and setup method.
  • The first argument of setup, the options object passed when instantiating a Microcosm argument, will always be an object. There is no need to handle the null case for options.
  • Added a strict mode build of Microcosm that ships with development assertions. See installation.md for more details

Defaults

We frequently pass custom options into Microcosm to configure Domains and Effects with different options based on the environment. For example, an Effect that auto-saves user data:

class Repo extends Microcosm {
  setup({ saveInterval }) {
    // ...
    this.addEffect(Autosave, { saveInterval })
  }
}

It can be cumbersome to chase down the default options, which may be specified as defaults in individual domains/effects. With this release, you may now define defaults using the defaults static:

class Repo extends Microcosm {
  static defaults = {
    saveInterval: 5000
  }

  setup({ saveInterval }) {
    // ...
    this.addEffect(Autosave, { saveInterval })
  }
}

This takes advantage of the Class Fields & Static Properties Spec. This specification is still at Stage 2, however it has become common place to use this feature within React projects. If living on the edge isn't your thing, defaults may also be configured by assigning a default property to your Microcosm subclass:

class Repo extends Microcosm {
  setup({ saveInterval }) {
    // ...
    this.addEffect(Autosave, { saveInterval })
  }
}

Repo.defaults = {
  saveInterval: 5000
}

All Microcosm specific options, such as maxHistory will get merged into your custom defaults upon construction.

nhunzaker
published 12.5.0-beta •

nhunzaker
published 12.4.0 •

Changelog

Source

12.4.0

  • Added repo.history.wait() and repo.history.then() to allow tests to wait for all outstanding actions to complete.
  • Added repo.history documentation.
viget
published 12.3.1 •

Changelog

Source

12.3.1

  • Fix bug where Presenters weren't intercepting actions sent from child views.
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