This repository was archived by the owner on Mar 18, 2019. It is now read-only.
chore(deps): update dependency mobx to v5#39
Open
renovate[bot] wants to merge 1 commit intomasterfrom
Open
Conversation
56c396f to
1637f8e
Compare
1637f8e to
09c1edd
Compare
497c457 to
5cea79f
Compare
3cb7241 to
cb66122
Compare
cb66122 to
b8471ec
Compare
77dbbff to
4f6e154
Compare
4f6e154 to
ca0cb7e
Compare
ca0cb7e to
fc0d49e
Compare
fc0d49e to
cc71bac
Compare
cc71bac to
ce2fb31
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR contains the following updates:
4.3.0->5.9.0Release Notes
mobxjs/mobx
v5.9.0Compare Source
Features
observable.boxnow accepts anequalsoption, to be able to pass a custom comparision function. Through #1862, #1874 by @fi3ework. Fixes #1580Fixes
flow, see #1827 by @xaviergonztrace(true)not being able to handle multi-line comments in traced function. Fixes #1850@computednow introduces non-configurable properties, to fail fast on incorrect inheritance or property deletion. Fixes #1867enforceActionsandisolateGlobalStatenow work correctly when used together. Fixes #1869v5.8.0Compare Source
flowin TypeScript 3. Fixes #1816 through #1825 by ismailhabibIGNORE_MOBX_MINIFIY_WARNING=trueto skip the built-in minification warning. See #1835 by fi3eworkv5.7.0Compare Source
@computedon a React component. The MobX 5 behavior here has been reverted to the MobX 4 behavior.v5.6.0Compare Source
keepAlivehas become smarter and won't recomputed computed values that are kept alive, as long as they aren't read. Implements #1534undefinedwas undetectedv5.5.2Compare Source
toJSnot handlingnullvalues correctly. Fixes #1557 through #1783 by @wangyiz4262v5.5.1Compare Source
toJSnow has arecurseEverythingeverything option, that even detects and converts observable objects that are "behind" non-observable objects. See #1699 by wangyiz4262comparer, see #1751 by pdongv5.5.0Compare Source
(Minor version of
5was bumped significantly to make the number better correlate together :-))extendObservablein a class constructor caused errors to be throwndelete-ing a property was not always picked up by the reactivity systemremove()-ing a property was not always picked up by thehas()andget()utilitieshasnow returnstruefor computed fieldsgetnow returns a value for computed fields_allowStateChangeInsideComputed. Don't use it :-).v5.1.2Compare Source
toStringdoes not behave correctly.v5.1.1Compare Source
decorate, see #1711 by makepostv5.1.0Compare Source
configure({ isolateGlobalState: true }). Note that this means that observables from the different MobX instances won't cooperate. Fixes #1681, #1082enforceActionsoptions now supports the values:"never","observed"and"always"to make the behavior more clear. Fixes #1680, #1473v5.0.5Compare Source
v5.0.4Compare Source
IAutorunOptionsdecoratenow can apply multiple decorators, by accepting an array and applying them right to left:decorate(Todo, { title: [serializable(primitive), persist('object'), observable] }). By @ramybenaroya through #1691 and #1686flowso that it accepts async generators. By @dannsam through #1656 and #1655keys()now also supports arrays. Fixes #1600 through #1601 by @nunocastromartinsv5.0.3Compare Source
v5.0.2Compare Source
v5.0.0Compare Source
Release blogpost
Proxy support!
MobX 5 is the first MobX version fully leveraging Proxies. This has two big advantages
The system requirements to run MobX has been upped
Proxies. In practice this means, no Internet Explorer (Edge is fine). No nodejs < 6. React Native on Android only when JavaScript core is upgraded. All modern browsers are supported.Breaking changes
ProxyAPI.spyhas become a no-op in production buildsarray.moveandarray.peekare removed from the APIarray.findandarray.findIndexsince they were not standardized in ES..$mobxproperty has been dropped from all observables and replaced by a Symbol. Instead of usingx.$mobx.name, useimport { $mobx } from "mobx"; x[$mobx].nameetc.New features
proxy: falseargument toobservable.objectto disable proxying (theoretically slightly faster, but removes no dynamic key addition)Known Issues
[mobx] Dynamic observable objects cannot be frozen]. A place where that might happen unexpectedly is when passing an observable object asstyleproperty to a React component. Like<span style={someObservableObject} />, since React will freeze all style objects. The work-around is to simply pass a fresh, non-observable object for styling like:<span style={{...someObservableObject}} />.If you are usingFixed in mobx-react 5.2.1. But note that you should still migrate away frommobxwithmobx-react, and you are upgradingmobx-reactto the MobX 5 compatible version (mobx-react@5.2.0) you will notice thatthis.propsorthis.stateare not yet observable in theconstructororcomponentWillMount. This is for forward compatibility with React 16.3 wherecomponentWillMounthas been deprecated. In most cases usingcomponentDidMountinstead will suffice, especially when the goal is to setup reactions. For more info see #478.componentWillMount😎.toEqualmight throw an errorallKeys[x].match is not a functionwhen trying to equal observable arrays. This is a bug in Jest report. The simple work around for now is to slice (ortoJSif the problem is recursive) the array first.toEqualmatcher might no longer correctly equal your class instances, complaining about differences in the MobX adminstration. This is due to a bug with the processing of symbols: report. For now you might want to use a custom matcher if you are directly equalling observable objects. As a work aroundtoJS(object)could be used before diffing.Note June 7th, 2018: Both issues are already in Jest master and should be released soon.
Migration guide
slice()arrays when passing them to external libraries. (Note you still shouldn't pass observable data structures to non-observerReact components, which is an orthogonal concept)reverseorsortoperations directly on observableArray's anymore, as it's behavior slightly differed from the built-in implementations of those methods. Instead useobservableArray.slice().sort()to perform the sort on a copy. This gives no additional performance overhead compared to MobX 4. (The reason behind this is that built-insortupdates the array in place, but the observable array implementation always performed the sort on a defensive copy, and this change makes that explicit).isArrayLike()sinceArray.isArray()will now return true for observable arraysAPI's that have been dropped
arrayBuffersetting is no longer supported byconfigure(it has become irrelevant)observable.shallowBox,observable.shallowArray,observable.shallowMap,observable.shallowObject,extendShallowObservableapi's have been removed. Instead, pass{ deep: false }to their non-shallow counter parts.observableArray.peek,observableArray.movev4.9.3Compare Source
observable.setcompatibility with IE 11, see #1917 by kalmiv4.9.2Compare Source
Symbolbreaking Internet Explorer / React Native compatibility.v4.9.1Compare Source
toJS: observable maps were not properly serialized. Fixes #1875v4.9.0Compare Source
Features
observable.boxnow accepts anequalsoption, to be able to pass a custom comparision function. Through #1862, #1874 by @fi3ework. Fixes #1580Fixes
flow, see #1827 by @xaviergonztrace(true)not being able to handle multi-line comments in traced function. Fixes #1850@computednow introduces non-configurable properties, to fail fast on incorrect inheritance or property deletion. Fixes #1867enforceActionsandisolateGlobalStatenow work correctly when used together. Fixes #1869v4.8.0Compare Source
flowin TypeScript 3. Fixes #1816 through #1825 by ismailhabibIGNORE_MOBX_MINIFIY_WARNING=trueto skip the built-in minification warning. See #1835 by fi3eworkv4.7.0Compare Source
@computedon a React component. The MobX 5 behavior here has been reverted to the MobX 4 behavior.v4.6.0Compare Source
keepAlivehas become smarter and won't recomputed computed values that are kept alive, as long as they aren't read. Implements #1534undefinedwas undetectedv4.5.2Compare Source
toJSnot handlingnullvalues correctly. Fixes #1557 through #1783 by @wangyiz4262v4.5.1Compare Source
toJSnow has arecurseEverythingeverything option, that even detects and converts observable objects that are "behind" non-observable objects. See #1699 by wangyiz4262comparer, see #1751 by pdongv4.5.0Compare Source
(Minor version of
5was bumped significantly to make the number better correlate together :-))extendObservablein a class constructor caused errors to be throwndelete-ing a property was not always picked up by the reactivity systemremove()-ing a property was not always picked up by thehas()andget()utilitieshasnow returnstruefor computed fieldsgetnow returns a value for computed fields_allowStateChangeInsideComputed. Don't use it :-).v4.4.2Compare Source
toStringdoes not behave correctly.v4.4.1Compare Source
decorate, see #1711 by makepostv4.4.0Compare Source
configure({ isolateGlobalState: true }). Note that this means that observables from the different MobX instances won't cooperate. Fixes #1681, #1082enforceActionsoptions now supports the values:"never","observed"and"always"to make the behavior more clear. Fixes #1680, #1473v4.3.2Compare Source
IAutorunOptionsdecoratenow can apply multiple decorators, by accepting an array and applying them right to left:decorate(Todo, { title: [serializable(primitive), persist('object'), observable] }). By @ramybenaroya through #1691 and #1686flowso that it accepts async generators. By @dannsam through #1656 and #1655keys()now also supports arrays. Fixes #1600 through #1601 by @nunocastromartinsv4.3.1Compare Source
$mobxexport symbol for MobX 5 forward compatibityRenovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR becomes conflicted, or if you modify the PR title to begin with "
rebase!".🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Renovate Bot. View repository job log here.