Skip to content

Commit e44103a

Browse files
authored
fix: tailUpdate might be blocked by a PureComponent (#1448)
1 parent 74d3d9b commit e44103a

File tree

3 files changed

+40
-37
lines changed

3 files changed

+40
-37
lines changed

examples/styled-components/package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@
2323
"dependencies": {
2424
"babel-polyfill": "^6.26.0",
2525
"emotion": "^8.0.12",
26-
"react": "^16.13.0",
27-
"react-dom": "^16.13.0",
26+
"react": "^16.13.1",
27+
"react-dom": "^16.13.1",
2828
"react-emotion": "^9.2.12",
29-
"react-hot-loader": "^4.6.5",
29+
"react-hot-loader": "^4.12.21",
3030
"react-spring": "^8.0.25",
3131
"styled-components": "^4.0.3"
3232
}

examples/styled-components/yarn.lock

+34-33
Original file line numberDiff line numberDiff line change
@@ -2665,10 +2665,12 @@ hmac-drbg@^1.0.0:
26652665
minimalistic-assert "^1.0.0"
26662666
minimalistic-crypto-utils "^1.0.1"
26672667

2668-
hoist-non-react-statics@^2.5.0:
2669-
version "2.5.0"
2670-
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.0.tgz#d2ca2dfc19c5a91c5a6615ce8e564ef0347e2a40"
2671-
integrity sha512-6Bl6XsDT1ntE0lHbIhr4Kp2PGcleGZ66qu5Jqk8lc0Xc/IeG6gVLmwUGs/K0Us+L8VWoKgj0uWdPMataOsm31w==
2668+
hoist-non-react-statics@^3.3.0:
2669+
version "3.3.2"
2670+
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz#ece0acaf71d62c2969c2ec59feff42a4b1a85b45"
2671+
integrity sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==
2672+
dependencies:
2673+
react-is "^16.7.0"
26722674

26732675
home-or-tmp@^2.0.0:
26742676
version "2.0.0"
@@ -3250,11 +3252,6 @@ lodash.debounce@^4.0.8:
32503252
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
32513253
integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168=
32523254

3253-
lodash.merge@^4.6.1:
3254-
version "4.6.1"
3255-
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54"
3256-
integrity sha512-AOYza4+Hf5z1/0Hztxpm2/xiPZgi/cjMqdnKTUWTBSKchJlxXXuUSxCCl8rJlf4g6yww/j6mA8nC8Hw/EZWxKQ==
3257-
32583255
lodash@^4.17.10, lodash@^4.17.5:
32593256
version "4.17.11"
32603257
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
@@ -4250,15 +4247,15 @@ rc@^1.2.7:
42504247
minimist "^1.2.0"
42514248
strip-json-comments "~2.0.1"
42524249

4253-
react-dom@^16.13.0:
4254-
version "16.13.0"
4255-
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.0.tgz#cdde54b48eb9e8a0ca1b3dc9943d9bb409b81866"
4256-
integrity sha512-y09d2c4cG220DzdlFkPTnVvGTszVvNpC73v+AaLGLHbkpy3SSgvYq8x0rNwPJ/Rk/CicTNgk0hbHNw1gMEZAXg==
4250+
react-dom@^16.13.1:
4251+
version "16.13.1"
4252+
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.13.1.tgz#c1bd37331a0486c078ee54c4740720993b2e0e7f"
4253+
integrity sha512-81PIMmVLnCNLO/fFOQxdQkvEq/+Hfpv24XNJfpyZhTRfO0QcmQIF/PgCa1zCOj2w1hrn12MFLyaJ/G0+Mxtfag==
42574254
dependencies:
42584255
loose-envify "^1.1.0"
42594256
object-assign "^4.1.1"
42604257
prop-types "^15.6.2"
4261-
scheduler "^0.19.0"
4258+
scheduler "^0.19.1"
42624259

42634260
react-emotion@^9.2.12:
42644261
version "9.2.12"
@@ -4268,26 +4265,30 @@ react-emotion@^9.2.12:
42684265
babel-plugin-emotion "^9.2.11"
42694266
create-emotion-styled "^9.2.8"
42704267

4271-
react-hot-loader@^4.6.5:
4272-
version "4.6.5"
4273-
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.6.5.tgz#059619c8ac2aae9c6e8178ddc2eac535093cdd2e"
4274-
integrity sha512-ZPAJEWVd8KDdm6dcK0iWrnJiGHruLrcbkIpqn/wQmNjnROpsm2nzrWh23Yh3I/XAjB+35pMa/ZgariwGqwFD9A==
4268+
react-hot-loader@^4.12.21:
4269+
version "4.12.21"
4270+
resolved "https://registry.yarnpkg.com/react-hot-loader/-/react-hot-loader-4.12.21.tgz#332e830801fb33024b5a147d6b13417f491eb975"
4271+
integrity sha512-Ynxa6ROfWUeKWsTHxsrL2KMzujxJVPjs385lmB2t5cHUxdoRPGind9F00tOkdc1l5WBleOF4XEAMILY1KPIIDA==
42754272
dependencies:
42764273
fast-levenshtein "^2.0.6"
42774274
global "^4.3.0"
4278-
hoist-non-react-statics "^2.5.0"
4275+
hoist-non-react-statics "^3.3.0"
42794276
loader-utils "^1.1.0"
4280-
lodash.merge "^4.6.1"
42814277
prop-types "^15.6.1"
42824278
react-lifecycles-compat "^3.0.4"
4283-
shallowequal "^1.0.2"
4279+
shallowequal "^1.1.0"
42844280
source-map "^0.7.3"
42854281

42864282
react-is@^16.6.0:
42874283
version "16.6.1"
42884284
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.6.1.tgz#f77b1c3d901be300abe8d58645b7a59e794e5982"
42894285
integrity sha512-wOKsGtvTMYs7WAscmwwdM8sfRRvE17Ym30zFj3n37Qx5tHRfhenPKEPILHaHob6WoLFADmQm1ZNrE5xMCM6sCw==
42904286

4287+
react-is@^16.7.0:
4288+
version "16.13.1"
4289+
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
4290+
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==
4291+
42914292
react-is@^16.8.1:
42924293
version "16.8.6"
42934294
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.8.6.tgz#5bbc1e2d29141c9fbdfed456343fe2bc430a6a16"
@@ -4306,10 +4307,10 @@ react-spring@^8.0.25:
43064307
"@babel/runtime" "^7.3.1"
43074308
prop-types "^15.5.8"
43084309

4309-
react@^16.13.0:
4310-
version "16.13.0"
4311-
resolved "https://registry.yarnpkg.com/react/-/react-16.13.0.tgz#d046eabcdf64e457bbeed1e792e235e1b9934cf7"
4312-
integrity sha512-TSavZz2iSLkq5/oiE7gnFzmURKZMltmi193rm5HEoUDAXpzT9Kzw6oNZnGoai/4+fUnm7FqS5dwgUL34TujcWQ==
4310+
react@^16.13.1:
4311+
version "16.13.1"
4312+
resolved "https://registry.yarnpkg.com/react/-/react-16.13.1.tgz#2e818822f1a9743122c063d6410d85c1e3afe48e"
4313+
integrity sha512-YMZQQq32xHLX0bz5Mnibv1/LHb3Sqzngu7xstSM+vrkE5Kzr9xE0yMByK5kMoTK30YVJE61WfbxIFFvfeDKT1w==
43134314
dependencies:
43144315
loose-envify "^1.1.0"
43154316
object-assign "^4.1.1"
@@ -4555,10 +4556,10 @@ sax@^1.2.4:
45554556
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
45564557
integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==
45574558

4558-
scheduler@^0.19.0:
4559-
version "0.19.0"
4560-
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.0.tgz#a715d56302de403df742f4a9be11975b32f5698d"
4561-
integrity sha512-xowbVaTPe9r7y7RUejcK73/j8tt2jfiyTednOvHbA8JoClvMYCp+r8QegLwK/n8zWQAtZb1fFnER4XLBZXrCxA==
4559+
scheduler@^0.19.1:
4560+
version "0.19.1"
4561+
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196"
4562+
integrity sha512-n/zwRWRYSUj0/3g/otKDRPMh6qv2SYMWNq85IEa8iZyAv8od9zDYpGSnpBEjNgcMNq6Scbu5KfIPxNF72R/2EA==
45624563
dependencies:
45634564
loose-envify "^1.1.0"
45644565
object-assign "^4.1.1"
@@ -4702,10 +4703,10 @@ sha.js@^2.4.0, sha.js@^2.4.8:
47024703
inherits "^2.0.1"
47034704
safe-buffer "^5.0.1"
47044705

4705-
shallowequal@^1.0.2:
4706-
version "1.0.2"
4707-
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.0.2.tgz#1561dbdefb8c01408100319085764da3fcf83f8f"
4708-
integrity sha512-zlVXeVUKvo+HEv1e2KQF/csyeMKx2oHvatQ9l6XjCUj3agvC8XGf6R9HvIPDSmp8FNPvx7b5kaEJTRi7CqxtEw==
4706+
shallowequal@^1.1.0:
4707+
version "1.1.0"
4708+
resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
4709+
integrity sha512-y0m1JoUZSlPAjXVtPPW70aZWfIL/dSP7AFkRnniLCrK/8MDKog3TySTBmckD+RObVxH0v4Tox67+F14PdED2oQ==
47094710

47104711
shebang-command@^1.2.0:
47114712
version "1.2.0"

src/hot.dev.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { isOpened as isModuleOpened, hotModule, getLastModuleOpened } from './gl
1010
import logger from './logger';
1111
import { clearExceptions, logException } from './errorReporter';
1212
import { createQueue } from './utils/runQueue';
13-
import { enterHotUpdate, getHotGeneration } from './global/generation';
13+
import { enterHotUpdate, getHotGeneration, increment } from './global/generation';
1414

1515
/* eslint-disable camelcase, no-undef */
1616
const requireIndirect = typeof __webpack_require__ !== 'undefined' ? __webpack_require__ : require;
@@ -69,6 +69,8 @@ const makeHotExport = (sourceModule, moduleId) => {
6969
logger.warn(
7070
'React-Hot-Loader: some components were updated out-of-bound. Updating your app to reconcile the changes.',
7171
);
72+
// increment generator for cache-busting existing tree
73+
increment();
7274
deepUpdate();
7375
} else if (++runLimit < 5) {
7476
checkTailUpdates();

0 commit comments

Comments
 (0)