Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mobx-state-tree

Package Overview
Dependencies
Maintainers
5
Versions
129
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx-state-tree - npm Package Versions

1
13

1.1.1

Diff

Changelog

Source

1.1.1

Improvements

  • Fixed an issue where nodes where not always created correctly, see #534. Should fix #513 and #531.
  • All tests are now run in both PROD and non PROD configurations, after running into some bugs that only occurred in production builds.
  • Some internal optimizations have been applied (and many more will follow). Like having internal leaner node for immutable data. See #474
  • A lot of minor improvements on the docs
mweststrate
published 1.1.0 •

Changelog

Source

1.1.0

Improvements

  • The concept of process (asynchronous actions) has been renamed to flows. (Mainly to avoid issues with bundlers)
  • We changed to a lerna setup which allows separately distributing middleware and testing examples with more ease
  • Every MST middleware is now shipped in a separate package named mst-middlewares. They are now written in TypeScript and fully transpiled to ES5 to avoid problems with uglifyjs in create-react-app bundling.
  • Introduced createActionTrackingMiddleware, this significantly simplifies writing middleware for common scenarios. Especially middleware that deals with asynchronous actions (flows)
  • Renamed process to flow. Deprecated process.
  • BREAKING As a result some middleware event names have also been changed. If you have custom middlewares this change might affect you. Rename middleware event type prefixes starting with process to now start with flow.

Fixes

  • Fixed nested maps + environments not working correctly, #447 by @xaviergonz
  • Improved typescript typings for enumerations, up to 50 values are now supported #424 by @danielduwaer
mweststrate
published 1.0.1 •

Changelog

Source

1.0.1

Features

  • Added the middlewares atomic and types TimeTraveller, UndoManager. Check out the docs!
  • Introduced createActionTrackingMiddleware to simplify the creation of middleware that support complex async processes
  • exposed typecheck(type, value) as public api (will ignore environment flags)

Improvements

  • getEnv will return an empty object instead of throwing when a tree was initialized without environment
  • Fixed issue where patches generated for nested maps were incorrect (#396)
  • Fixed the escaping of (back)slashes in JSON paths (#405)
  • Improved the algorithm that reconcile items in an array (#384)
  • Assigning a node that has an environment to a parent is now allowed, as long as the environment is strictly the same (#387)
  • Many minor documentation improvements. Thanks everybody who created a PR!
mweststrate
published 1.0.0 •

Changelog

Source

1.0.0

No changes

mweststrate
published 0.12.0 •

Changelog

Source

0.12.0

  • BREAKING The redux utilities are no longer part of the core package, but need to be imported from mobx-state-tree/middleware/redux.
mweststrate
published 0.11.0 •

Changelog

Source

0.11.0

Breaking changes

  • BREAKING onAction middleware no longer throws when encountering unserializable arguments. Rather, it serializes a struct like { $MST_UNSERIALIZABLE: true, type: "someType" }. MST Nodes are no longer automatically serialized. Rather, one should either pass 1: an id, 2: a (relative) path, 3: a snapshot
  • BREAKING revertPatch has been dropped. IReversableJsonPatch is no longer exposed, instead use the inverse patches generated by onPatch
  • BREAKING some middleware events have been renamed: process_yield -> process_resume, process_yield_error -> process_resume_error, to make it less confusing how these events relate to yield statements.
  • BREAKING patchRecorder's field patches has been renamed to rawPatches,cleanPatchestopatches, andinversePatches` was added.

New features

  • Introduced decorate(middleware, action) to easily attach middleware to a specific action
  • Handlers passed to onPatch(handler: (patch, inversePatch) => void) now receive as second argument the inverse patch of the emitted patch
  • onAction lister now supports an attachAfter parameter
  • Middleware events now also contain parentId (id of the causing action, 0 if none) and tree (the root of context)

Fixes

  • ReduxDevTools connection is no longer one step behind #287
  • Middleware is no longer run as part of the transaction of the targeted action
  • Fixed representation of union types in error messages
mattiamanzati
published 0.10.3 •

Changelog

Source

0.10.3

  • BREAKISH Redefining lifecycle hooks will now automatically compose them, implements #252
  • Added dev-only checks, typecheck will be performed only in dev-mode and top-level API-calls will be checked.
  • The internal types IMiddleWareEvent, IMiddlewareEventType, ISerializedActionCall are now exposed (fixes #315)
mweststrate
published 0.10.2 •

Changelog

Source

0.10.2

  • Object model instances no longer share a prototype.
mweststrate
published 0.10.1 •

Changelog

Source

0.10.1

  • Removed accidental dependency on the codemod
mweststrate
published 0.10.0 •

Changelog

Source

0.10.0

  • BREAKING the syntax to define model types has been updated. See the updated docs or the original proposal:#282, but no worries, theres a codemod! :D
  • BREAKING preProcessSnapshot hook is no longer a normal hook that can be defined as action. Instead, it should be defined on the type using types.model(...).preProcessSnapshot(value => value)
  • BREAKING Asynchronous process should now be defined using process. See this example or the asynchronous action docs.

How to run the codemod?

The codemod is provided as npm package command line tool. It has been written using the TypeScript parser, so it will successfully support either TS or regular JavaScript source files.

To run the codemod, you need to first install it globally by npm install -g mst-codemod-to-0.10. After that, the mst-codemod-to-0.10 command will be available in your command line.

To perform the codemod, you need to call in your command line mst-codemod-to-0.10 followed by the filename you want to codemod. A .bak file with the original source will be created for backup purposes, and the file you provided will be updated to the new syntax! Have fun!

PS: You could also use npx instead of installing the codemod globally! :)

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