[Snyk] Upgrade mobx-state-tree from 1.0.1 to 5.1.0 #25
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Snyk has created this PR to upgrade mobx-state-tree from 1.0.1 to 5.1.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
Warning: This is a major version upgrade, and may be a breaking change.
Release notes
Package name: mobx-state-tree
mobx-state-tree changes
Note from the maintainer: we are releasing a "feature-level" 5.x release due to
mst-middlewares
andmobx-state-tree
versions being synchronized. However,mobx-state-tree
does not have any significant changes in this release. We plan to decouplemst-middlewares
andmobx-state-tree
in the future to avoid this issue. Sorry about any issues this causes!mst-middlewares changes
This patch-level release fixes an issue with snapshots being preprocessed twice in some instances. Thanks to @ adamkovalsky for the PR (#1822)!
If there are any problems with this release, please file an issue or leave comments in the attached Discussion! Thanks to everyone who contributed!
This patch-level release fixes three issues with node reconciliation. Thanks to @ adamkovalsky for the PR!
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.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.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!
This patch-level release has a few small updates:
If there are any problems with this release, please file an issue or leave comments in the attached Discussion! Thanks to everyone who contributed!
This patch-level release fixes #1702, "MST should work with useProxies:
ifAvailable
option from mobx." It should be fully backwards-compatible with previous 5.x releases.MobX 6.0 was released recently and
ifAvailable
was broken in MST. This PR fixes that.Thanks to @ BATCOH for reporting the issue and the PR fixing it!
This release fixes #1653 (PR #1656). MobX 6.1.0 introduced a new issue and this addresses that. Thanks to @ urugator!
There should be no breaking changes.
This new approach, replacing
makeObservable
with manually created actions and computed views, also seems to have improved instance instantiation speed (MyModel.create()
) by about 20% in @ jamonholmgren's benchmarks.Please report any new bugs and we will address as soon as possible. We wanted to get this fix into the hands of users ASAP as previously doing
yarn add mobx mobx-state-tree
means you would end up with brokenness.What's New
Version 5.0.0 includes bugfixes that may in rare cases cause breaking changes if relying on undocumented behavior. Most apps should be able to upgrade without problems. Please file an issue if you upgrade and it causes any new bugs.
Bugfixes
•
isPlainObject()
supports objects from another window (#1584 by @ ConneXNL)• Models from snapshot processors can now be added to maps (#1581 by @ kidroca)
•
applyPatch
can now replace root of store if path is empty (#1522 by @ epodgaetskiy)Bug Fixes
• Add missing type definitions for onInvalidated in safeReference -- #1610 by @ getkey
Version 4
(This version is tagged 4.0.2, but is the first release in the v4 major version.)
BREAKING CHANGE
MobX 6 is now supported! This version of MobX replaces MobX 4 and MobX 5, and works in environments that support Proxy as well as those that don't. In the past, MobX 4 was for environments without Proxy, and MobX 5 was for those which supported Proxy. MobX 6 works in both.
Note that MobX-State-Tree v4 will only work with MobX 6, so if you need to stay on MobX 4 or 5, you'll need to also stay on MST 3.
New Maintainer
@ jamonholmgren is now taking over as lead maintainer. Stay tuned for more announcements and an updated roadmap.
No content.
Commit messages
Package name: mobx-state-tree
Compare
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs