Skip to content

Commit 3b09625

Browse files
committed
Remove propTypes checks for legacy context (#28324)
Part of #28207, this is easy to land in isolation. The approach I'm taking is slightly different — instead of leaving validation on for legacy context, I disable the validation (it's DEV-only) and leave just the parts that drive the runtime logic. I.e. `contexTypes` and `childContextTypes` *values* are now ignored, the keys are used just like before. DiffTrain build for commit 64e755d.
1 parent c8055d7 commit 3b09625

File tree

13 files changed

+724
-769
lines changed

13 files changed

+724
-769
lines changed

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

Lines changed: 210 additions & 225 deletions
Large diffs are not rendered by default.

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<adb01bab728a3c61bc023c0af7267d95>>
10+
* @generated SignedSource<<0cb4809a577a97130ecfbee50ab3e6b1>>
1111
*/
1212

1313
"use strict";
@@ -555,18 +555,7 @@ function insertBefore(parentInstance, child, beforeChild) {
555555
parentInstance.children.splice(beforeChild, 0, child);
556556
}
557557
var scheduleTimeout = setTimeout,
558-
cancelTimeout = clearTimeout;
559-
function describeComponentFrame(name, ownerName) {
560-
var sourceInfo = "";
561-
ownerName && (sourceInfo = " (created by " + ownerName + ")");
562-
return "\n in " + (name || "Unknown") + sourceInfo;
563-
}
564-
function describeFunctionComponentFrame(fn) {
565-
return fn
566-
? describeComponentFrame(fn.displayName || fn.name || null, null)
567-
: "";
568-
}
569-
var hasOwnProperty = Object.prototype.hasOwnProperty,
558+
cancelTimeout = clearTimeout,
570559
valueStack = [],
571560
index = -1;
572561
function createCursor(defaultValue) {
@@ -1305,6 +1294,17 @@ function commitCallbacks(updateQueue, context) {
13051294
)
13061295
callCallback(callbacks[updateQueue], context);
13071296
}
1297+
function describeComponentFrame(name, ownerName) {
1298+
var sourceInfo = "";
1299+
ownerName && (sourceInfo = " (created by " + ownerName + ")");
1300+
return "\n in " + (name || "Unknown") + sourceInfo;
1301+
}
1302+
function describeFunctionComponentFrame(fn) {
1303+
return fn
1304+
? describeComponentFrame(fn.displayName || fn.name || null, null)
1305+
: "";
1306+
}
1307+
var hasOwnProperty = Object.prototype.hasOwnProperty;
13081308
function shallowEqual(objA, objB) {
13091309
if (objectIs(objA, objB)) return !0;
13101310
if (
@@ -9169,7 +9169,7 @@ var devToolsConfig$jscomp$inline_1024 = {
91699169
throw Error("TestRenderer does not support findFiberByHostInstance()");
91709170
},
91719171
bundleType: 0,
9172-
version: "18.3.0-canary-f0e808e5b-20240214",
9172+
version: "18.3.0-canary-64e755d73-20240214",
91739173
rendererPackageName: "react-test-renderer"
91749174
};
91759175
var internals$jscomp$inline_1205 = {
@@ -9200,7 +9200,7 @@ var internals$jscomp$inline_1205 = {
92009200
scheduleRoot: null,
92019201
setRefreshHandler: null,
92029202
getCurrentFiber: null,
9203-
reconcilerVersion: "18.3.0-canary-f0e808e5b-20240214"
9203+
reconcilerVersion: "18.3.0-canary-64e755d73-20240214"
92049204
};
92059205
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
92069206
var hook$jscomp$inline_1206 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* @noflow
88
* @nolint
99
* @preventMunge
10-
* @generated SignedSource<<56211850a5bfe49e2a3557f65407e9d3>>
10+
* @generated SignedSource<<e2fda40292ee00c06b02f55448c4e2b7>>
1111
*/
1212

1313
"use strict";
@@ -573,18 +573,7 @@ function insertBefore(parentInstance, child, beforeChild) {
573573
parentInstance.children.splice(beforeChild, 0, child);
574574
}
575575
var scheduleTimeout = setTimeout,
576-
cancelTimeout = clearTimeout;
577-
function describeComponentFrame(name, ownerName) {
578-
var sourceInfo = "";
579-
ownerName && (sourceInfo = " (created by " + ownerName + ")");
580-
return "\n in " + (name || "Unknown") + sourceInfo;
581-
}
582-
function describeFunctionComponentFrame(fn) {
583-
return fn
584-
? describeComponentFrame(fn.displayName || fn.name || null, null)
585-
: "";
586-
}
587-
var hasOwnProperty = Object.prototype.hasOwnProperty,
576+
cancelTimeout = clearTimeout,
588577
valueStack = [],
589578
index = -1;
590579
function createCursor(defaultValue) {
@@ -1325,6 +1314,17 @@ function commitCallbacks(updateQueue, context) {
13251314
)
13261315
callCallback(callbacks[updateQueue], context);
13271316
}
1317+
function describeComponentFrame(name, ownerName) {
1318+
var sourceInfo = "";
1319+
ownerName && (sourceInfo = " (created by " + ownerName + ")");
1320+
return "\n in " + (name || "Unknown") + sourceInfo;
1321+
}
1322+
function describeFunctionComponentFrame(fn) {
1323+
return fn
1324+
? describeComponentFrame(fn.displayName || fn.name || null, null)
1325+
: "";
1326+
}
1327+
var hasOwnProperty = Object.prototype.hasOwnProperty;
13281328
function shallowEqual(objA, objB) {
13291329
if (objectIs(objA, objB)) return !0;
13301330
if (
@@ -9597,7 +9597,7 @@ var devToolsConfig$jscomp$inline_1066 = {
95979597
throw Error("TestRenderer does not support findFiberByHostInstance()");
95989598
},
95999599
bundleType: 0,
9600-
version: "18.3.0-canary-f0e808e5b-20240214",
9600+
version: "18.3.0-canary-64e755d73-20240214",
96019601
rendererPackageName: "react-test-renderer"
96029602
};
96039603
var internals$jscomp$inline_1246 = {
@@ -9628,7 +9628,7 @@ var internals$jscomp$inline_1246 = {
96289628
scheduleRoot: null,
96299629
setRefreshHandler: null,
96309630
getCurrentFiber: null,
9631-
reconcilerVersion: "18.3.0-canary-f0e808e5b-20240214"
9631+
reconcilerVersion: "18.3.0-canary-64e755d73-20240214"
96329632
};
96339633
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
96349634
var hook$jscomp$inline_1247 = __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
@@ -24,7 +24,7 @@ if (__DEV__) {
2424
) {
2525
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
2626
}
27-
var ReactVersion = "18.3.0-canary-f0e808e5b-20240214";
27+
var ReactVersion = "18.3.0-canary-64e755d73-20240214";
2828

2929
// ATTENTION
3030
// 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
@@ -590,4 +590,4 @@ exports.useSyncExternalStore = function (
590590
exports.useTransition = function () {
591591
return ReactCurrentDispatcher.current.useTransition();
592592
};
593-
exports.version = "18.3.0-canary-f0e808e5b-20240214";
593+
exports.version = "18.3.0-canary-64e755d73-20240214";

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
@@ -586,7 +586,7 @@ exports.useSyncExternalStore = function (
586586
exports.useTransition = function () {
587587
return ReactCurrentDispatcher.current.useTransition();
588588
};
589-
exports.version = "18.3.0-canary-f0e808e5b-20240214";
589+
exports.version = "18.3.0-canary-64e755d73-20240214";
590590
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
591591
"function" ===
592592
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
f0e808e5bcbfdaa24a8a0893cd718f4d189f2369
1+
64e755d7374d753c75dc16ba1a4a09ce7b8689dd

0 commit comments

Comments
 (0)