{"action":"created","comment":{"url":"https://api.github.com/repos/mobxjs/mobx/pulls/comments/93912829","pull_request_review_id":14444380,"id":93912829,"diff_hunk":"@@ -59,6 +128,67 @@ observable({\n })\n ```\n \n+### MobX will no longer share global state by default\n+\n+For historical reasons (at Mendix), MobX had a feature that it would warn if different versions of the MobX package are being loaded into the same javascript runtime multiple times.\n+This is because multiple instances by default try to share their state.\n+This allows reactions from one package to react to observables created by another package,\n+even when both packages where shipped with their own (embedded) version of MobX (!).\n+\n+Obviously this is a nasty default as it breaks package isolation and might actually start to throw errors unintentionally when MobX is loaded multiple times in the same runtime by completely unrelated packages.\n+So this sharing behavior is now by default turned off.\n+Sharing MobX should be achieved by means of proper bundling, de-duplication of packages or using peer dependencies / externals if needed.\n+This is similar to packages like React, which will also bail out if you try to load it multiple times.\n+\n+If you still want to use the old behavior, this can be achieved by running `mobx.extras.shareGlobalState()` on _all_ packages that want to share state with each other.\n+Since this behavior is probably not used outside Mendix, it has been deprecated immediately, so if you rely on this feature, please report in #621, so that it can be undeprecated if there is no more elegant solution.\n+\n+See [#621](https://github.com/mobxjs/mobx/issues/621)\n+\n+### `observable(plainObject)` will no longer enhance objects, but clone instead\n+\n+When passing a plain object to `observable`, MobX used to modify that object inplace and give it observable capabilities.\n+This also happened when assigning a plain object to an observable array etc.\n+However, this behavior has changed for a few reasons\n+\n+1.  Both arrays and maps create new data structure, however, `observable(object)` didn't\n+2.  It resulted in unnecessary and confusing side effects. If you passed an object you received from some api to a function that added it, for example, to an observable collection. Suddenly your object would be modified as side effect of passing it down to that function. This was often confusing for beginners and could lead to subtle bugs.\n+3.  If MobX in the future uses Proxies behind the scenes, this would need to change as well\n+\n+If you want, you can still enhance existing plainObjects, but simply using `extendObserable(data, data)`. This was actually the old implementation, which has now changed to `extendObservable({}, data)`.\n+\n+As always, it is best practice not to have transportation objects etc lingering around; there should be only one source of truth, and that is the data that is in your observable state.\n+If you already adhered to this rule, this change won't impact you.\n+\n+See [#649](https://github.com/mobxjs/mobx/issues/649)\n+\n+### Flow-Types Support 🎉🎉🎉\n+\n+Add flow types for methods and interfaces of observable variables:\n+```js\n+const observableValue: IObservableValue<number> = observable(1)\n+const observableArray: IObservableArray<number> = observable([1,2,3])\n+\n+const sum: IComputedValue<number> = computed(() => {\n+\treturn observableArray.reduce((a: number, b: number): number => a + b, 0)\n+})\n+```\n+\n+See [#640](https://github.com/mobxjs/mobx/issues/640)\n+\n+### Other changes\n+\n+* Fixed #603: exceptions in transaction breaks future reactions\n+* Passing a function to `observable` will now create a boxed observable refering to that function\n+* Deprecated `whyRun` (as it seems hardly used, please let us know if it should stay)\n+* The following deprecated methods have been removed:\n+  * `autorunUntil`\n+  * `trackTransitions`\n+  * `fastArray`\n+  * `SimpleEventEmitter`\n+  * `ObservableMap.toJs` (use `toJS`)\n+  * invoking `observe` and `inject` with plain javascript objects\n+=======","path":"CHANGELOG.md","position":173,"original_position":173,"commit_id":"cf5dd2bd3cc0d21b9ce73255c71d9ce0da418b44","original_commit_id":"5b4abdaad74b48d3105f0fb896e435954bae1cff","user":{"login":"mweststrate","id":1820292,"avatar_url":"https://avatars.githubusercontent.com/u/1820292?v=3","gravatar_id":"","url":"https://api.github.com/users/mweststrate","html_url":"https://github.com/mweststrate","followers_url":"https://api.github.com/users/mweststrate/followers","following_url":"https://api.github.com/users/mweststrate/following{/other_user}","gists_url":"https://api.github.com/users/mweststrate/gists{/gist_id}","starred_url":"https://api.github.com/users/mweststrate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mweststrate/subscriptions","organizations_url":"https://api.github.com/users/mweststrate/orgs","repos_url":"https://api.github.com/users/mweststrate/repos","events_url":"https://api.github.com/users/mweststrate/events{/privacy}","received_events_url":"https://api.github.com/users/mweststrate/received_events","type":"User","site_admin":false},"body":"Fixed","created_at":"2016-12-27T09:35:50Z","updated_at":"2016-12-27T09:35:50Z","html_url":"https://github.com/mobxjs/mobx/pull/679#discussion_r93912829","pull_request_url":"https://api.github.com/repos/mobxjs/mobx/pulls/679","_links":{"self":{"href":"https://api.github.com/repos/mobxjs/mobx/pulls/comments/93912829"},"html":{"href":"https://github.com/mobxjs/mobx/pull/679#discussion_r93912829"},"pull_request":{"href":"https://api.github.com/repos/mobxjs/mobx/pulls/679"}}},"pull_request":{"url":"https://api.github.com/repos/mobxjs/mobx/pulls/679","id":94842110,"html_url":"https://github.com/mobxjs/mobx/pull/679","diff_url":"https://github.com/mobxjs/mobx/pull/679.diff","patch_url":"https://github.com/mobxjs/mobx/pull/679.patch","issue_url":"https://api.github.com/repos/mobxjs/mobx/issues/679","number":679,"state":"open","locked":false,"title":"WIP: Mobx3","user":{"login":"mweststrate","id":1820292,"avatar_url":"https://avatars.githubusercontent.com/u/1820292?v=3","gravatar_id":"","url":"https://api.github.com/users/mweststrate","html_url":"https://github.com/mweststrate","followers_url":"https://api.github.com/users/mweststrate/followers","following_url":"https://api.github.com/users/mweststrate/following{/other_user}","gists_url":"https://api.github.com/users/mweststrate/gists{/gist_id}","starred_url":"https://api.github.com/users/mweststrate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mweststrate/subscriptions","organizations_url":"https://api.github.com/users/mweststrate/orgs","repos_url":"https://api.github.com/users/mweststrate/repos","events_url":"https://api.github.com/users/mweststrate/events{/privacy}","received_events_url":"https://api.github.com/users/mweststrate/received_events","type":"User","site_admin":false},"body":"# MobX 3\r\n\r\nMobX 3 will be a short lived major version that will be mainly used to deprecate some old behavior with clear warnings while moving to the new desired behavior in MobX. For example function values will be no longer converted to computed values automatically. Which was in some cases convenient, but mostly confusing. Since changing this behavior would change the semantics without build / compile errors, this transition will be done gradually and completed in MobX 4.\r\n\r\n* [x] `observable(plainObject)` will now clone instead of enhance the target object. Use `extendObservable(target, target)` if you still want the old behavior. See #649 \r\n* [x] stop autoconverting argument less functions into computed properties, See #532 \r\n* [x] stop sharing global state by default with other mobx instances, See #621 \r\n* [x] Deprecate whyrun\r\n* [x] Remove not all (not recently) deprecated Mobx 2 methods\r\n* [x] Introduce a better modifier mechanism. Will probably not be introduced in `3.0` but `3.1`\r\n* [x] Add support for ES6 `Map` conversion\r\n* [x]  Process open todo's\r\n* [x] Test typescript 2 latest\r\n* [x] Kill stuff deprecated in MobX 2 & 3, including old modifier mechanism, clean up code paths where needed\r\n* [ ] Update docs\r\n* [ ] Update deps of related packages (utils, react bindings, ...)\r\n* [ ] Update examples","created_at":"2016-11-22T15:57:39Z","updated_at":"2016-12-27T09:35:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6164a452f7ce719b11efe903c652558ce2e253dd","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mobxjs/mobx/pulls/679/commits","review_comments_url":"https://api.github.com/repos/mobxjs/mobx/pulls/679/comments","review_comment_url":"https://api.github.com/repos/mobxjs/mobx/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mobxjs/mobx/issues/679/comments","statuses_url":"https://api.github.com/repos/mobxjs/mobx/statuses/cf5dd2bd3cc0d21b9ce73255c71d9ce0da418b44","head":{"label":"mobxjs:mobx3","ref":"mobx3","sha":"cf5dd2bd3cc0d21b9ce73255c71d9ce0da418b44","user":{"login":"mobxjs","id":17475736,"avatar_url":"https://avatars.githubusercontent.com/u/17475736?v=3","gravatar_id":"","url":"https://api.github.com/users/mobxjs","html_url":"https://github.com/mobxjs","followers_url":"https://api.github.com/users/mobxjs/followers","following_url":"https://api.github.com/users/mobxjs/following{/other_user}","gists_url":"https://api.github.com/users/mobxjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mobxjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobxjs/subscriptions","organizations_url":"https://api.github.com/users/mobxjs/orgs","repos_url":"https://api.github.com/users/mobxjs/repos","events_url":"https://api.github.com/users/mobxjs/events{/privacy}","received_events_url":"https://api.github.com/users/mobxjs/received_events","type":"Organization","site_admin":false},"repo":{"id":32215970,"name":"mobx","full_name":"mobxjs/mobx","owner":{"login":"mobxjs","id":17475736,"avatar_url":"https://avatars.githubusercontent.com/u/17475736?v=3","gravatar_id":"","url":"https://api.github.com/users/mobxjs","html_url":"https://github.com/mobxjs","followers_url":"https://api.github.com/users/mobxjs/followers","following_url":"https://api.github.com/users/mobxjs/following{/other_user}","gists_url":"https://api.github.com/users/mobxjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mobxjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobxjs/subscriptions","organizations_url":"https://api.github.com/users/mobxjs/orgs","repos_url":"https://api.github.com/users/mobxjs/repos","events_url":"https://api.github.com/users/mobxjs/events{/privacy}","received_events_url":"https://api.github.com/users/mobxjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mobxjs/mobx","description":"Simple, scalable state management.","fork":false,"url":"https://api.github.com/repos/mobxjs/mobx","forks_url":"https://api.github.com/repos/mobxjs/mobx/forks","keys_url":"https://api.github.com/repos/mobxjs/mobx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mobxjs/mobx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mobxjs/mobx/teams","hooks_url":"https://api.github.com/repos/mobxjs/mobx/hooks","issue_events_url":"https://api.github.com/repos/mobxjs/mobx/issues/events{/number}","events_url":"https://api.github.com/repos/mobxjs/mobx/events","assignees_url":"https://api.github.com/repos/mobxjs/mobx/assignees{/user}","branches_url":"https://api.github.com/repos/mobxjs/mobx/branches{/branch}","tags_url":"https://api.github.com/repos/mobxjs/mobx/tags","blobs_url":"https://api.github.com/repos/mobxjs/mobx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mobxjs/mobx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mobxjs/mobx/git/refs{/sha}","trees_url":"https://api.github.com/repos/mobxjs/mobx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mobxjs/mobx/statuses/{sha}","languages_url":"https://api.github.com/repos/mobxjs/mobx/languages","stargazers_url":"https://api.github.com/repos/mobxjs/mobx/stargazers","contributors_url":"https://api.github.com/repos/mobxjs/mobx/contributors","subscribers_url":"https://api.github.com/repos/mobxjs/mobx/subscribers","subscription_url":"https://api.github.com/repos/mobxjs/mobx/subscription","commits_url":"https://api.github.com/repos/mobxjs/mobx/commits{/sha}","git_commits_url":"https://api.github.com/repos/mobxjs/mobx/git/commits{/sha}","comments_url":"https://api.github.com/repos/mobxjs/mobx/comments{/number}","issue_comment_url":"https://api.github.com/repos/mobxjs/mobx/issues/comments{/number}","contents_url":"https://api.github.com/repos/mobxjs/mobx/contents/{+path}","compare_url":"https://api.github.com/repos/mobxjs/mobx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mobxjs/mobx/merges","archive_url":"https://api.github.com/repos/mobxjs/mobx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mobxjs/mobx/downloads","issues_url":"https://api.github.com/repos/mobxjs/mobx/issues{/number}","pulls_url":"https://api.github.com/repos/mobxjs/mobx/pulls{/number}","milestones_url":"https://api.github.com/repos/mobxjs/mobx/milestones{/number}","notifications_url":"https://api.github.com/repos/mobxjs/mobx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mobxjs/mobx/labels{/name}","releases_url":"https://api.github.com/repos/mobxjs/mobx/releases{/id}","deployments_url":"https://api.github.com/repos/mobxjs/mobx/deployments","created_at":"2015-03-14T14:31:38Z","updated_at":"2016-12-27T06:16:45Z","pushed_at":"2016-12-27T09:34:42Z","git_url":"git://github.com/mobxjs/mobx.git","ssh_url":"git@github.com:mobxjs/mobx.git","clone_url":"https://github.com/mobxjs/mobx.git","svn_url":"https://github.com/mobxjs/mobx","homepage":"https://mobxjs.github.io/mobx","size":13206,"stargazers_count":6409,"watchers_count":6409,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":281,"mirror_url":null,"open_issues_count":59,"forks":281,"open_issues":59,"watchers":6409,"default_branch":"master"}},"base":{"label":"mobxjs:master","ref":"master","sha":"9423deb620bec92895c430721ac8a7e03093080c","user":{"login":"mobxjs","id":17475736,"avatar_url":"https://avatars.githubusercontent.com/u/17475736?v=3","gravatar_id":"","url":"https://api.github.com/users/mobxjs","html_url":"https://github.com/mobxjs","followers_url":"https://api.github.com/users/mobxjs/followers","following_url":"https://api.github.com/users/mobxjs/following{/other_user}","gists_url":"https://api.github.com/users/mobxjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mobxjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobxjs/subscriptions","organizations_url":"https://api.github.com/users/mobxjs/orgs","repos_url":"https://api.github.com/users/mobxjs/repos","events_url":"https://api.github.com/users/mobxjs/events{/privacy}","received_events_url":"https://api.github.com/users/mobxjs/received_events","type":"Organization","site_admin":false},"repo":{"id":32215970,"name":"mobx","full_name":"mobxjs/mobx","owner":{"login":"mobxjs","id":17475736,"avatar_url":"https://avatars.githubusercontent.com/u/17475736?v=3","gravatar_id":"","url":"https://api.github.com/users/mobxjs","html_url":"https://github.com/mobxjs","followers_url":"https://api.github.com/users/mobxjs/followers","following_url":"https://api.github.com/users/mobxjs/following{/other_user}","gists_url":"https://api.github.com/users/mobxjs/gists{/gist_id}","starred_url":"https://api.github.com/users/mobxjs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mobxjs/subscriptions","organizations_url":"https://api.github.com/users/mobxjs/orgs","repos_url":"https://api.github.com/users/mobxjs/repos","events_url":"https://api.github.com/users/mobxjs/events{/privacy}","received_events_url":"https://api.github.com/users/mobxjs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mobxjs/mobx","description":"Simple, scalable state management.","fork":false,"url":"https://api.github.com/repos/mobxjs/mobx","forks_url":"https://api.github.com/repos/mobxjs/mobx/forks","keys_url":"https://api.github.com/repos/mobxjs/mobx/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mobxjs/mobx/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mobxjs/mobx/teams","hooks_url":"https://api.github.com/repos/mobxjs/mobx/hooks","issue_events_url":"https://api.github.com/repos/mobxjs/mobx/issues/events{/number}","events_url":"https://api.github.com/repos/mobxjs/mobx/events","assignees_url":"https://api.github.com/repos/mobxjs/mobx/assignees{/user}","branches_url":"https://api.github.com/repos/mobxjs/mobx/branches{/branch}","tags_url":"https://api.github.com/repos/mobxjs/mobx/tags","blobs_url":"https://api.github.com/repos/mobxjs/mobx/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mobxjs/mobx/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mobxjs/mobx/git/refs{/sha}","trees_url":"https://api.github.com/repos/mobxjs/mobx/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mobxjs/mobx/statuses/{sha}","languages_url":"https://api.github.com/repos/mobxjs/mobx/languages","stargazers_url":"https://api.github.com/repos/mobxjs/mobx/stargazers","contributors_url":"https://api.github.com/repos/mobxjs/mobx/contributors","subscribers_url":"https://api.github.com/repos/mobxjs/mobx/subscribers","subscription_url":"https://api.github.com/repos/mobxjs/mobx/subscription","commits_url":"https://api.github.com/repos/mobxjs/mobx/commits{/sha}","git_commits_url":"https://api.github.com/repos/mobxjs/mobx/git/commits{/sha}","comments_url":"https://api.github.com/repos/mobxjs/mobx/comments{/number}","issue_comment_url":"https://api.github.com/repos/mobxjs/mobx/issues/comments{/number}","contents_url":"https://api.github.com/repos/mobxjs/mobx/contents/{+path}","compare_url":"https://api.github.com/repos/mobxjs/mobx/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mobxjs/mobx/merges","archive_url":"https://api.github.com/repos/mobxjs/mobx/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mobxjs/mobx/downloads","issues_url":"https://api.github.com/repos/mobxjs/mobx/issues{/number}","pulls_url":"https://api.github.com/repos/mobxjs/mobx/pulls{/number}","milestones_url":"https://api.github.com/repos/mobxjs/mobx/milestones{/number}","notifications_url":"https://api.github.com/repos/mobxjs/mobx/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mobxjs/mobx/labels{/name}","releases_url":"https://api.github.com/repos/mobxjs/mobx/releases{/id}","deployments_url":"https://api.github.com/repos/mobxjs/mobx/deployments","created_at":"2015-03-14T14:31:38Z","updated_at":"2016-12-27T06:16:45Z","pushed_at":"2016-12-27T09:34:42Z","git_url":"git://github.com/mobxjs/mobx.git","ssh_url":"git@github.com:mobxjs/mobx.git","clone_url":"https://github.com/mobxjs/mobx.git","svn_url":"https://github.com/mobxjs/mobx","homepage":"https://mobxjs.github.io/mobx","size":13206,"stargazers_count":6409,"watchers_count":6409,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":281,"mirror_url":null,"open_issues_count":59,"forks":281,"open_issues":59,"watchers":6409,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mobxjs/mobx/pulls/679"},"html":{"href":"https://github.com/mobxjs/mobx/pull/679"},"issue":{"href":"https://api.github.com/repos/mobxjs/mobx/issues/679"},"comments":{"href":"https://api.github.com/repos/mobxjs/mobx/issues/679/comments"},"review_comments":{"href":"https://api.github.com/repos/mobxjs/mobx/pulls/679/comments"},"review_comment":{"href":"https://api.github.com/repos/mobxjs/mobx/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mobxjs/mobx/pulls/679/commits"},"statuses":{"href":"https://api.github.com/repos/mobxjs/mobx/statuses/cf5dd2bd3cc0d21b9ce73255c71d9ce0da418b44"}}}}
{"actor":{"display_login":"mweststrate"}}