Releases: mobxjs/mobx-state-tree
Version 5.1.7
This is a minor release removing the deprecation notice from preProcessSnapshot and postProcessSnapshot. Thanks to @jamonholmgren for #1986.
Please report any issues!
Version 5.1.6
This is a minor release fixing the types to allow readonly arrays. Thanks to @adamkovalsky for #1936. Fixes #1676.
Please report any issues!
Version 5.1.5
What's Changed
- Fix: Don't override reconciliation type for unions in snapshotProcessors by @Tucker-Eric in #1887 (This fixes an infinite recursion when using a union wrapped in a snapshotProcessor.)
Version 5.1.4
v5.1.3
This is just a version bump due to CI / release snafus. You can safely ignore.
Full Changelog: v5.1.2...v5.1.3
Version 5.1.2
What's Changed
Full Changelog: v5.1.1...v5.1.2
Version 5.1.1
Version 5.1.0
mobx-state-tree changes
Note from the maintainer: we are releasing a "feature-level" 5.x release due to mst-middlewares
and mobx-state-tree
versions being synchronized. However, mobx-state-tree
does not have any significant changes in this release. We plan to decouple mst-middlewares
and mobx-state-tree
in the future to avoid this issue. Sorry about any issues this causes!
- Docs: Include Instance import in docs (#1834 by @hgulersen and @elektronik2k5)
- CI: Return coverage report (#1819 by @pustovalov)
- Minor refactors (#1800, #1801, #1802 by @rluvaton)
mst-middlewares changes
- Add includeHooks flag to UndoManager (#1796 by @andrezzoid)
- Update mobx-state-tree peerDependency in mst-middlewares (#1824 by @Tucker-Eric, @FreeFrags, and @ruudandriessen)
Version 5.0.5
This patch-level release fixes an issue with snapshots being preprocessed twice in some instances. Thanks to @adamkovalsky for the PR (#1822)!
- Fixes a regression introduced in #1792 where a snapshot preprocessor gets called on an already preprocessed snapshot, resulting in potential errors.
If there are any problems with this release, please file an issue or leave comments in the attached Discussion! Thanks to everyone who contributed!
Version 5.0.4
This patch-level release fixes three issues with node reconciliation. Thanks to @adamkovalsky for the PR!
- Adds a
getReconcilationType
method toBaseNode
, which returns the type which should be used for reconcilating the node. This is normally the node'stype
, but in the case ofsnapshotProcessor
it is overridden to be thesnapshotProcessor
type. This is necessary so that the union typereconcile
can correctly reconcile the "current" node first if it's possible. This fixes #1791. - Fixes the
snapshotProcessor
type'sisValidSnapshot
andis
methods to return a validation error and not to throw if the specified preprocessor fails, which can happen when checking if an arbitrary snapshot is valid input (e.g. when determining a union type). We can't expect preprocessors to accept any arbitrary input, so we must assume they can throw when provided with invalid snapshots. This also fixes #1777. - Fixes the array's
areSame
utility to first check that the provided value is a valid snapshot before callingisMatchingSnapshotId
, to avoid the preprocessor throwing an error if the provided snapshot is invalid.
If there are any problems with this release, please file an issue or leave comments in the attached Discussion! Thanks to everyone who contributed!