Skip to content

Commit 0867ff0

Browse files
committed
[Flight] Instrument the Promise for Async Module instead of using a Module Cache (#26985)
Currently, since we use a module cache for async modules, it doesn't automatically get updated when the module registry gets updated (HMR). This technique ensures that if Webpack replaces the module (HMR) then we'll get the new Promise when we require it again. This technique doesn't work for ESM and probably not Vite since ESM will provide a new Promise each time you call `import()` but in the Webpack/CJS approach this Promise is an entry in the module cache and not a promise for the entry. I tried to replicate the original issue in the fixture but it's tricky to replicate because 1) we can't really use async modules the same way without compiling both server and client 2) even then I'm not quite sure how to repro the HMR issue. DiffTrain build for commit 5945e06.
1 parent 161c5ae commit 0867ff0

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23991,7 +23991,7 @@ function createFiberRoot(
2399123991
return root;
2399223992
}
2399323993

23994-
var ReactVersion = "18.3.0-canary-a1c62b8a7-20230627";
23994+
var ReactVersion = "18.3.0-canary-5945e068a-20230628";
2399523995

2399623996
// Might add PROFILE later.
2399723997

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8646,7 +8646,7 @@ var devToolsConfig$jscomp$inline_1036 = {
86468646
throw Error("TestRenderer does not support findFiberByHostInstance()");
86478647
},
86488648
bundleType: 0,
8649-
version: "18.3.0-canary-a1c62b8a7-20230627",
8649+
version: "18.3.0-canary-5945e068a-20230628",
86508650
rendererPackageName: "react-test-renderer"
86518651
};
86528652
var internals$jscomp$inline_1238 = {
@@ -8677,7 +8677,7 @@ var internals$jscomp$inline_1238 = {
86778677
scheduleRoot: null,
86788678
setRefreshHandler: null,
86798679
getCurrentFiber: null,
8680-
reconcilerVersion: "18.3.0-canary-a1c62b8a7-20230627"
8680+
reconcilerVersion: "18.3.0-canary-5945e068a-20230628"
86818681
};
86828682
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
86838683
var hook$jscomp$inline_1239 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9072,7 +9072,7 @@ var devToolsConfig$jscomp$inline_1078 = {
90729072
throw Error("TestRenderer does not support findFiberByHostInstance()");
90739073
},
90749074
bundleType: 0,
9075-
version: "18.3.0-canary-a1c62b8a7-20230627",
9075+
version: "18.3.0-canary-5945e068a-20230628",
90769076
rendererPackageName: "react-test-renderer"
90779077
};
90789078
var internals$jscomp$inline_1279 = {
@@ -9103,7 +9103,7 @@ var internals$jscomp$inline_1279 = {
91039103
scheduleRoot: null,
91049104
setRefreshHandler: null,
91059105
getCurrentFiber: null,
9106-
reconcilerVersion: "18.3.0-canary-a1c62b8a7-20230627"
9106+
reconcilerVersion: "18.3.0-canary-5945e068a-20230628"
91079107
};
91089108
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
91099109
var hook$jscomp$inline_1280 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-canary-a1c62b8a7-20230627";
30+
var ReactVersion = "18.3.0-canary-5945e068a-20230628";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,4 +623,4 @@ exports.useSyncExternalStore = function (
623623
);
624624
};
625625
exports.useTransition = useTransition;
626-
exports.version = "18.3.0-canary-a1c62b8a7-20230627";
626+
exports.version = "18.3.0-canary-5945e068a-20230628";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -626,7 +626,7 @@ exports.useSyncExternalStore = function (
626626
);
627627
};
628628
exports.useTransition = useTransition;
629-
exports.version = "18.3.0-canary-a1c62b8a7-20230627";
629+
exports.version = "18.3.0-canary-5945e068a-20230628";
630630

631631
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
632632
if (
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a1c62b8a7635c0bc51e477ba5437df9be5a9e64f
1+
5945e068abf1da4aec24aba2839abfbb0fe94a3d

0 commit comments

Comments
 (0)