Skip to content

Commit

Permalink
Disable consoleWithStackDev Transform except in RN/WWW (#30313)
Browse files Browse the repository at this point in the history
Stacked on #30308.

This is now a noop module so we can stop applying the transform of
console.error using the Babel plugin in the mainline builds. I'm keeping
the transform for RN/WWW for now although it might be nice if the
transform moved into those systems as it gets synced instead of keeping
it upstream.

In jest tests we're already not running the forks for RN/WWW so we don't
need it at all there.

DiffTrain build for commit ff89ba7.
  • Loading branch information
sebmarkbage committed Jul 12, 2024
1 parent 981fe2b commit e7770a1
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 56 deletions.
2 changes: 1 addition & 1 deletion compiled-rn/VERSION_NATIVE_FB
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.0.0-native-fb-ff3f1fac-20240712
19.0.0-native-fb-ff89ba73-20240712
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a55b3ae9fc483a5ea92aaa34fe44b5df>>
* @generated SignedSource<<19de64da095c2c7e3388344fab7cc610>>
*/

"use strict";
Expand Down Expand Up @@ -1149,11 +1149,7 @@ __DEV__ &&
"string" === typeof args[offset]
? args.splice(offset, 1, "[%s] " + args[offset], " " + badgeName + " ")
: args.splice(offset, 0, "[%s] ", " " + badgeName + " ");
"error" === methodName
? error$jscomp$0.apply(console, args)
: "warn" === methodName
? warn.apply(console, args)
: console[methodName].apply(console, args);
console[methodName].apply(console, args);
}
function createCursor(defaultValue) {
return { current: defaultValue };
Expand Down Expand Up @@ -15191,14 +15187,14 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-native-fb-ff3f1fac-20240712"
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
});
})({
findFiberByHostInstance: function () {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 1,
version: "19.0.0-native-fb-ff3f1fac-20240712",
version: "19.0.0-native-fb-ff89ba73-20240712",
rendererPackageName: "react-test-renderer"
});
exports._Scheduler = Scheduler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<f051bcfe8b92b962df26379d5a99c262>>
* @generated SignedSource<<4f9aad0039a58edc294ac1ffb35cf646>>
*/

"use strict";
Expand Down Expand Up @@ -9406,7 +9406,7 @@ var devToolsConfig$jscomp$inline_1034 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-native-fb-ff3f1fac-20240712",
version: "19.0.0-native-fb-ff89ba73-20240712",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1223 = {
Expand Down Expand Up @@ -9437,7 +9437,7 @@ var internals$jscomp$inline_1223 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-ff3f1fac-20240712"
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1224 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<4bb27b2208b9c6a88477d011821f7a03>>
* @generated SignedSource<<fb448777f99d7293b15b2c2ee900f79a>>
*/

"use strict";
Expand Down Expand Up @@ -10026,7 +10026,7 @@ var devToolsConfig$jscomp$inline_1117 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "19.0.0-native-fb-ff3f1fac-20240712",
version: "19.0.0-native-fb-ff89ba73-20240712",
rendererPackageName: "react-test-renderer"
};
(function (internals) {
Expand Down Expand Up @@ -10070,7 +10070,7 @@ var devToolsConfig$jscomp$inline_1117 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-ff3f1fac-20240712"
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
});
exports._Scheduler = Scheduler;
exports.act = act;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<9fb684f44369d704db63855b2ee42fe2>>
* @generated SignedSource<<05c7ee933513ad1b782df8f4f98b3a99>>
*/

"use strict";
Expand Down Expand Up @@ -1748,7 +1748,7 @@ __DEV__ &&
exports.useTransition = function () {
return resolveDispatcher().useTransition();
};
exports.version = "19.0.0-native-fb-ff3f1fac-20240712";
exports.version = "19.0.0-native-fb-ff89ba73-20240712";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b65f649f69089a3cbe8d7e42203df3d4>>
* @generated SignedSource<<3404547d78b70a55bb7651957a6be743>>
*/

"use strict";
Expand Down Expand Up @@ -604,4 +604,4 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-ff3f1fac-20240712";
exports.version = "19.0.0-native-fb-ff89ba73-20240712";
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<3eb7087b1257f47ff42b387e24361622>>
* @generated SignedSource<<16f1655f4bb3c6d677aa7a304ac0af37>>
*/

"use strict";
Expand Down Expand Up @@ -608,7 +608,7 @@ exports.useSyncExternalStore = function (
exports.useTransition = function () {
return ReactSharedInternals.H.useTransition();
};
exports.version = "19.0.0-native-fb-ff3f1fac-20240712";
exports.version = "19.0.0-native-fb-ff89ba73-20240712";
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&
"function" ===
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ff3f1fac65e7b82efe3f90af42af1278bc6f1d5d
ff89ba734668fdac06e8de476486830bbf9e0785
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<7a18f874f122a94b6ea996fd34e4bdec>>
* @generated SignedSource<<cb52d8f0a33b4839c55863e4803d246e>>
*/

"use strict";
Expand Down Expand Up @@ -2051,11 +2051,7 @@ __DEV__ &&
"string" === typeof args[offset]
? args.splice(offset, 1, "[%s] " + args[offset], " " + badgeName + " ")
: args.splice(offset, 0, "[%s] ", " " + badgeName + " ");
"error" === methodName
? error$jscomp$0.apply(console, args)
: "warn" === methodName
? warn.apply(console, args)
: console[methodName].apply(console, args);
console[methodName].apply(console, args);
}
function createCursor(defaultValue) {
return { current: defaultValue };
Expand Down Expand Up @@ -16821,12 +16817,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-native-fb-ff3f1fac-20240712"
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
});
})({
findFiberByHostInstance: getInstanceFromNode,
bundleType: 1,
version: "19.0.0-native-fb-ff3f1fac-20240712",
version: "19.0.0-native-fb-ff89ba73-20240712",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<962734435cadf14330134c462d246053>>
* @generated SignedSource<<019180a5199710c4c1aa6124653222df>>
*/

"use strict";
Expand Down Expand Up @@ -10632,7 +10632,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1136 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-native-fb-ff3f1fac-20240712",
version: "19.0.0-native-fb-ff89ba73-20240712",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -10675,7 +10675,7 @@ var internals$jscomp$inline_1362 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-ff3f1fac-20240712"
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1363 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<b8dfddaadba4e0080560d2bdb276e821>>
* @generated SignedSource<<30378a5bc02b2b4f128d1c2c9b10ecd1>>
*/

"use strict";
Expand Down Expand Up @@ -11342,7 +11342,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1217 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "19.0.0-native-fb-ff3f1fac-20240712",
version: "19.0.0-native-fb-ff89ba73-20240712",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -11398,7 +11398,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-ff3f1fac-20240712"
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<79882b876f72e14d4955ae2a47490ee7>>
* @generated SignedSource<<f40fe7e4fcad53bb52ff550e9c1ac46c>>
*/

"use strict";
Expand Down Expand Up @@ -2004,11 +2004,7 @@ __DEV__ &&
"string" === typeof args[offset]
? args.splice(offset, 1, "[%s] " + args[offset], " " + badgeName + " ")
: args.splice(offset, 0, "[%s] ", " " + badgeName + " ");
"error" === methodName
? error$jscomp$0.apply(console, args)
: "warn" === methodName
? warn.apply(console, args)
: console[methodName].apply(console, args);
console[methodName].apply(console, args);
}
function createCursor(defaultValue) {
return { current: defaultValue };
Expand Down Expand Up @@ -17009,11 +17005,11 @@ __DEV__ &&
var emptyObject = {};
Object.freeze(emptyObject);
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-ff3f1fac-20240712" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-ff89ba73-20240712" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-native-fb-ff3f1fac-20240712\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-ff89ba73-20240712\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
Expand Down Expand Up @@ -17061,12 +17057,12 @@ __DEV__ &&
scheduleRoot: scheduleRoot,
setRefreshHandler: setRefreshHandler,
getCurrentFiber: getCurrentFiberForDevTools,
reconcilerVersion: "19.0.0-native-fb-ff3f1fac-20240712"
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
});
})({
findFiberByHostInstance: getInstanceFromTag,
bundleType: 1,
version: "19.0.0-native-fb-ff3f1fac-20240712",
version: "19.0.0-native-fb-ff89ba73-20240712",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<0f2fcd9d416282dae4bcf3b32fb6090c>>
* @generated SignedSource<<dba7b726eecfc326dabdc5cf1484a16e>>
*/

"use strict";
Expand Down Expand Up @@ -10786,11 +10786,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
traverseOwnerTreeUp(hierarchy, instance);
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-ff3f1fac-20240712" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-ff89ba73-20240712" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-native-fb-ff3f1fac-20240712\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-ff89ba73-20240712\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
Expand Down Expand Up @@ -10840,7 +10840,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1210 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "19.0.0-native-fb-ff3f1fac-20240712",
version: "19.0.0-native-fb-ff89ba73-20240712",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -10883,7 +10883,7 @@ var internals$jscomp$inline_1457 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-ff3f1fac-20240712"
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1458 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* @noflow
* @nolint
* @preventMunge
* @generated SignedSource<<a54df5bf860c9c74b24c82fc17ddf530>>
* @generated SignedSource<<d6abf0c17c738fd3d8ec2d4795b84dfc>>
*/

"use strict";
Expand Down Expand Up @@ -11497,11 +11497,11 @@ function traverseOwnerTreeUp(hierarchy, instance) {
traverseOwnerTreeUp(hierarchy, instance);
}
var isomorphicReactPackageVersion = React.version;
if ("19.0.0-native-fb-ff3f1fac-20240712" !== isomorphicReactPackageVersion)
if ("19.0.0-native-fb-ff89ba73-20240712" !== isomorphicReactPackageVersion)
throw Error(
'Incompatible React versions: The "react" and "react-native-renderer" packages must have the exact same version. Instead got:\n - react: ' +
(isomorphicReactPackageVersion +
"\n - react-native-renderer: 19.0.0-native-fb-ff3f1fac-20240712\nLearn more: https://react.dev/warnings/version-mismatch")
"\n - react-native-renderer: 19.0.0-native-fb-ff89ba73-20240712\nLearn more: https://react.dev/warnings/version-mismatch")
);
if (
"function" !==
Expand Down Expand Up @@ -11551,7 +11551,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1291 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "19.0.0-native-fb-ff3f1fac-20240712",
version: "19.0.0-native-fb-ff89ba73-20240712",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForInstance: getInspectorDataForInstance,
Expand Down Expand Up @@ -11607,7 +11607,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "19.0.0-native-fb-ff3f1fac-20240712"
reconcilerVersion: "19.0.0-native-fb-ff89ba73-20240712"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
computeComponentStackForErrorReporting: function (reactTag) {
Expand Down

0 comments on commit e7770a1

Please sign in to comment.