mobx 6.0.0 → 6.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +141 -117
- package/README.md +6 -3
- package/dist/api/annotation.d.ts +1 -1
- package/dist/api/makeObservable.d.ts +1 -1
- package/dist/core/action.d.ts +1 -1
- package/dist/core/computedvalue.d.ts +1 -1
- package/dist/mobx.cjs.development.js +53 -32
- package/dist/mobx.cjs.development.js.map +1 -1
- package/dist/mobx.cjs.production.min.js +1 -1
- package/dist/mobx.cjs.production.min.js.map +1 -1
- package/dist/mobx.esm.development.js +5109 -0
- package/dist/mobx.esm.development.js.map +1 -0
- package/dist/mobx.esm.js +51 -32
- package/dist/mobx.esm.js.map +1 -1
- package/dist/mobx.esm.production.min.js +2 -0
- package/dist/mobx.esm.production.min.js.map +1 -0
- package/dist/mobx.umd.development.js +53 -32
- package/dist/mobx.umd.development.js.map +1 -1
- package/dist/mobx.umd.production.min.js +1 -1
- package/dist/mobx.umd.production.min.js.map +1 -1
- package/dist/utils/utils.d.ts +1 -1
- package/package.json +72 -138
- package/src/api/annotation.ts +1 -1
- package/src/api/makeObservable.ts +12 -9
- package/src/core/action.ts +4 -4
- package/src/core/computedvalue.ts +1 -1
- package/src/types/observableobject.ts +8 -3
- package/src/types/observablevalue.ts +2 -1
- package/src/utils/global.ts +16 -3
- package/src/utils/utils.ts +2 -2
- package/dist/index.js.flow +0 -591
package/CHANGELOG.md
CHANGED
|
@@ -1,33 +1,57 @@
|
|
|
1
|
-
#
|
|
1
|
+
# mobx
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
## 6.0.4
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
### Patch Changes
|
|
6
6
|
|
|
7
|
-
- [`
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
- [`79a09f49`](https://github.com/mobxjs/mobx/commit/79a09f49a9f2baddbab8d89e9a7ac07cffadf624) [#2615](https://github.com/mobxjs/mobx/pull/2615) Thanks [@urugator](https://github.com/urugator)! - Fix [#2614](https://github.com/mobxjs/mobx/issues/2614) - `makeObservable` does not respect `options.name`
|
|
8
|
+
|
|
9
|
+
## 6.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`d0e6778d`](https://github.com/mobxjs/mobx/commit/d0e6778de73f6dfad61283c04103049732b2aea2) - Create ESM bundles with NODE_ENV correctly replaced so it can be used in browser (#2564)
|
|
14
|
+
|
|
15
|
+
## 6.0.2
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [`b5d64d19`](https://github.com/mobxjs/mobx/commit/b5d64d1965ecd9a593886279ddaf96eda61c4a77) [#2548](https://github.com/mobxjs/mobx/pull/2548) Thanks [@urugator](https://github.com/urugator)! - Fixed [2542](https://github.com/mobxjs/mobx/issues/2542), makeAutoObservable not respecting deep option [@urugator](https://github.com/urugator)
|
|
20
|
+
|
|
21
|
+
* [`f4c22925`](https://github.com/mobxjs/mobx/commit/f4c229259a72f0497d3f9b6a05af9d9c4280d8b1) [#2582](https://github.com/mobxjs/mobx/pull/2582) Thanks [@tomenden](https://github.com/tomenden)! - Support running in a web-worker
|
|
22
|
+
|
|
23
|
+
## 6.0.1
|
|
24
|
+
|
|
25
|
+
- Fixed issue in TS typings of `makeObservable` in combination with a member named `toString()`
|
|
26
|
+
|
|
27
|
+
## 6.0.0
|
|
28
|
+
|
|
29
|
+
### New features
|
|
30
|
+
|
|
31
|
+
- [`makeObservable(target, annotations)`](./docs/observable-state.md#makeobservable) is now the recommended way to make objects with a fixed shape observable, such as classes.
|
|
32
|
+
- [`makeAutoObservable(target)`](./docs/observable-state.md#makeautoobservable) will automatically determine the annotations used by `makeObservable`. Methods will be marked as 'autoAction', so that they can be used both from a computed value or as standalone method.
|
|
33
|
+
- MobX 6 can be used in both modern environments, and environments that don't support Proxy. So both MobX 4 and 5 users can upgrade to 6. See [proxy support](./docs/configuration.md#proxy-support) for more details.
|
|
10
34
|
- `observable.array` now supports `{ proxy: false }` as option.
|
|
11
35
|
- `reaction`'s effect function now receives the previous value seen by the reaction as second argument.
|
|
12
|
-
- `flow` can now be used as annotation as well. You might need `flowResult` in case you use TypeScript to extract the correct result type. [details](
|
|
36
|
+
- `flow` can now be used as annotation as well. You might need `flowResult` in case you use TypeScript to extract the correct result type. [details](./docs/actions.md#using-flow-instead-of-async--await-).
|
|
13
37
|
|
|
14
|
-
|
|
38
|
+
### Breaking changes
|
|
15
39
|
|
|
16
|
-
|
|
40
|
+
#### Changes that might affect you
|
|
17
41
|
|
|
18
42
|
- The `decorate` API has been removed, and needs to be replaced by `makeObservable` in the constructor of the targeted class. It accepts the same arguments. The `mobx-undecorate` can transform this automatically.
|
|
19
43
|
- When using `extendObservable` / `observable`, fields that contained functions used to be turned into observables. This is no longer the case, they will be converted into `autoActions`.
|
|
20
|
-
- [Strict mode](
|
|
44
|
+
- [Strict mode](./docs/configuration.md#enforceactions) for actions is now enabled by default in `observed` mode.
|
|
21
45
|
- `toJS` no longer takes any options. It no longer converts Maps and Sets to plain data structures. Generic, flexible serialization of data structures is out of scope for the MobX project, and writing custom serialization methods is a much more scalable approach to serialization (tip: leverage `computed`s to define how class instances should be serialized).
|
|
22
46
|
- The methods `intercept` and `observe` are no longer exposed on observable arrays, maps and boxed observables. Import them as utility from mobx instead: `import { observe, intercept } from "mobx"`, and pass the collection as first argument: `observer(collection, callback)`. Note that we still recommend to avoid these APIs.
|
|
23
47
|
- `observableMap.toPOJO()`, `observableMap.toJS()` have been dropped. Use `new Map(observableMap)` instead if you want to convert an observable map to a plain Map shallowly.
|
|
24
48
|
- `observableMap.toJSON()` now returns an entries array rather than a new Map, to better support serialization.
|
|
25
49
|
- `observableSet.toJS()` has been dropped. Use `new Set(observableSet)` instead if you want to convert an observable Set to a plain Set shallowly.
|
|
26
|
-
- `
|
|
50
|
+
- `observableSet.toJSON()` now returns an array rather than a new Set, to better support serialization.
|
|
27
51
|
- Sorting or reversing an observableArray in a derivation (without slicing first) will now throw rather than warn. In contrast, it is now allowed to sort or reverse observable arrays in-place, as long as it happens in an action.
|
|
28
52
|
- `isArrayLike` is no longer exposed as utility. Use `Array.isArray(x) || isObservableArray(x)` instead.
|
|
29
53
|
|
|
30
|
-
|
|
54
|
+
#### Obscure things that don't work anymore, but that probably won't affect you
|
|
31
55
|
|
|
32
56
|
- It is no longer possible to re-decorate a field (through either `@observable` or `makeObservable`) that is already declared in a super class.
|
|
33
57
|
- `runInAction` no longer supports passing a name as first argument. Name the original function or use `action(name, fn)()` if you care about the debug name.
|
|
@@ -43,24 +67,24 @@
|
|
|
43
67
|
- The second argument to the `reaction` effect function, the disposer object, is now passed in as third argument. The second argument is now the previous value seen by the reaction.
|
|
44
68
|
- `onBecomeObserved` / `onBecomeUnobserved` will now only trigger for observables that are actually used by a reaction (see [#2309](https://github.com/mobxjs/mobx/issues/2309) for background).
|
|
45
69
|
|
|
46
|
-
|
|
70
|
+
### Fixes
|
|
47
71
|
|
|
48
72
|
- [#2326](https://github.com/mobxjs/mobx/issues/2326): Incorrect `this` for array callbacks such as in `array.forEach`
|
|
49
73
|
- [#2379](https://github.com/mobxjs/mobx/issues/2379): Fixed issue with `array.concat`
|
|
50
74
|
- [#2309](https://github.com/mobxjs/mobx/issues/2309): Fixed several inconsistencies between keepAlive'd computed values and `on(un)BecomeObserved`
|
|
51
75
|
- Fixed several inconsistencies when `on(un)BecomeObserved` was triggered for observables changed in actions without having an observer
|
|
52
76
|
|
|
53
|
-
|
|
77
|
+
## 5.15.7 / 4.15.7
|
|
54
78
|
|
|
55
79
|
- Fixed [2438](https://github.com/mobxjs/mobx/issues/2438), factory types caused eslint warnings, by [@amareis](https://github.com/Amareis) through [2439](https://github.com/mobxjs/mobx/pull/2439)
|
|
56
80
|
- Fixed [2432](https://github.com/mobxjs/mobx/issues/2423), array.reduce without initial value by [@urugator](https://github.com/urugator)
|
|
57
81
|
|
|
58
|
-
|
|
82
|
+
## 5.15.6 / 4.15.6
|
|
59
83
|
|
|
60
84
|
- Fixed [2423](https://github.com/mobxjs/mobx/issues/2423), array methods not dehancing by [@urugator](https://github.com/urugator)
|
|
61
85
|
- Fixed [2424](https://github.com/mobxjs/mobx/issues/2424) Map / Set instantiation triggering a strict warning, through [#2425](https://github.com/mobxjs/mobx/pull/2425) by [@moonball](https://github.com/moonball)
|
|
62
86
|
|
|
63
|
-
|
|
87
|
+
## 5.15.5 / 4.15.5
|
|
64
88
|
|
|
65
89
|
- Fixed ObservableSet.prototype.forEach not being reactive in 4.x [#2341](https://github.com/mobxjs/mobx/pull/2341) by [@melnikov-s](https://github.com/melnikov-s)
|
|
66
90
|
- Add error when computed value declared for unspecified getter [#1867](https://github.com/mobxjs/mobx/issues/1867) by [@berrunder](https://github.com/berrunder)
|
|
@@ -72,28 +96,28 @@
|
|
|
72
96
|
- Several performance improvements
|
|
73
97
|
- Dropped `browser` fields from `package.json`
|
|
74
98
|
|
|
75
|
-
|
|
99
|
+
## 5.15.4 / 4.15.4
|
|
76
100
|
|
|
77
101
|
- Fix process.env replacement in build [#2267](https://github.com/mobxjs/mobx/pull/2267) by [@fredyc](https://github.com/fredyc)
|
|
78
102
|
|
|
79
|
-
|
|
103
|
+
## 5.15.3 / 4.15.3
|
|
80
104
|
|
|
81
105
|
- Define action name to be as the function name [#2262](https://github.com/mobxjs/mobx/pull/2262) by [@nadavkaner](https://github.com/nadavkaner)
|
|
82
106
|
|
|
83
|
-
|
|
107
|
+
## 5.15.2 / 4.15.2
|
|
84
108
|
|
|
85
109
|
- Fixed [#2230](https://github.com/mobxjs/mobx/issue/2230) computedvalue: throw error object instead of string when options is empty [#2243](https://github.com/mobxjs/mobx/pull/2243) by [@ramkumarvenkat](https://github.com/ramkumarvenkat)
|
|
86
110
|
- supports ES6 Sets and Maps in shallow comparer. [#2238](https://github.com/mobxjs/mobx/pull/2238) by [@hearnden](https://github.com/hearnden)
|
|
87
111
|
- `extendObservable`: can be used existing properties again. Fixes [#2250](https://github.com/mobxjs/mobx/issue/2250) through [#2252](https://github.com/mobxjs/mobx/pull/2252) by [@davefeucht](https://github.com/davefeucht)
|
|
88
112
|
|
|
89
|
-
|
|
113
|
+
## 5.15.1 / 4.15.1
|
|
90
114
|
|
|
91
115
|
- Make initial values of observable set accept readonly array [#2202](https://github.com/mobxjs/mobx/pull/2202)
|
|
92
116
|
- Expose `_allowStateReadsStart` & `_allowStateReadsEnd`. This is low level stuff you shouldn't need that's mostly useful for library creators. [#2233](https://github.com/mobxjs/mobx/pull/2233)
|
|
93
117
|
- Fixed an issue with `observableRequiresReaction` and updating observable during reaction [#2195](https://github.com/mobxjs/mobx/pull/2196)
|
|
94
118
|
- Improved type inference for `action` [#2213](https://github.com/mobxjs/mobx/pull/2213) ([see detailed explanation](https://github.com/mobxjs/mobx/pull/2218#discussion_r349889440))
|
|
95
119
|
|
|
96
|
-
|
|
120
|
+
## 5.15.0
|
|
97
121
|
|
|
98
122
|
**The minimum required TypeScript version is now 3.6**
|
|
99
123
|
|
|
@@ -103,37 +127,37 @@
|
|
|
103
127
|
- Fixed flow typings for Facebook's Flow. A new `CancellablePromise` Flow type is exported. [#2164](https://github.com/mobxjs/mobx/pull/2164) by [@vonovak](https://github.com/vonovak)
|
|
104
128
|
- Added support for symbol keys on observable properties (MobX 5 only). [#2175](https://github.com/mobxjs/mobx/pull/2175) by [@StephenHaney](https://github.com/StephenHaney)
|
|
105
129
|
|
|
106
|
-
|
|
130
|
+
## 5.14.2
|
|
107
131
|
|
|
108
132
|
- Fixed installation issue trying to run `postinstall` hook for a website [#2165](https://github.com/mobxjs/mobx/issues/2165).
|
|
109
133
|
|
|
110
|
-
|
|
134
|
+
## 5.14.1 / 4.14.1
|
|
111
135
|
|
|
112
136
|
- Fixed a possible issue with action stack errors and multiple mobx versions installed at the same time [#2135](https://github.com/mobxjs/mobx/issues/2135).
|
|
113
137
|
- Added `comparer.shallow` for shallow object/array comparisons [#1561](https://github.com/mobxjs/mobx/issues/1561).
|
|
114
138
|
- Fixed disposing an interception within an interception throwing an error [#1950](https://github.com/mobxjs/mobx/issues/1950).
|
|
115
139
|
|
|
116
|
-
|
|
140
|
+
## 5.14.0 / 4.14.0
|
|
117
141
|
|
|
118
142
|
- Added experimental `reactionRequiresObservable` & `observableRequiresReaction` config [#2079](https://github.com/mobxjs/mobx/pull/2079), [Docs](https://github.com/mobxjs/mobx/pull/2082)
|
|
119
143
|
- Added experimental `requiresObservable` config to `reaction`, `autorun` & `when` options [#2079](https://github.com/mobxjs/mobx/pull/2079), [Docs](https://github.com/mobxjs/mobx/pull/2082)
|
|
120
144
|
|
|
121
|
-
|
|
145
|
+
## 5.13.1 / 4.13.1
|
|
122
146
|
|
|
123
147
|
- Don't use `global` and `self` keywords unless defined. Fixes [#2070](https://github.com/mobxjs/mobx/issues/2070).
|
|
124
148
|
- onBecome(Un)Observed didn't trigger when using number as key of observable map. Fixes [#2067](https://github.com/mobxjs/mobx/issues/2067).
|
|
125
149
|
- Exposed `_startAction` and `_endAction` to be able to start and action and finish it without needing a code block. This is low level stuff you shouldn't need that's mostly useful for library creators.
|
|
126
150
|
|
|
127
|
-
|
|
151
|
+
## 5.13.0 / 4.13.0
|
|
128
152
|
|
|
129
153
|
- Fixed potential memory leak in observable maps, when non-primitive values are used as keys. Fixes [#2031](https://github.com/mobxjs/mobx/issues/2031) through [#2032](https://github.com/mobxjs/mobx/pull/2032).
|
|
130
154
|
- Added support to store additional non-observable(!) fields (string or symbol based) on array, to better reflect behavior of MobX 4. Fixes [#2044](https://github.com/mobxjs/mobx/issues/2044) through [#2046](https://github.com/mobxjs/mobx/pull/2046)
|
|
131
155
|
|
|
132
|
-
|
|
156
|
+
## 5.11.0 / 4.12.0
|
|
133
157
|
|
|
134
158
|
- Added `computedConfigurable` config [#2011](https://github.com/mobxjs/mobx/pull/2011), [#2013](https://github.com/mobxjs/mobx/pull/2014)
|
|
135
159
|
|
|
136
|
-
|
|
160
|
+
## 4.11.0
|
|
137
161
|
|
|
138
162
|
**BREAKING CHANGE**
|
|
139
163
|
|
|
@@ -141,11 +165,11 @@ Reverted the support of Symbols in general in MobX 4, as it gives to many potent
|
|
|
141
165
|
|
|
142
166
|
- Reverted `Symbol` support in observable maps and objects. Reverts [#1944](https://github.com/mobxjs/mobx/pull/1944) through [#1988](https://github.com/mobxjs/mobx/pull/1988). Fixes [#1986](https://github.com/mobxjs/mobx/issues/1986), [#1987](https://github.com/mobxjs/mobx/issues/1987)
|
|
143
167
|
|
|
144
|
-
|
|
168
|
+
## 5.10.1
|
|
145
169
|
|
|
146
170
|
- Fixed a recent regression where array update events would send undefined as `change.object` through [#1985](https://github.com/mobxjs/mobx/pull/1985) by [xaviergonz](https://github.com/xaviergonz)
|
|
147
171
|
|
|
148
|
-
|
|
172
|
+
## 5.10.0 / 4.10.0
|
|
149
173
|
|
|
150
174
|
- Added support for symbol named properties in maps and objects. Fixes [#1809](https://github.com/mobxjs/mobx/issues/1809) and [#1925](https://github.com/mobxjs/mobx/issues/1925) through [#1944](https://github.com/mobxjs/mobx/pull/1944) by [@loklaan](https://github.com/loklaan)
|
|
151
175
|
- Added `set` support for `observable.set`, see [#1945](https://github.com/mobxjs/mobx/pull/1945) by [xaviergonz](https://github.com/xaviergonz)
|
|
@@ -153,24 +177,24 @@ Reverted the support of Symbols in general in MobX 4, as it gives to many potent
|
|
|
153
177
|
- Improved flow typings [#1960](https://github.com/mobxjs/mobx/pull/1960) by [@tbezman](https://github.com/tbezman)
|
|
154
178
|
- Updated tooling, [#1949](https://github.com/mobxjs/mobx/pull/1949) and [#1931](https://github.com/mobxjs/mobx/pull/1931) by [xaviergonz](https://github.com/xaviergonz)
|
|
155
179
|
|
|
156
|
-
|
|
180
|
+
## 5.9.4 / 4.9.4
|
|
157
181
|
|
|
158
182
|
- Allow symbol keys in `ObservableMap`, see [#1930](https://github.com/mobxjs/mobx/pull/1930) by [pimterry](https://github.com/pimterry)
|
|
159
183
|
- Fixed type definitions of `toStringTag` for Maps and Sets, see [#1929](https://github.com/mobxjs/mobx/pull/1929) by [lennerd](https://github.com/lennerd)
|
|
160
184
|
|
|
161
|
-
|
|
185
|
+
## 4.9.3
|
|
162
186
|
|
|
163
187
|
- Fixed `observable.set` compatibility with IE 11, see [#1917](https://github.com/mobxjs/mobx/pull/1917) by [kalmi](https://github.com/kalmi)
|
|
164
188
|
|
|
165
|
-
|
|
189
|
+
## 4.9.2
|
|
166
190
|
|
|
167
191
|
- Fixed regression [#1878](https://github.com/mobxjs/mobx/issues/1878), accidental use of `Symbol` breaking Internet Explorer / React Native compatibility.
|
|
168
192
|
|
|
169
|
-
|
|
193
|
+
## 4.9.1
|
|
170
194
|
|
|
171
195
|
- Fixed regression in `toJS`: observable maps were not properly serialized. Fixes [#1875](https://github.com/mobxjs/mobx/issues/1875)
|
|
172
196
|
|
|
173
|
-
|
|
197
|
+
## 5.9.0 / 4.9.0
|
|
174
198
|
|
|
175
199
|
**Features**
|
|
176
200
|
|
|
@@ -186,7 +210,7 @@ Reverted the support of Symbols in general in MobX 4, as it gives to many potent
|
|
|
186
210
|
- `@computed` now introduces non-configurable properties, to fail fast on incorrect inheritance or property deletion. Fixes [#1867](https://github.com/mobxjs/mobx/issues/1867)
|
|
187
211
|
- The options `enforceActions` and `isolateGlobalState` now work correctly when used together. Fixes [#1869](https://github.com/mobxjs/mobx/issues/1869)
|
|
188
212
|
|
|
189
|
-
|
|
213
|
+
## 5.8.0 / 4.8.0
|
|
190
214
|
|
|
191
215
|
- MobX now requires TypeScript 3 (this was already the case in 5.7.0, but in this version the difference is actually noticeable in the typings).
|
|
192
216
|
- Fixed array dehancer sometimes skipping. Fixes [#1839](https://github.com/mobxjs/mobx/issues/1839) through [#1841](https://github.com/mobxjs/mobx/pull/1841) by [k-g-a](https://github.com/k-g-a)
|
|
@@ -195,34 +219,34 @@ Reverted the support of Symbols in general in MobX 4, as it gives to many potent
|
|
|
195
219
|
- Introduced support for global environment variable `IGNORE_MOBX_MINIFIY_WARNING=true` to skip the built-in minification warning. See [#1835](https://github.com/mobxjs/mobx/pull/1835) by [fi3ework](https://github.com/fi3ework)
|
|
196
220
|
- Fixed onBecome(Un)Observed dispoer cleanup. Fixes [#1537](https://github.com/mobxjs/mobx/issues/1537) through [#1833](https://github.com/mobxjs/mobx/pull/1833) by [fi3ework](https://github.com/fi3ework)
|
|
197
221
|
|
|
198
|
-
|
|
222
|
+
## 5.7.1 / 4.7.1
|
|
199
223
|
|
|
200
224
|
- Fixed [#1839](https://github.com/mobxjs/mobx/issues/1839), ObservableArrayAdministration.dehanceValues does not dehance last value.
|
|
201
225
|
|
|
202
|
-
|
|
226
|
+
## 5.7.0 / 4.7.0
|
|
203
227
|
|
|
204
228
|
- Upgraded typings to TypeScript 3
|
|
205
229
|
- Fixed [#1742](https://github.com/mobxjs/mobx/issues/1742), change detection fails when multiple mobx instances were active.
|
|
206
230
|
- Fixed [#1624](https://github.com/mobxjs/mobx/issues/1624), use built-in flow types for iterators
|
|
207
231
|
- Fixed [#1777](https://github.com/mobxjs/mobx/issues/1777) through [#1826](https://github.com/mobxjs/mobx/pull/1826), stack overflow exception, in development mode, when using `@computed` on a React component. The MobX 5 behavior here has been reverted to the MobX 4 behavior.
|
|
208
232
|
|
|
209
|
-
|
|
233
|
+
## 5.6.0 / 4.6.0
|
|
210
234
|
|
|
211
235
|
- `keepAlive` has become smarter and won't recomputed computed values that are kept alive, as long as they aren't read. Implements [#1534](https://github.com/mobxjs/mobx/issues/1534)
|
|
212
236
|
- Fixed [#1796](https://github.com/mobxjs/mobx/issues/1796), undeleting a property that had an initial value of `undefined` was undetected
|
|
213
237
|
- Improved Flow typings, see [#1794](https://github.com/mobxjs/mobx/pull/1794) and [#1786](https://github.com/mobxjs/mobx/pull/1786)
|
|
214
238
|
|
|
215
|
-
|
|
239
|
+
## 5.5.2 / 4.5.2
|
|
216
240
|
|
|
217
241
|
- Fixed bug in `toJS` not handling `null` values correctly. Fixes [#1557](https://github.com/mobxjs/mobx/issues/1557) through [#1783](https://github.com/mobxjs/mobx/pull/1783) by [@wangyiz4262](https://github.com/wangyiz4262)
|
|
218
242
|
|
|
219
|
-
|
|
243
|
+
## 5.5.1 / 4.5.1
|
|
220
244
|
|
|
221
245
|
- `toJS` now has a `recurseEverything` everything option, that even detects and converts observable objects that are "behind" non-observable objects. See [#1699](https://github.com/mobxjs/mobx/pull/1699) by [wangyiz4262](https://github.com/wangyiz4262)
|
|
222
246
|
- Added flow typings form `comparer`, see [#1751](https://github.com/mobxjs/mobx/pull/1752) by [pdong](https://github.com/pdong)
|
|
223
247
|
- Update flow typings for configuration options, [#1772](https://github.com/mobxjs/mobx/pull/1772) by [alexandersorokin](https://github.com/alexandersorokin)
|
|
224
248
|
|
|
225
|
-
|
|
249
|
+
## 5.5.0 / 4.5.0
|
|
226
250
|
|
|
227
251
|
(Minor version of `5` was bumped significantly to make the number better correlate together :-))
|
|
228
252
|
|
|
@@ -235,45 +259,45 @@ Reverted the support of Symbols in general in MobX 4, as it gives to many potent
|
|
|
235
259
|
- Introduced `_allowStateChangeInsideComputed`. Don't use it :-).
|
|
236
260
|
- MobX is now transpiled using babel 7
|
|
237
261
|
|
|
238
|
-
|
|
262
|
+
## 5.1.2 / 4.4.2
|
|
239
263
|
|
|
240
264
|
- Fixed [#1650](https://github.com/mobxjs/mobx/issues/1650), decorating fields with the name `toString` does not behave correctly.
|
|
241
265
|
|
|
242
|
-
|
|
266
|
+
## 5.1.1 / 4.4.1
|
|
243
267
|
|
|
244
268
|
- Improved typings of `decorate`, see [#1711](https://github.com/mobxjs/mobx/pull/1711) by [makepost](https://github.com/makepost)
|
|
245
269
|
|
|
246
|
-
|
|
270
|
+
## 5.1.0 / 4.4.0
|
|
247
271
|
|
|
248
272
|
- Improved handling of multiple MobX instances. MobX will no longer complain about being loaded multiple times (one should still prevent it though, to prevent blowing up bundle size!), but merge internal state by default. If multiple MobX versions need to be loaded, call `configure({ isolateGlobalState: true })`. Note that this means that observables from the different MobX instances won't cooperate. Fixes [#1681](https://github.com/mobxjs/mobx/issues/1681), [#1082](https://github.com/mobxjs/mobx/issues/1082)
|
|
249
273
|
- `enforceActions` options now supports the values: `"never"`, `"observed"` and `"always"` to make the behavior more clear. Fixes [#1680](https://github.com/mobxjs/mobx/issues/1680), [#1473](https://github.com/mobxjs/mobx/issues/1473)
|
|
250
274
|
|
|
251
|
-
|
|
275
|
+
## 5.0.5
|
|
252
276
|
|
|
253
277
|
- Fixed [#1667](https://github.com/mobxjs/mobx/issues/1667): creating a large array could result in undefined items (MobX 4.\* was not affected)
|
|
254
278
|
|
|
255
|
-
|
|
279
|
+
## 4.3.2 / 5.0.4
|
|
256
280
|
|
|
257
281
|
- Fixed [#1685](https://github.com/mobxjs/mobx/issues/1685): expose `IAutorunOptions`
|
|
258
282
|
- `decorate` now can apply multiple decorators, by accepting an array and applying them right to left: `decorate(Todo, { title: [serializable(primitive), persist('object'), observable] })`. By [@ramybenaroya](https://github.com/ramybenaroya) through [#1691](https://github.com/mobxjs/mobx/pull/1691) and [#1686](https://github.com/mobxjs/mobx/pull/1686)
|
|
259
283
|
- Improved typings of `flow` so that it accepts async generators. By [@dannsam](https://github.com/dannsam) through [#1656](https://github.com/mobxjs/mobx/pull/1656) and [#1655](https://github.com/mobxjs/mobx/pull/1655)
|
|
260
284
|
- `keys()` now also supports arrays. Fixes [#1600](https://github.com/mobxjs/mobx/pull/1600) through [#1601](https://github.com/mobxjs/mobx/pull/1601) by [@nunocastromartins](https://github.com/nunocastromartins)
|
|
261
285
|
|
|
262
|
-
|
|
286
|
+
## 5.0.3
|
|
263
287
|
|
|
264
288
|
- Fixed issue where it was no longer possible to define custom properties on observable arrays
|
|
265
289
|
|
|
266
|
-
|
|
290
|
+
## 5.0.2
|
|
267
291
|
|
|
268
292
|
- Fixed issue where iterators where not compiled to ES5, breaking the ES5 based builds.
|
|
269
293
|
|
|
270
|
-
|
|
294
|
+
## 5.0.1 (Unpublished)
|
|
271
295
|
|
|
272
296
|
- Fixed regression bug: `ObservableMap.size` was no longer observable. Fixes [#1583](https://github.com/mobxjs/mobx/issues/1583)
|
|
273
297
|
- Downgraded lib export from ES6 to ES5. To many build tools still trip over ES6. Fixes [#1584](https://github.com/mobxjs/mobx/issues/1584). A modern build is available through `import ... from "mobx/lib/mobx.es6"` (or setup an alias in your build system)
|
|
274
298
|
- Added support for mobx-react-devtools
|
|
275
299
|
|
|
276
|
-
|
|
300
|
+
## 5.0.0
|
|
277
301
|
|
|
278
302
|
[Release blogpost](https://medium.com/p/4852bce05572/)
|
|
279
303
|
|
|
@@ -330,12 +354,12 @@ _Note June 7th, 2018:_ Both issues are already in Jest master and should be rele
|
|
|
330
354
|
- `observable.shallowBox`, `observable.shallowArray`, `observable.shallowMap`, `observable.shallowObject`, `extendShallowObservable` api's have been removed. Instead, pass `{ deep: false }` to their non-shallow counter parts.
|
|
331
355
|
- `observableArray.peek`, `observableArray.move`
|
|
332
356
|
|
|
333
|
-
|
|
357
|
+
## 4.3.1
|
|
334
358
|
|
|
335
359
|
- Fixed [#1534](Fixes https://github.com/mobxjs/mobx/issues/1534): @computed({keepAlive: true}) no long calculates before being accessed.
|
|
336
360
|
- Added the `$mobx` export symbol for MobX 5 forward compatibity
|
|
337
361
|
|
|
338
|
-
|
|
362
|
+
## 4.3.0
|
|
339
363
|
|
|
340
364
|
- Introduced the `entries(observable)` API, by @samjacobclift through [#1536](https://github.com/mobxjs/mobx/pull/1536)
|
|
341
365
|
- Fixed [#1535](https://github.com/mobxjs/mobx/issues/1535): Change in nested computed value was not propagated if read outside action context when there is a pending reaction. For more details see the exact test case.
|
|
@@ -344,7 +368,7 @@ _Note June 7th, 2018:_ Both issues are already in Jest master and should be rele
|
|
|
344
368
|
- Fixed #1545: Actions properties where not re-assignable when using TypeScript
|
|
345
369
|
- Illegal Access checks are now a warning instead of an error. Fix
|
|
346
370
|
|
|
347
|
-
|
|
371
|
+
## 4.2.1
|
|
348
372
|
|
|
349
373
|
- Fixed flow typings for `mobx.configure` [#1521](https://github.com/mobxjs/mobx/pull/1521) by @andrew--r
|
|
350
374
|
- Improved typings for `mobx.flow`, fixes [#1527](https://github.com/mobxjs/mobx/issues/1527)
|
|
@@ -353,7 +377,7 @@ _Note June 7th, 2018:_ Both issues are already in Jest master and should be rele
|
|
|
353
377
|
- Fixed [#1512](https://github.com/mobxjs/mobx/issues/1512): `observe` hooks not being triggered when using `mobx.set`, Fixed in [#1514](https://github.com/mobxjs/mobx/pull/1514) by @quanganhtran
|
|
354
378
|
- Several minor improvements, additional tests and doc improvements.
|
|
355
379
|
|
|
356
|
-
|
|
380
|
+
## 4.2.0
|
|
357
381
|
|
|
358
382
|
- Introduced `configure({ enforceActions: "strict" })`, which is more strict then `enforceActions: true`, as it will also throw on non-observed changes to observables. See also [#1473](https://github.com/mobxjs/mobx/issues/1473)
|
|
359
383
|
- Fixed [#1480](https://github.com/mobxjs/mobx/issues/1480): Exceptions in the effect handler of `reaction` where not properly picked up by the global reaction system
|
|
@@ -364,14 +388,14 @@ _Note June 7th, 2018:_ Both issues are already in Jest master and should be rele
|
|
|
364
388
|
- Merged several improvements to the flow typings. [#1501](https://github.com/mobxjs/mobx/pull/1501) by @quanganhtran
|
|
365
389
|
- Fixed several accidental usages of the global `fail`, by @mtaran-google through [#1483](https://github.com/mobxjs/mobx/pull/1483) and [#1482](https://github.com/mobxjs/mobx/pull/1482)
|
|
366
390
|
|
|
367
|
-
|
|
391
|
+
## 4.1.1
|
|
368
392
|
|
|
369
393
|
- Import `default` from MobX will no longer throw, but only warn instead. This fixes some issues with tools that reflect on the `default` export of a module
|
|
370
394
|
- Disposing a spy listener inside a spy handler no longer causes an exception. Fixes [#1459](https://github.com/mobxjs/mobx/issues/1459) through [#1460](https://github.com/mobxjs/mobx/pull/1460) by [farwayer](https://github.com/farwayer)
|
|
371
395
|
- Added a missing `runInAction` overload in the flow typings. [#1451](https://github.com/mobxjs/mobx/pull/1451) by [AMilassin](https://github.com/mobxjs/mobx/issues?q=is%3Apr+author%3AAMilassin)
|
|
372
396
|
- Improved the typings of `decorate`. See [#1450](https://github.com/mobxjs/mobx/pull/1450) by [makepost](https://github.com/mobxjs/mobx/issues?q=is%3Apr+author%3Amakepost)
|
|
373
397
|
|
|
374
|
-
|
|
398
|
+
## 4.1.0
|
|
375
399
|
|
|
376
400
|
- Introduced `keepAlive` as option to `computed`
|
|
377
401
|
- All observable api's now default to `any` for their generic arguments
|
|
@@ -380,16 +404,16 @@ _Note June 7th, 2018:_ Both issues are already in Jest master and should be rele
|
|
|
380
404
|
- `@computed` properties are now declared on their owner rather then the protoptype. Fixes an issue where `@computed` fields didn't work in React Native on proxied objects. See [#1396](https://github.com/mobxjs/mobx/issues/1396)
|
|
381
405
|
- `action` and `action.bound` decorated fields are now reassignable, so that they can be stubbed
|
|
382
406
|
|
|
383
|
-
|
|
407
|
+
## 4.0.2
|
|
384
408
|
|
|
385
409
|
- Fixed issue where exceptions like `TypeError: Cannot define property:__mobxDidRunLazyInitializers, object is not extensible.` were thrown. Fixes [#1404](https://github.com/mobxjs/mobx/issues/1404)
|
|
386
410
|
- Improved flow typings for `flow`, [#1399](https://github.com/mobxjs/mobx/pull/1399) by @ismailhabib
|
|
387
411
|
|
|
388
|
-
|
|
412
|
+
## 4.0.1
|
|
389
413
|
|
|
390
414
|
- Updated flow typings, see [#1393](https://github.com/mobxjs/mobx/pull/1393) by [andrew--r](https://github.com/andrew--r)
|
|
391
415
|
|
|
392
|
-
|
|
416
|
+
## 4.0.0
|
|
393
417
|
|
|
394
418
|
- For the highlights of this release, read the [blog](https://medium.com/p/c1fbc08008da/):
|
|
395
419
|
- For migration notes: see the [wiki page](https://github.com/mobxjs/mobx/wiki/Migrating-from-mobx-3-to-mobx-4)
|
|
@@ -523,50 +547,50 @@ The issues are incoprorated in the above notes.
|
|
|
523
547
|
- [#1241](https://github.com/mobxjs/mobx/issues/1241) - Make it possible to disable error boundaries, to make it easier to find exceptions
|
|
524
548
|
- [#1263](https://github.com/mobxjs/mobx/issues/1263) - Remove bower.json
|
|
525
549
|
|
|
526
|
-
|
|
550
|
+
## 3.6.2
|
|
527
551
|
|
|
528
552
|
- Fixed accidental dependency on the `node` typings. Fixes [#1387](https://github.com/mobxjs/mobx/issues/1387) / [#1362](https://github.com/mobxjs/mobx/issues/1387)
|
|
529
553
|
|
|
530
|
-
|
|
554
|
+
## 3.6.1
|
|
531
555
|
|
|
532
556
|
- Fixed [#1358](https://github.com/mobxjs/mobx/pull/1359): Deep comparison failing on IE11. By [le0nik](https://github.com/le0nik) through [#1359](https://github.com/mobxjs/mobx/pull/1359)
|
|
533
557
|
|
|
534
|
-
|
|
558
|
+
## 3.6.0
|
|
535
559
|
|
|
536
560
|
- Fixed [#1118](https://github.com/mobxjs/mobx/issues/1118), the deepEquals operator build into mobx gave wrong results for non-primitive objects. This affected for example `computed.struct`, or the `compareStructural` of `reaction`
|
|
537
561
|
|
|
538
|
-
|
|
562
|
+
## 3.5.0/1
|
|
539
563
|
|
|
540
564
|
- Introduced `trace` for easier debugging of reactions / computed values. See the [docs](https://mobx.js.org/best/trace.html) for details.
|
|
541
565
|
- Improved typings of `observableArray.find`, see [#1324](https://github.com/mobxjs/mobx/pull/1324) for details.
|
|
542
566
|
|
|
543
|
-
|
|
567
|
+
## 3.4.1
|
|
544
568
|
|
|
545
569
|
- Republished 3.4.0, because the package update doesn't seem to distibute consistently through yarn / npm
|
|
546
570
|
|
|
547
|
-
|
|
571
|
+
## 3.4.0
|
|
548
572
|
|
|
549
573
|
- Improve Flow support by exposing typings regularly. Flow will automatically include them now. In your `.flowconfig` will have to remove the import in the `[libs]` section (as it's done [here](https://github.com/mobxjs/mobx/pull/1254#issuecomment-348926416)). Fixes [#1232](https://github.com/mobxjs/mobx/issues/1232).
|
|
550
574
|
|
|
551
|
-
|
|
575
|
+
## 3.3.3
|
|
552
576
|
|
|
553
577
|
- Fixed regression bug where observable map contents could not be replaced using another observable map [#1258](https://github.com/mobxjs/mobx/issues/1258)
|
|
554
578
|
- Fixed weird exception abot not being able to read `length` property of a function, see[#1238](https://github.com/mobxjs/mobx/issues/1238) through [#1257](https://github.com/mobxjs/mobx/issues/1238) by @dannsam
|
|
555
579
|
|
|
556
|
-
|
|
580
|
+
## 3.3.2
|
|
557
581
|
|
|
558
582
|
- Fix bug where custom comparers could be invoked with `undefined` values. Fixes [#1208](https://github.com/mobxjs/mobx/issues/1208)
|
|
559
583
|
- Make typings for observable stricter when using flow [#1194](https://github.com/mobxjs/mobx/issues/1194), [#1231](https://github.com/mobxjs/mobx/issues/1231)
|
|
560
584
|
- Fix a bug where `map.replace` would trigger reactions for unchanged values, fixes [#1243](https://github.com/mobxjs/mobx/issues/1243)
|
|
561
585
|
- Fixed issue where `NaN` was considered unequal to `NaN` when a deep compare was made [#1249](https://github.com/mobxjs/mobx/issues/1249)
|
|
562
586
|
|
|
563
|
-
|
|
587
|
+
## 3.3.1
|
|
564
588
|
|
|
565
589
|
- Fix bug allowing maps to be modified outside actions when using strict mode, fixes [#940](https://github.com/mobxjs/mobx/issues/940)
|
|
566
590
|
- Fixed [#1139](https://github.com/mobxjs/mobx/issues/1139) properly: `transaction` is no longer deprecated and doesn't disable tracking properties anymore
|
|
567
591
|
- Fixed [#1120](https://github.com/mobxjs/mobx/issues/1139): `isComputed` should return false for non-existing properties
|
|
568
592
|
|
|
569
|
-
|
|
593
|
+
## 3.3.0
|
|
570
594
|
|
|
571
595
|
- Undeprecated `transaction`, see [#1139](https://github.com/mobxjs/mobx/issues/1139)
|
|
572
596
|
- Fixed typings of reaction [#1136](https://github.com/mobxjs/mobx/issues/1136)
|
|
@@ -578,53 +602,53 @@ The issues are incoprorated in the above notes.
|
|
|
578
602
|
- Added support for Weex, see [#1163](https://github.com/mobxjs/mobx/pull/1163/)
|
|
579
603
|
- Added workaround for Firefox issue causing MobX to crash, see [#614](https://github.com/mobxjs/mobx/issues/614)
|
|
580
604
|
|
|
581
|
-
|
|
605
|
+
## 3.2.2
|
|
582
606
|
|
|
583
607
|
- Fixes a bug (or a known limitation) described in [#1092](https://github.com/mobxjs/mobx/issue/1092/). It is now possible to have different observable administration on different levels of the prototype chain. By @guillaumeleclerc
|
|
584
608
|
- Fixed a build issue when using mobx in a project that was using rollup, fixes [#1099](https://github.com/mobxjs/mobx/issue/1099/) by @rossipedia
|
|
585
609
|
- Fixed typings of `useStrict`, by @rickbeerendonk
|
|
586
610
|
|
|
587
|
-
|
|
611
|
+
## 3.2.1
|
|
588
612
|
|
|
589
613
|
- Introduced customizable value comperators to reactions and computed values. `reaction` and `computed` now support an additional option, `equals`, which takes a comparision function. See [#951](https://github.com/mobxjs/mobx/pull/951/) by @jamiewinder. Fixes #802 and #943. See the updated [`computed` docs](https://mobx.js.org/refguide/computed-decorator.html) for more details.
|
|
590
614
|
|
|
591
|
-
|
|
615
|
+
## 3.2.0
|
|
592
616
|
|
|
593
617
|
- MobX will warn again when there are multiple instances of MobX loaded, as this lead to often to confusing bugs if the project setup was not properly. The signal mobx that multiple instances are loaded on purpose, use `mobx.extras.runInSandbox`. See [#1082](https://github.com/mobxjs/mobx/issues/1082) for details.
|
|
594
618
|
|
|
595
|
-
|
|
619
|
+
## 3.1.17
|
|
596
620
|
|
|
597
621
|
- Improved typings of `IObservableArray.intercept`: use more restrictive types for `change` parameter of `handler`, by @bvanreeven
|
|
598
622
|
- Fixed [#1072](https://github.com/mobxjs/mobx/issues/1072), fields without a default value could not be observed yet when using TypeScript
|
|
599
623
|
|
|
600
|
-
|
|
624
|
+
## 3.1.16
|
|
601
625
|
|
|
602
626
|
- Restored `default` export (and added warning), which broke code that was importing mobx like `import mobx from "mobx"`. Use `import * as mobx from "mobx"` or use named importes instead. By @andykog, see #1043, #1050
|
|
603
627
|
- Fixed several typos in exceptions and documentation
|
|
604
628
|
|
|
605
|
-
|
|
629
|
+
## 3.1.15
|
|
606
630
|
|
|
607
631
|
- Fixed issue where `array.remove` did not work correctly in combination with `extras.interceptReads`
|
|
608
632
|
|
|
609
|
-
|
|
633
|
+
## 3.1.14
|
|
610
634
|
|
|
611
635
|
- Fixed 3.1.12 / 3.1.13 module packing. See #1039; `module` target is now transpiled to ES5 as well
|
|
612
636
|
|
|
613
|
-
|
|
637
|
+
## 3.1.13 (Unpublished: Uglify chokes on it in CRA)
|
|
614
638
|
|
|
615
639
|
- Fixed build issue with webpack 2, see #1040
|
|
616
640
|
|
|
617
|
-
|
|
641
|
+
## 3.1.12 (Unpublished: wasn't being bundled correctly by all bundlers)
|
|
618
642
|
|
|
619
643
|
- Added support for ES modules. See #1027 by @rossipedia
|
|
620
644
|
- Improved flow typings. See #1019 by @fb55
|
|
621
645
|
- Introduced experimental feature `extras.interceptReads(observable: ObservableMap | ObservableArray | ObservableObject | ObservableBox, property?: string, handler: value => value): Disposer` that can be used to intercept _reads_ from observable objects, to transform values on the fly when a value is read. One can achieve similar things with this as with proxying reads. See #1036
|
|
622
646
|
|
|
623
|
-
|
|
647
|
+
## 3.1.11
|
|
624
648
|
|
|
625
649
|
- Using rollup as bundler, instead of custom hacked build scripts, by @rossipedia, see #1023
|
|
626
650
|
|
|
627
|
-
|
|
651
|
+
## 3.1.10
|
|
628
652
|
|
|
629
653
|
- Fixed flow typings for `when`, by @jamsea
|
|
630
654
|
- Add flow typings for `map.replace`, by @leader22
|
|
@@ -632,51 +656,51 @@ The issues are incoprorated in the above notes.
|
|
|
632
656
|
- Improved typings of `autorun` / `autorunAsync` to better support async / await, by @capaj
|
|
633
657
|
- Fixed typings of `action.bound`, see #803
|
|
634
658
|
|
|
635
|
-
|
|
659
|
+
## 3.1.9
|
|
636
660
|
|
|
637
661
|
- Introduced explicit `.get(index)` and `.set(index, value)` methods on observable arrays, for issues that have trouble handling many property descriptors on objects. See also #734
|
|
638
662
|
- Made sure it is safe to call `onBecomeObserved` twice in row, fixes #874, #898
|
|
639
663
|
- Fixed typings of `IReactionDisposer`
|
|
640
664
|
|
|
641
|
-
|
|
665
|
+
## 3.1.8
|
|
642
666
|
|
|
643
667
|
- Fixed edge case where `autorun` was not triggered again if a computed value was invalidated by the reaction itself, see [#916](https://github.com/mobxjs/mobx/issues/916), by @andykog
|
|
644
668
|
- Added support for primtive keys in `createTransformer`, See #920 by @dnakov
|
|
645
669
|
- Improved typings of `isArrayLike`, see #904, by @mohsen1
|
|
646
670
|
|
|
647
|
-
|
|
671
|
+
## 3.1.7
|
|
648
672
|
|
|
649
673
|
- Reverted ES2015 module changes, as they broke with webpack 2 (will be re-released later)
|
|
650
674
|
|
|
651
|
-
|
|
675
|
+
## 3.1.6 (Unpublished)
|
|
652
676
|
|
|
653
677
|
- Expose ES2015 modules to be used with advanced bundlers, by @mohsen1, fixes #868
|
|
654
678
|
- Improved typings of `IObservableArray.intercept`: remove superflous type parameter, by @bvanreeven
|
|
655
679
|
- Improved typings of map changes, by @hediet
|
|
656
680
|
|
|
657
|
-
|
|
681
|
+
## 3.1.5
|
|
658
682
|
|
|
659
683
|
- Improved typings of map changes, see #847, by @hediet
|
|
660
684
|
- Fixed issue with `reaction` if `fireImmediately` was combined with `delay` option, see #837, by @SaboteurSpk
|
|
661
685
|
|
|
662
|
-
|
|
686
|
+
## 3.1.4
|
|
663
687
|
|
|
664
688
|
- Observable maps initialized from ES6 didn't deeply convert their values to observables. (fixes #869,by @ggarek)
|
|
665
689
|
|
|
666
|
-
|
|
690
|
+
## 3.1.3
|
|
667
691
|
|
|
668
692
|
- Make sure that `ObservableArray.replace` can handle large arrays by not using splats internally. (See e.g. #859)
|
|
669
693
|
- Exposed `ObservableArray.spliceWithArray`, that unlike a normal splice, doesn't use a variadic argument list so that it is possible to splice in new arrays that are larger then allowed by the callstack.
|
|
670
694
|
|
|
671
|
-
|
|
695
|
+
## 3.1.2
|
|
672
696
|
|
|
673
697
|
- Fixed incompatiblity issue with `mobx-react@4.1.0`
|
|
674
698
|
|
|
675
|
-
|
|
699
|
+
## 3.1.1 (unpublished)
|
|
676
700
|
|
|
677
701
|
- Introduced `isBoxedObservable(value)`, fixes #804
|
|
678
702
|
|
|
679
|
-
|
|
703
|
+
## 3.1.0
|
|
680
704
|
|
|
681
705
|
### Improved strict mode
|
|
682
706
|
|
|
@@ -709,7 +733,7 @@ Observe and intercept callbacks are concepts that do not relate to strict mode,
|
|
|
709
733
|
- Merged #783: extract error messages to seperate file, so that they can be optimized in production builds (not yet done), by @reisel, #GoodnessSquad
|
|
710
734
|
- Improved typings of actions, see #796 by @mattiamanzati
|
|
711
735
|
|
|
712
|
-
|
|
736
|
+
## 3.0.2
|
|
713
737
|
|
|
714
738
|
- Fixed issue where MobX failed on environments where `Map` is not defined, #779 by @dirtyrolf
|
|
715
739
|
- MobX can now be compiled on windows as well! #772 by @madarauchiha #GoodnessSquad
|
|
@@ -725,12 +749,12 @@ Re-introduced _structural comparison_. Seems we couldn't part from it yet :). So
|
|
|
725
749
|
- `observable.ref.struct`: Only stores a new value and notify observers if the new value is not structurally the same as the previous value. Beware of cycles! Doesn't convert the new value into observables.
|
|
726
750
|
- `extras.deepEquals`: Check if two data structures are deeply equal. supports observable and non observable data structures.
|
|
727
751
|
|
|
728
|
-
|
|
752
|
+
## 3.0.1
|
|
729
753
|
|
|
730
754
|
- `toString()` of observable arrays now behaves like normal arrays (by @capaj, see #759)
|
|
731
755
|
- Improved flow types of `toJS`by @jamsea (#758)
|
|
732
756
|
|
|
733
|
-
|
|
757
|
+
## 3.0.0
|
|
734
758
|
|
|
735
759
|
The changelog of MobX 3 might look quite overwhelming, but migrating to MobX 3 should be pretty straight forward nonetheless.
|
|
736
760
|
The api has now become more layered, and the api is more uniform and modifiers are cleaned up.
|
|
@@ -959,7 +983,7 @@ Whether or not this was ever a good idea is debatable, but it stopped working in
|
|
|
959
983
|
|
|
960
984
|
---
|
|
961
985
|
|
|
962
|
-
|
|
986
|
+
## 2.7.0
|
|
963
987
|
|
|
964
988
|
### Automatic inference of computed properties has been deprecated.
|
|
965
989
|
|
|
@@ -1033,34 +1057,34 @@ Note, this only applies when using observable in this way; it doesn't apply when
|
|
|
1033
1057
|
- Fixed #701: `toJS` sometimes failing to convert objects decorated with `@observable` (cause: `isObservable` sometimes returned false on these object)
|
|
1034
1058
|
- Fixed typings for `when` / `autorun` / `reaction`; they all return a disposer function.
|
|
1035
1059
|
|
|
1036
|
-
|
|
1060
|
+
## 2.6.5
|
|
1037
1061
|
|
|
1038
1062
|
- Added `move` operation to observable array, see [#697](https://github.com/mobxjs/mobx/pull/697)
|
|
1039
1063
|
|
|
1040
|
-
|
|
1064
|
+
## 2.6.4
|
|
1041
1065
|
|
|
1042
1066
|
- Fixed potential clean up issue if an exception was thrown from an intercept handler
|
|
1043
1067
|
- Improved typings of `asStructure` (by @nidu, see #687)
|
|
1044
1068
|
- Added support for `computed(asStructure(() => expr))` (by @yotambarzilay, see #685)
|
|
1045
1069
|
|
|
1046
|
-
|
|
1070
|
+
## 2.6.3
|
|
1047
1071
|
|
|
1048
1072
|
- Fixed #603: exceptions in transaction breaks future reactions
|
|
1049
1073
|
- Improved typings of `toJS`
|
|
1050
1074
|
- Introduced `setReactionScheduler`. Internal api used by mobx-react@4 to be notified when reactions will be run
|
|
1051
1075
|
|
|
1052
|
-
|
|
1076
|
+
## 2.6.2
|
|
1053
1077
|
|
|
1054
1078
|
- Changes related to `toJS` as mentioned in version `2.6.0` where not actually shipped. This has been fixed, so see release notes below.
|
|
1055
1079
|
|
|
1056
|
-
|
|
1080
|
+
## 2.6.1
|
|
1057
1081
|
|
|
1058
1082
|
- Introduced convenience `isArrayLike`: returns whether the argument is either a JS- or observable array. By @dslmeinte
|
|
1059
1083
|
- Improved readme. By @DavidLGoldberg
|
|
1060
1084
|
- Improved assertion message, by @ncammarate (See [#618](https://github.com/mobxjs/mobx/pull/618))
|
|
1061
1085
|
- Added HashNode badge, by @sandeeppanda92
|
|
1062
1086
|
|
|
1063
|
-
|
|
1087
|
+
## 2.6.0
|
|
1064
1088
|
|
|
1065
1089
|
_Marked as minor release as the behavior of `toJS` has been changed, which might be interpreted both as bug-fix or as breaking change, depending of how you interpreted the docs_
|
|
1066
1090
|
|
|
@@ -1069,13 +1093,13 @@ _Marked as minor release as the behavior of `toJS` has been changed, which might
|
|
|
1069
1093
|
- Fixed [#576](https://github.com/mobxjs/mobx/pull/576): disallow passing actions directly to `autorun`; as they won't be tracked by @jeffijoe
|
|
1070
1094
|
- Extending observable objects with other observable (objects) is now explicitly forbidden, fixes [#540](https://github.com/mobxjs/mobx/pull/540).
|
|
1071
1095
|
|
|
1072
|
-
|
|
1096
|
+
## 2.5.2
|
|
1073
1097
|
|
|
1074
1098
|
- Introduced `isComputed`
|
|
1075
1099
|
- Observable objects can now have a type: `IObservableObject`, see [#484](https://github.com/mobxjs/mobx/pull/484) by @spiffytech
|
|
1076
1100
|
- Restored 2.4 behavior of boxed observables inside observable objects, see [#558](https://github.com/mobxjs/mobx/issues/558)
|
|
1077
1101
|
|
|
1078
|
-
|
|
1102
|
+
## 2.5.1
|
|
1079
1103
|
|
|
1080
1104
|
- Computed properties can now be created by using getter / setter functions. This is the idiomatic way to introduce computed properties from now on:
|
|
1081
1105
|
|
|
@@ -1091,7 +1115,7 @@ const box = observable({
|
|
|
1091
1115
|
})
|
|
1092
1116
|
```
|
|
1093
1117
|
|
|
1094
|
-
|
|
1118
|
+
## 2.5.0
|
|
1095
1119
|
|
|
1096
1120
|
- Core derivation algorithm has received some majore improvements by @asterius1! See below. Pr #452, 489
|
|
1097
1121
|
- Introduced setters for computed properties, use `computed(expr, setter)` or `@computed get name() { return expr } set name (value) { action }`. `computed` can now be used as modifier in `observable` / `extendObservable`, #421, #463 (see below for example)
|
|
@@ -1147,7 +1171,7 @@ function Square() {
|
|
|
1147
1171
|
}
|
|
1148
1172
|
```
|
|
1149
1173
|
|
|
1150
|
-
|
|
1174
|
+
## 2.4.4
|
|
1151
1175
|
|
|
1152
1176
|
- Fixed #503: map.delete returns boolean
|
|
1153
1177
|
- Fix return type of `runInAction`, #499 by @Strate
|
|
@@ -1157,68 +1181,68 @@ function Square() {
|
|
|
1157
1181
|
- Fixed #502: `extendObservable` fails on objects created with `Object.create(null)`
|
|
1158
1182
|
- Implemented #480 / #488: better typings for `asMap`, by @Strate
|
|
1159
1183
|
|
|
1160
|
-
|
|
1184
|
+
## 2.4.3
|
|
1161
1185
|
|
|
1162
1186
|
- Objects with a `null` prototype are now considered plain objects as well
|
|
1163
1187
|
- Improved error message for non-converging cyclic reactions
|
|
1164
1188
|
- Fixed potential HMR issue
|
|
1165
1189
|
|
|
1166
|
-
|
|
1190
|
+
## 2.4.2
|
|
1167
1191
|
|
|
1168
1192
|
- Improved error message when wrongly using `@computed`, by @bb (#450)
|
|
1169
1193
|
- `observableArray.slice` now automatically converts observable arrays to plain arrays, fixes #460
|
|
1170
1194
|
- Improved error message when an uncaught exception is thrown by a MobX tracked function
|
|
1171
1195
|
|
|
1172
|
-
|
|
1196
|
+
## 2.4.1
|
|
1173
1197
|
|
|
1174
1198
|
- `@action` decorated methods are now configurable. Fixes #441
|
|
1175
1199
|
- The `onBecomeObserved` event handler is now triggered when an atom is observed, instead of when it is bound as dependency. Fixes #427 and makes atoms easier to extend.
|
|
1176
1200
|
- if `useStrict()` is invoked without arguments, it now returns the current value of strict mode.
|
|
1177
1201
|
- the current reaction is now always passed as first argument to the callbacks of `autorun`, `autorunAsync`, `when` and `reaction`. This allows reactions to be immediately disposed during the first run. See #438, by @andykog
|
|
1178
1202
|
|
|
1179
|
-
|
|
1203
|
+
## 2.4.0
|
|
1180
1204
|
|
|
1181
1205
|
- _Note: the internal version of MobX has been bumped. This version has no breaking api changes, but if you have MobX loaded multiple times in your project, they all have to be upgraded to `2.4.0`. MobX will report this when starting._
|
|
1182
1206
|
- Made dependency tracking and binding significant faster. Should result in huge performance improvements when working with large collections.
|
|
1183
1207
|
- Fixed typescript decorator issue, #423, #425? (by @bb)
|
|
1184
1208
|
|
|
1185
|
-
|
|
1209
|
+
## 2.3.7
|
|
1186
1210
|
|
|
1187
1211
|
- Fixed issue where computed values were tracked and accidentally kept alive during actions
|
|
1188
1212
|
|
|
1189
|
-
|
|
1213
|
+
## 2.3.6
|
|
1190
1214
|
|
|
1191
1215
|
- Fixed #406: Observable maps doesn't work with empty initial value in Safari
|
|
1192
1216
|
- Implemented #357, #348: ObservableMap and ObservableArray now support iterators. Use [`@@iterator()` or iterall](https://github.com/leebyron/iterall) in ES5 environments.
|
|
1193
1217
|
|
|
1194
|
-
|
|
1218
|
+
## 2.3.5
|
|
1195
1219
|
|
|
1196
1220
|
- Fixed #364: Observable arrays not reacting properly to index assignments under iOS safari (mobile) 9.1.1 By @andykog
|
|
1197
1221
|
- Fixed #387: Typings of boxed values
|
|
1198
1222
|
- Added warning when reading array entries out of bounds. See #381
|
|
1199
1223
|
|
|
1200
|
-
|
|
1224
|
+
## 2.3.4
|
|
1201
1225
|
|
|
1202
1226
|
- Fixed #360: Removed expensive cycle detection (cycles are still detected, but a bit later)
|
|
1203
1227
|
- Fixed #377: `toJS` serialization of Dates and Regexes preserves the original values
|
|
1204
1228
|
- Fixed #379: `@action` decorated methods can now be inherited / overriden
|
|
1205
1229
|
|
|
1206
|
-
|
|
1230
|
+
## 2.3.3
|
|
1207
1231
|
|
|
1208
1232
|
- Fixed #186: Log a warning instead of an error if an exception is thrown in a derivation. Fixes issue where React Native would produce unusable error screens (because it shows the first logged error)
|
|
1209
1233
|
- Fixed #333: Fixed some interoperability issues in combination with `Reflect` / `InversifyJS` decorators. @andykog
|
|
1210
1234
|
- Fixed #333: `@observable` class properties are now _owned_ by their instance again, meaning they will show up in `Object.keys()` and `.hasOwnProperty` @andykog
|
|
1211
1235
|
|
|
1212
|
-
|
|
1236
|
+
## 2.3.2
|
|
1213
1237
|
|
|
1214
1238
|
- Fixed #328: Fixed exception when inspecting observable in `onBecomeObserved`
|
|
1215
1239
|
- Fixed #341: `array.find` now returns `undefined` instead of `null` when nothing was found, behavior now matches the docs. (By @hellectronic)
|
|
1216
1240
|
|
|
1217
|
-
|
|
1241
|
+
## 2.3.1
|
|
1218
1242
|
|
|
1219
1243
|
- Fixed #327: spy not working with runInAction
|
|
1220
1244
|
|
|
1221
|
-
|
|
1245
|
+
## 2.3.0
|
|
1222
1246
|
|
|
1223
1247
|
### Introduced `whyRun`:
|
|
1224
1248
|
|