Skip to content
This repository was archived by the owner on Dec 31, 2020. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mobxjs/mobx-react
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5.3.1
Choose a base ref
...
head repository: mobxjs/mobx-react
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 5.3.2
Choose a head ref
  • 7 commits
  • 6 files changed
  • 5 contributors

Commits on Oct 16, 2018

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    d34c611 View commit details
  2. Merge pull request #573 from ThaJay/patch-1

    neglectable to negligible
    mattruby authored Oct 16, 2018
    Copy the full SHA
    b807dcd View commit details
  3. Update CHANGELOG.md

    xaviergonz authored Oct 16, 2018
    Copy the full SHA
    f4a1900 View commit details
  4. Copy the full SHA
    83a5c57 View commit details
  5. fix process env missing

    xaviergonz committed Oct 16, 2018
    Copy the full SHA
    dd25794 View commit details

Commits on Oct 18, 2018

  1. Merge pull request #576 from mobxjs/fix-process-env

    fix process env missing
    mweststrate authored Oct 18, 2018
    Copy the full SHA
    9589bbf View commit details
  2. Published version 5.3.2

    mweststrate committed Oct 18, 2018
    Copy the full SHA
    7788463 View commit details
Showing with 63 additions and 41 deletions.
  1. +5 −1 CHANGELOG.md
  2. +1 −1 README.md
  3. +5 −3 build-rollup.js
  4. +3 −2 package.json
  5. +2 −2 src/index.d.ts
  6. +47 −32 yarn.lock
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
# MobX-React Changelog

### 5.3.2

* Fixed: "process not defined", [#574](https://github.com/mobxjs/mobx-react/pull/574/) through [#576](https://github.com/mobxjs/mobx-react/pull/576/) by [@xaviergonz](https://github.com/xaviergonz)

### 5.3.0 / 5.3.1

_5.3.0 was retracted as files were not generated correctly during publish_

* Added `disposeOnUmount` utility / decorator to call disposable properties (reaction, autorun, etc) automatically on `componentWillUnmount`
* Added `disposeOnUnmount` utility / decorator to call disposable properties (reaction, autorun, etc) automatically on `componentWillUnmount`
* Introduced new method to patch lifecycle methods which should be more compatible with for example arrow functions.


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -454,7 +454,7 @@ class SomeComponent extends React.Component {
You should use `observer` on every component that displays observable data.
Even the small ones. `observer` allows components to render independently from their parent and in general this means that
the more you use `observer`, the better the performance become.
The overhead of `observer` itself is neglectable.
The overhead of `observer` itself is negligible.
See also [Do child components need `@observer`?](https://github.com/mobxjs/mobx/issues/101)

**I see React warnings about `forceUpdate` / `setState` from React**
8 changes: 5 additions & 3 deletions build-rollup.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
var path = require("path")
var filesize = require("rollup-plugin-filesize")
var babel = require("rollup-plugin-babel")

var commonjs = require("rollup-plugin-commonjs")
var resolve = require("rollup-plugin-node-resolve")

var uglify = require("rollup-plugin-uglify").uglify
var alias = require("rollup-plugin-alias")
var replace = require("rollup-plugin-replace")

var { rollup } = require("rollup")

var reactDomModulePath = require.resolve("react-dom")
var emptyModulePath = path.resolve(__dirname, "empty.js")

function getExternals(target) {
@@ -37,6 +35,10 @@ function getAliases(target) {

function build(target, mode, filename) {
var plugins = [
replace({
// for depencencies such as react-is
"process.env.NODE_ENV": JSON.stringify("production")
}),
alias(getAliases(target)),
babel({
exclude: "node_modules/**"
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mobx-react",
"version": "5.3.1",
"version": "5.3.2",
"description": "React bindings for MobX. Create fully reactive components.",
"main": "index.js",
"jsnext:main": "index.module.js",
@@ -63,8 +63,9 @@
"rollup-plugin-alias": "^1.3.0",
"rollup-plugin-babel": "^4.0.3",
"rollup-plugin-commonjs": "^9.0.0",
"rollup-plugin-filesize": "^4.0.0",
"rollup-plugin-filesize": "^5.0.0",
"rollup-plugin-node-resolve": "^3.0.0",
"rollup-plugin-replace": "^2.1.0",
"rollup-plugin-uglify": "^6.0.0",
"shelljs": "^0.8.2",
"shx": "^0.3.2",
4 changes: 2 additions & 2 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -64,9 +64,9 @@ export function inject<S, P, I, C>(
* disposeOnUnmount
*/
type Disposer = () => void
export function disposeOnUnmount(target: React.Component<any, any, any>, propertyKey: string): void
export function disposeOnUnmount(target: React.Component<any, any>, propertyKey: string): void
export function disposeOnUnmount<TF extends Disposer | Disposer[]>(
target: React.Component<any, any, any>,
target: React.Component<any, any>,
fn: TF
): TF

79 changes: 47 additions & 32 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -1129,16 +1129,16 @@ boolbase@~1.0.0:
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=

boxen@^1.1.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b"
integrity sha512-TNPjfTr432qx7yOjQyaXm3dSR0MH9vXp7eT1BFSl/C51g+EFnOR9hTg1IreahGBmDNCehscshe45f+C1TBZbLw==
boxen@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/boxen/-/boxen-2.0.0.tgz#46ba3953b1a3d99aaf89ad8c7104a32874934a58"
integrity sha512-9DK9PQqcOpsvlKOK3f3lVK+vQsqH4JDGMX73FCWcHRxQQtop1U8urn4owrt5rnc2NgZAJ6wWjTDBc7Fhv+vz/w==
dependencies:
ansi-align "^2.0.0"
camelcase "^4.0.0"
chalk "^2.0.1"
camelcase "^5.0.0"
chalk "^2.4.1"
cli-boxes "^1.0.0"
string-width "^2.0.0"
string-width "^2.1.1"
term-size "^1.2.0"
widest-line "^2.0.0"

@@ -1175,10 +1175,10 @@ braces@^2.3.1:
split-string "^3.0.2"
to-regex "^3.0.1"

brotli-size@0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/brotli-size/-/brotli-size-0.0.2.tgz#5a0bf4282201c9fb78afb414182e50f53bcc5e1b"
integrity sha512-8Fblpr9EX6ySFNBLPhcv1j6Y7nQLStdWnzxzGOrjyFilrN/HA5Hmv9xYVwQ+dCqHgPSnWg26tYxg67IbBqTh5g==
brotli-size@0.0.3:
version "0.0.3"
resolved "https://registry.yarnpkg.com/brotli-size/-/brotli-size-0.0.3.tgz#1d3855b38f182591a6f69da1516131676e5f62f2"
integrity sha512-bBIdd8uUGxKGldAVykxOqPegl+HlIm4FpXJamwWw5x77WCE8jO7AhXFE1YXOhOB28gS+2pTQete0FqRE6U5hQQ==
dependencies:
duplexer "^0.1.1"
iltorb "^2.0.5"
@@ -1277,11 +1277,16 @@ camelcase@^2.0.0:
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
integrity sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=

camelcase@^4.0.0, camelcase@^4.1.0:
camelcase@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=

camelcase@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42"
integrity sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==

caniuse-lite@^1.0.30000889:
version "1.0.30000890"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000890.tgz#86a18ffcc65d79ec6a437e985761b8bf1c4efeaf"
@@ -1310,7 +1315,7 @@ chalk@^1.0.0, chalk@^1.1.3:
strip-ansi "^3.0.0"
supports-color "^2.0.0"

chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.1:
chalk@^2.0.0, chalk@^2.0.1, chalk@^2.3.1, chalk@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==
@@ -1415,7 +1420,7 @@ colors@0.5.x:
resolved "https://registry.yarnpkg.com/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774"
integrity sha1-fQAj6usVTo7p/Oddy5I9DtFmd3Q=

colors@^1.1.2:
colors@^1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.2.tgz#2df8ff573dfbf255af562f8ce7181d6b971a359b"
integrity sha512-rhP0JSBGYvpcNQj4s5AdShMeE5ahMop96cTeDl/v9qQQm2fYClE2QXZRi8wLzc+GmXSxdIqqbOIAhyObEXDbfQ==
@@ -2109,7 +2114,7 @@ fileset@^2.0.2:
glob "^7.0.3"
minimatch "^3.0.3"

filesize@^3.5.6:
filesize@^3.6.1:
version "3.6.1"
resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317"
integrity sha512-7KjR1vv6qnicaPMi1iiTcI85CyYwRO/PSFCu6SvqL8jN2Wjt/NIYQTFtFs7fSDCYOstUkEWIQGFUg5YZQfjlcg==
@@ -2342,12 +2347,13 @@ growly@^1.3.0:
resolved "https://registry.yarnpkg.com/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
integrity sha1-8QdIy+dq+WS3yWyTxrzCivEgwIE=

gzip-size@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-3.0.0.tgz#546188e9bdc337f673772f81660464b389dce520"
integrity sha1-VGGI6b3DN/Zzdy+BZgRks4nc5SA=
gzip-size@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.0.0.tgz#a55ecd99222f4c48fd8c01c625ce3b349d0a0e80"
integrity sha512-5iI7omclyqrnWw4XbXAmGhPsABkSIDQonv2K0h61lybgofWa6iZyvrI3r2zsJH4P8Nb64fFVzlvfhs0g7BBxAA==
dependencies:
duplexer "^0.1.1"
pify "^3.0.0"

handlebars@^4.0.3:
version "4.0.12"
@@ -3746,7 +3752,7 @@ mimic-response@^1.0.0:
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==

minimatch@^3.0.3, minimatch@^3.0.4:
minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==
@@ -4860,18 +4866,18 @@ rollup-plugin-commonjs@^9.0.0:
resolve "^1.8.1"
rollup-pluginutils "^2.3.3"

rollup-plugin-filesize@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/rollup-plugin-filesize/-/rollup-plugin-filesize-4.0.1.tgz#9c5e682716cea026025ebf99720b4e603b20545c"
integrity sha512-S7W6/G5+KCusq3gXwTOXQIqg88dKdv6jXhgQtZ8F1kJ9ecctzuUsWzE9yeVhcbGW92U0SgAerfOASOhBvEIN3g==
rollup-plugin-filesize@^5.0.0:
version "5.0.1"
resolved "https://registry.yarnpkg.com/rollup-plugin-filesize/-/rollup-plugin-filesize-5.0.1.tgz#442a994465abf4f4f63ea20ac3267c3e0d05ee5d"
integrity sha512-zVUkEuJ543D86EaC5Ql2M6d6aAXwWbRwJ9NWSzTUS7F3vdd1cf+zlL+roQY8sW2hLIpbDMnGfev0dcy4bHQbjw==
dependencies:
boxen "^1.1.0"
brotli-size "0.0.2"
colors "^1.1.2"
boxen "^2.0.0"
brotli-size "0.0.3"
colors "^1.3.2"
deep-assign "^2.0.0"
filesize "^3.5.6"
gzip-size "^3.0.0"
terser "^3.8.0"
filesize "^3.6.1"
gzip-size "^5.0.0"
terser "^3.10.0"

rollup-plugin-node-resolve@^3.0.0:
version "3.4.0"
@@ -4882,6 +4888,15 @@ rollup-plugin-node-resolve@^3.0.0:
is-module "^1.0.0"
resolve "^1.1.6"

rollup-plugin-replace@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-replace/-/rollup-plugin-replace-2.1.0.tgz#f9c07a4a89a2f8be912ee54b3f0f68d91e9ed0ae"
integrity sha512-SxrAIgpH/B5/W4SeULgreOemxcpEgKs2gcD42zXw50bhqGWmcnlXneVInQpAqzA/cIly4bJrOpeelmB9p4YXSQ==
dependencies:
magic-string "^0.25.1"
minimatch "^3.0.2"
rollup-pluginutils "^2.0.1"

rollup-plugin-uglify@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/rollup-plugin-uglify/-/rollup-plugin-uglify-6.0.0.tgz#15aa8919e5cdc63b7cfc9319c781788b40084ce4"
@@ -4892,7 +4907,7 @@ rollup-plugin-uglify@^6.0.0:
serialize-javascript "^1.5.0"
uglify-js "^3.4.9"

rollup-pluginutils@^2.3.0, rollup-pluginutils@^2.3.3:
rollup-pluginutils@^2.0.1, rollup-pluginutils@^2.3.0, rollup-pluginutils@^2.3.3:
version "2.3.3"
resolved "https://registry.yarnpkg.com/rollup-pluginutils/-/rollup-pluginutils-2.3.3.tgz#3aad9b1eb3e7fe8262820818840bf091e5ae6794"
integrity sha512-2XZwja7b6P5q4RZ5FhyX1+f46xi1Z3qBKigLRZ6VTZjwbN0K1IFGMlwm06Uu0Emcre2Z63l77nq/pzn+KxIEoA==
@@ -5432,7 +5447,7 @@ term-size@^1.2.0:
dependencies:
execa "^0.7.0"

terser@^3.8.0:
terser@^3.10.0:
version "3.10.0"
resolved "https://registry.yarnpkg.com/terser/-/terser-3.10.0.tgz#6ae15dafecbd02c9788d5f36d27fca32196b533a"
integrity sha512-hNh2WR3YxtKoY7BNSb3+CJ9Xv9bbUuOU9uriIf2F1tiAYNA4rNy2wWuSDV8iKcag27q65KPJ/sPpMWEh6qttgw==