Skip to content

Commit 66881e5

Browse files
committed
[forgive] Various fixes to prepare for internal sync (facebook#34928)
Fixes a few small things: - Update imports to reference root babel-plugin-react-compiler rather than from `[...]/src/...` - Remove unused cosmiconfig options parsing for now - Update type exports in babel-plugin-react-compiler accordingly DiffTrain build for [71b3a03](facebook@71b3a03)
1 parent eba05f6 commit 66881e5

39 files changed

+14677
-9341
lines changed

compiled/eslint-plugin-react-hooks/index.js

Lines changed: 726 additions & 492 deletions
Large diffs are not rendered by default.

compiled/facebook-www/JSXDEVRuntime-dev.classic.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,18 @@ __DEV__ &&
339339
exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {
340340
var trackActualOwner =
341341
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
342+
if (trackActualOwner) {
343+
var previousStackTraceLimit = Error.stackTraceLimit;
344+
Error.stackTraceLimit = 10;
345+
var debugStackDEV = Error("react-stack-top-frame");
346+
Error.stackTraceLimit = previousStackTraceLimit;
347+
} else debugStackDEV = unknownOwnerDebugStack;
342348
return jsxDEVImpl(
343349
type,
344350
config,
345351
maybeKey,
346352
isStaticChildren,
347-
trackActualOwner
348-
? Error("react-stack-top-frame")
349-
: unknownOwnerDebugStack,
353+
debugStackDEV,
350354
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
351355
);
352356
};

compiled/facebook-www/JSXDEVRuntime-dev.modern.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,14 +339,18 @@ __DEV__ &&
339339
exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {
340340
var trackActualOwner =
341341
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
342+
if (trackActualOwner) {
343+
var previousStackTraceLimit = Error.stackTraceLimit;
344+
Error.stackTraceLimit = 10;
345+
var debugStackDEV = Error("react-stack-top-frame");
346+
Error.stackTraceLimit = previousStackTraceLimit;
347+
} else debugStackDEV = unknownOwnerDebugStack;
342348
return jsxDEVImpl(
343349
type,
344350
config,
345351
maybeKey,
346352
isStaticChildren,
347-
trackActualOwner
348-
? Error("react-stack-top-frame")
349-
: unknownOwnerDebugStack,
353+
debugStackDEV,
350354
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
351355
);
352356
};

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a51f925217e7c2a92fe4df707487acb29cb12b1e
1+
71b3a03cc936c8eb30a6e6108abf5550f5037f71
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a51f925217e7c2a92fe4df707487acb29cb12b1e
1+
71b3a03cc936c8eb30a6e6108abf5550f5037f71

compiled/facebook-www/React-dev.classic.js

Lines changed: 116 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -536,42 +536,84 @@ __DEV__ &&
536536
}
537537
function lazyInitializer(payload) {
538538
if (-1 === payload._status) {
539-
var ctor = payload._result,
540-
thenable = ctor();
539+
var resolveDebugValue = null,
540+
rejectDebugValue = null;
541+
if (enableAsyncDebugInfo) {
542+
var ioInfo = payload._ioInfo;
543+
null != ioInfo &&
544+
((ioInfo.start = ioInfo.end = performance.now()),
545+
(ioInfo.value = new Promise(function (resolve, reject) {
546+
resolveDebugValue = resolve;
547+
rejectDebugValue = reject;
548+
})));
549+
}
550+
ioInfo = payload._result;
551+
var thenable = ioInfo();
541552
thenable.then(
542553
function (moduleObject) {
543-
if (0 === payload._status || -1 === payload._status) {
544-
payload._status = 1;
545-
payload._result = moduleObject;
546-
var _ioInfo = payload._ioInfo;
547-
null != _ioInfo && (_ioInfo.end = performance.now());
548-
void 0 === thenable.status &&
549-
((thenable.status = "fulfilled"),
550-
(thenable.value = moduleObject));
551-
}
554+
if (0 === payload._status || -1 === payload._status)
555+
if (
556+
((payload._status = 1),
557+
(payload._result = moduleObject),
558+
enableAsyncDebugInfo)
559+
) {
560+
var _ioInfo = payload._ioInfo;
561+
if (null != _ioInfo) {
562+
_ioInfo.end = performance.now();
563+
var debugValue =
564+
null == moduleObject ? void 0 : moduleObject.default;
565+
resolveDebugValue(debugValue);
566+
_ioInfo.value.status = "fulfilled";
567+
_ioInfo.value.value = debugValue;
568+
}
569+
void 0 === thenable.status &&
570+
((thenable.status = "fulfilled"),
571+
(thenable.value = moduleObject));
572+
}
552573
},
553574
function (error) {
554575
if (0 === payload._status || -1 === payload._status)
555-
(payload._status = 2), (payload._result = error);
576+
if (
577+
((payload._status = 2),
578+
(payload._result = error),
579+
enableAsyncDebugInfo)
580+
) {
581+
var _ioInfo2 = payload._ioInfo;
582+
null != _ioInfo2 &&
583+
((_ioInfo2.end = performance.now()),
584+
_ioInfo2.value.then(noop, noop),
585+
rejectDebugValue(error),
586+
(_ioInfo2.value.status = "rejected"),
587+
(_ioInfo2.value.reason = error));
588+
void 0 === thenable.status &&
589+
((thenable.status = "rejected"), (thenable.reason = error));
590+
}
556591
}
557592
);
593+
if (
594+
enableAsyncDebugInfo &&
595+
((ioInfo = payload._ioInfo), null != ioInfo)
596+
) {
597+
var displayName = thenable.displayName;
598+
"string" === typeof displayName && (ioInfo.name = displayName);
599+
}
558600
-1 === payload._status &&
559601
((payload._status = 0), (payload._result = thenable));
560602
}
561603
if (1 === payload._status)
562604
return (
563-
(ctor = payload._result),
564-
void 0 === ctor &&
605+
(ioInfo = payload._result),
606+
void 0 === ioInfo &&
565607
console.error(
566608
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?",
567-
ctor
609+
ioInfo
568610
),
569-
"default" in ctor ||
611+
"default" in ioInfo ||
570612
console.error(
571613
"lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))",
572-
ctor
614+
ioInfo
573615
),
574-
ctor.default
616+
ioInfo.default
575617
);
576618
throw payload._result;
577619
}
@@ -586,6 +628,9 @@ __DEV__ &&
586628
function useMemoCache(size) {
587629
return resolveDispatcher().useMemoCache(size);
588630
}
631+
function useEffectEvent(callback) {
632+
return resolveDispatcher().useEffectEvent(callback);
633+
}
589634
function releaseAsyncTransition() {
590635
ReactSharedInternals.asyncTransitions--;
591636
}
@@ -741,7 +786,8 @@ __DEV__ &&
741786
var dynamicFeatureFlags = require("ReactFeatureFlags"),
742787
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
743788
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
744-
enableViewTransition = dynamicFeatureFlags.enableViewTransition;
789+
enableViewTransition = dynamicFeatureFlags.enableViewTransition,
790+
enableAsyncDebugInfo = dynamicFeatureFlags.enableAsyncDebugInfo;
745791
dynamicFeatureFlags = Symbol.for("react.element");
746792
var REACT_ELEMENT_TYPE = renameElementSymbol
747793
? Symbol.for("react.transitional.element")
@@ -940,6 +986,7 @@ __DEV__ &&
940986
exports.PureComponent = PureComponent;
941987
exports.StrictMode = REACT_STRICT_MODE_TYPE;
942988
exports.Suspense = REACT_SUSPENSE_TYPE;
989+
exports.ViewTransition = REACT_VIEW_TRANSITION_TYPE;
943990
exports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =
944991
ReactSharedInternals;
945992
exports.__COMPILER_RUNTIME = fnName;
@@ -1054,6 +1101,7 @@ __DEV__ &&
10541101
}
10551102
};
10561103
};
1104+
exports.addTransitionType = addTransitionType;
10571105
exports.c = useMemoCache;
10581106
exports.cache = function (fn) {
10591107
return function () {
@@ -1141,6 +1189,7 @@ __DEV__ &&
11411189
exports.createElement = function (type, config, children) {
11421190
for (var i = 2; i < arguments.length; i++)
11431191
validateChildKeys(arguments[i]);
1192+
var propName;
11441193
i = {};
11451194
var key = null;
11461195
if (null != config)
@@ -1181,13 +1230,18 @@ __DEV__ &&
11811230
? type.displayName || type.name || "Unknown"
11821231
: type
11831232
);
1184-
var propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1233+
(propName = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++)
1234+
? ((childArray = Error.stackTraceLimit),
1235+
(Error.stackTraceLimit = 10),
1236+
(childrenLength = Error("react-stack-top-frame")),
1237+
(Error.stackTraceLimit = childArray))
1238+
: (childrenLength = unknownOwnerDebugStack);
11851239
return ReactElement(
11861240
type,
11871241
key,
11881242
i,
11891243
getOwner(),
1190-
propName ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
1244+
childrenLength,
11911245
propName ? createTask(getTaskName(type)) : unknownOwnerDebugTask
11921246
);
11931247
};
@@ -1196,9 +1250,7 @@ __DEV__ &&
11961250
Object.seal(refObject);
11971251
return refObject;
11981252
};
1199-
exports.experimental_useEffectEvent = function (callback) {
1200-
return resolveDispatcher().useEffectEvent(callback);
1201-
};
1253+
exports.experimental_useEffectEvent = useEffectEvent;
12021254
exports.forwardRef = function (render) {
12031255
null != render && render.$$typeof === REACT_MEMO_TYPE
12041256
? console.error(
@@ -1244,51 +1296,78 @@ __DEV__ &&
12441296
exports.jsx = function (type, config, maybeKey) {
12451297
var trackActualOwner =
12461298
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1299+
if (trackActualOwner) {
1300+
var previousStackTraceLimit = Error.stackTraceLimit;
1301+
Error.stackTraceLimit = 10;
1302+
var debugStackDEV = Error("react-stack-top-frame");
1303+
Error.stackTraceLimit = previousStackTraceLimit;
1304+
} else debugStackDEV = unknownOwnerDebugStack;
12471305
return jsxDEVImpl(
12481306
type,
12491307
config,
12501308
maybeKey,
12511309
!1,
1252-
trackActualOwner
1253-
? Error("react-stack-top-frame")
1254-
: unknownOwnerDebugStack,
1310+
debugStackDEV,
12551311
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
12561312
);
12571313
};
12581314
exports.jsxDEV = function (type, config, maybeKey, isStaticChildren) {
12591315
var trackActualOwner =
12601316
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1317+
if (trackActualOwner) {
1318+
var previousStackTraceLimit = Error.stackTraceLimit;
1319+
Error.stackTraceLimit = 10;
1320+
var debugStackDEV = Error("react-stack-top-frame");
1321+
Error.stackTraceLimit = previousStackTraceLimit;
1322+
} else debugStackDEV = unknownOwnerDebugStack;
12611323
return jsxDEVImpl(
12621324
type,
12631325
config,
12641326
maybeKey,
12651327
isStaticChildren,
1266-
trackActualOwner
1267-
? Error("react-stack-top-frame")
1268-
: unknownOwnerDebugStack,
1328+
debugStackDEV,
12691329
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
12701330
);
12711331
};
12721332
exports.jsxs = function (type, config, maybeKey) {
12731333
var trackActualOwner =
12741334
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
1335+
if (trackActualOwner) {
1336+
var previousStackTraceLimit = Error.stackTraceLimit;
1337+
Error.stackTraceLimit = 10;
1338+
var debugStackDEV = Error("react-stack-top-frame");
1339+
Error.stackTraceLimit = previousStackTraceLimit;
1340+
} else debugStackDEV = unknownOwnerDebugStack;
12751341
return jsxDEVImpl(
12761342
type,
12771343
config,
12781344
maybeKey,
12791345
!0,
1280-
trackActualOwner
1281-
? Error("react-stack-top-frame")
1282-
: unknownOwnerDebugStack,
1346+
debugStackDEV,
12831347
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
12841348
);
12851349
};
12861350
exports.lazy = function (ctor) {
1287-
return {
1351+
ctor = { _status: -1, _result: ctor };
1352+
var lazyType = {
12881353
$$typeof: REACT_LAZY_TYPE,
1289-
_payload: { _status: -1, _result: ctor },
1354+
_payload: ctor,
12901355
_init: lazyInitializer
12911356
};
1357+
if (enableAsyncDebugInfo) {
1358+
var ioInfo = {
1359+
name: "lazy",
1360+
start: -1,
1361+
end: -1,
1362+
value: null,
1363+
owner: null,
1364+
debugStack: Error("react-stack-top-frame"),
1365+
debugTask: console.createTask ? console.createTask("lazy()") : null
1366+
};
1367+
ctor._ioInfo = ioInfo;
1368+
lazyType._debugInfo = [{ awaited: ioInfo }];
1369+
}
1370+
return lazyType;
12921371
};
12931372
exports.memo = function (type, compare) {
12941373
null == type &&
@@ -1370,6 +1449,7 @@ __DEV__ &&
13701449
);
13711450
return resolveDispatcher().useEffect(create, deps);
13721451
};
1452+
exports.useEffectEvent = useEffectEvent;
13731453
exports.useId = function () {
13741454
return resolveDispatcher().useId();
13751455
};
@@ -1419,7 +1499,7 @@ __DEV__ &&
14191499
exports.useTransition = function () {
14201500
return resolveDispatcher().useTransition();
14211501
};
1422-
exports.version = "19.2.0-www-classic-a51f9252-20250916";
1502+
exports.version = "19.3.0-www-classic-71b3a03c-20251021";
14231503
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
14241504
"function" ===
14251505
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&

0 commit comments

Comments
 (0)