Skip to content

Commit a46a307

Browse files
author
22388o
committed
[playground] Decouple playground from compiler
Currently the playground is setup as a linked workspace for the compiler which complicates our yarn workspace setup and means that snap can sometimes pull in a different version of react than was otherwise specified. There's no real reason to have these workspaces combined so let's split them up. ghstack-source-id: 56ab064 Pull Request resolved: facebook#31081 DiffTrain build for [db24098](facebook@db24098)
1 parent 0f2a59e commit a46a307

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+63638
-58505
lines changed

compiled/babel-plugin-react-refresh/index.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@
66
*
77
* This source code is licensed under the MIT license found in the
88
* LICENSE file in the root directory of this source tree.
9+
*
10+
* @noformat
11+
* @nolint
12+
* @lightSyntaxTransform
13+
* @preventMunge
14+
* @oncall react_core
915
*/
1016

1117
"use strict";

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

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ __DEV__ &&
2323
)
2424
args[_key2 - 1] = arguments[_key2];
2525
_len2 = format;
26-
_key2 = Error("react-stack-top-frame");
27-
var ReactSharedInternals =
26+
_key2 =
2827
require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
29-
null != ReactSharedInternals &&
30-
ReactSharedInternals.getCurrentStack &&
31-
((_key2 = ReactSharedInternals.getCurrentStack(_key2)),
28+
null != _key2 &&
29+
_key2.getCurrentStack &&
30+
((_key2 = _key2.getCurrentStack()),
3231
"" !== _key2 && ((_len2 += "%s"), args.push(_key2)));
3332
args.unshift(_len2);
3433
args.unshift(!1);
@@ -182,8 +181,14 @@ __DEV__ &&
182181
} catch (x) {
183182
var match = x.stack.trim().match(/\n( *(at )?)/);
184183
prefix = (match && match[1]) || "";
184+
suffix =
185+
-1 < x.stack.indexOf("\n at")
186+
? " (<anonymous>)"
187+
: -1 < x.stack.indexOf("@")
188+
? "@unknown:0:0"
189+
: "";
185190
}
186-
return "\n" + prefix + name;
191+
return "\n" + prefix + name + suffix;
187192
}
188193
function describeNativeComponentFrame(fn, construct) {
189194
if (!fn || reentry) return "";
@@ -593,13 +598,15 @@ __DEV__ &&
593598
null === type
594599
? (isStaticChildren = "null")
595600
: isArrayImpl(type)
596-
? (isStaticChildren = "array")
597-
: void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE
598-
? ((isStaticChildren =
599-
"<" + (getComponentNameFromType(type.type) || "Unknown") + " />"),
600-
(children =
601-
" Did you accidentally export a JSX literal instead of a component?"))
602-
: (isStaticChildren = typeof type);
601+
? (isStaticChildren = "array")
602+
: void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE
603+
? ((isStaticChildren =
604+
"<" +
605+
(getComponentNameFromType(type.type) || "Unknown") +
606+
" />"),
607+
(children =
608+
" Did you accidentally export a JSX literal instead of a component?"))
609+
: (isStaticChildren = typeof type);
603610
error(
604611
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
605612
isStaticChildren,
@@ -633,11 +640,7 @@ __DEV__ &&
633640
hasValidKey(config) &&
634641
(checkKeyStringCoercion(config.key), (children = "" + config.key));
635642
hasValidRef(config) && warnIfStringRefCannotBeAutoConverted(config, self);
636-
if (
637-
(!enableFastJSXWithoutStringRefs &&
638-
(!enableFastJSXWithStringRefs || "ref" in config)) ||
639-
"key" in config
640-
) {
643+
if ("ref" in config || "key" in config) {
641644
maybeKey = {};
642645
for (var propName in config)
643646
"key" !== propName &&
@@ -805,12 +808,11 @@ __DEV__ &&
805808
}
806809
var React = require("react"),
807810
dynamicFeatureFlags = require("ReactFeatureFlags"),
808-
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
809-
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
810-
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
811811
disableDefaultPropsExceptForClasses =
812812
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
813-
enableFastJSX = dynamicFeatureFlags.enableFastJSX,
813+
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
814+
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
815+
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
814816
renameElementSymbol = dynamicFeatureFlags.renameElementSymbol,
815817
disableLegacyMode = dynamicFeatureFlags.disableLegacyMode;
816818
dynamicFeatureFlags = Symbol.for("react.element");
@@ -853,6 +855,7 @@ __DEV__ &&
853855
prevGroupEnd;
854856
disabledLog.__reactDisabledLog = !0;
855857
var prefix,
858+
suffix,
856859
reentry = !1;
857860
var componentFrameCache = new (
858861
"function" === typeof WeakMap ? WeakMap : Map
@@ -861,9 +864,7 @@ __DEV__ &&
861864
specialPropKeyWarningShown;
862865
var didWarnAboutStringRefs = {};
863866
var didWarnAboutElementRef = {};
864-
var enableFastJSXWithStringRefs = enableFastJSX && !0,
865-
enableFastJSXWithoutStringRefs = enableFastJSXWithStringRefs && !1,
866-
didWarnAboutKeySpread = {},
867+
var didWarnAboutKeySpread = {},
867868
ownerHasKeyUseWarning = {};
868869
exports.Fragment = REACT_FRAGMENT_TYPE;
869870
exports.jsxDEV = function (

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

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ __DEV__ &&
2323
)
2424
args[_key2 - 1] = arguments[_key2];
2525
_len2 = format;
26-
_key2 = Error("react-stack-top-frame");
27-
var ReactSharedInternals =
26+
_key2 =
2827
require("react").__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;
29-
null != ReactSharedInternals &&
30-
ReactSharedInternals.getCurrentStack &&
31-
((_key2 = ReactSharedInternals.getCurrentStack(_key2)),
28+
null != _key2 &&
29+
_key2.getCurrentStack &&
30+
((_key2 = _key2.getCurrentStack()),
3231
"" !== _key2 && ((_len2 += "%s"), args.push(_key2)));
3332
args.unshift(_len2);
3433
args.unshift(!1);
@@ -182,8 +181,14 @@ __DEV__ &&
182181
} catch (x) {
183182
var match = x.stack.trim().match(/\n( *(at )?)/);
184183
prefix = (match && match[1]) || "";
184+
suffix =
185+
-1 < x.stack.indexOf("\n at")
186+
? " (<anonymous>)"
187+
: -1 < x.stack.indexOf("@")
188+
? "@unknown:0:0"
189+
: "";
185190
}
186-
return "\n" + prefix + name;
191+
return "\n" + prefix + name + suffix;
187192
}
188193
function describeNativeComponentFrame(fn, construct) {
189194
if (!fn || reentry) return "";
@@ -590,13 +595,15 @@ __DEV__ &&
590595
null === type
591596
? (isStaticChildren = "null")
592597
: isArrayImpl(type)
593-
? (isStaticChildren = "array")
594-
: void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE
595-
? ((isStaticChildren =
596-
"<" + (getComponentNameFromType(type.type) || "Unknown") + " />"),
597-
(children =
598-
" Did you accidentally export a JSX literal instead of a component?"))
599-
: (isStaticChildren = typeof type);
598+
? (isStaticChildren = "array")
599+
: void 0 !== type && type.$$typeof === REACT_ELEMENT_TYPE
600+
? ((isStaticChildren =
601+
"<" +
602+
(getComponentNameFromType(type.type) || "Unknown") +
603+
" />"),
604+
(children =
605+
" Did you accidentally export a JSX literal instead of a component?"))
606+
: (isStaticChildren = typeof type);
600607
error(
601608
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
602609
isStaticChildren,
@@ -630,11 +637,7 @@ __DEV__ &&
630637
hasValidKey(config) &&
631638
(checkKeyStringCoercion(config.key), (children = "" + config.key));
632639
hasValidRef(config) && warnIfStringRefCannotBeAutoConverted(config, self);
633-
if (
634-
(!enableFastJSXWithoutStringRefs &&
635-
(!enableFastJSXWithStringRefs || "ref" in config)) ||
636-
"key" in config
637-
) {
640+
if ("ref" in config || "key" in config) {
638641
maybeKey = {};
639642
for (var propName in config)
640643
"key" !== propName &&
@@ -802,12 +805,11 @@ __DEV__ &&
802805
}
803806
var React = require("react"),
804807
dynamicFeatureFlags = require("ReactFeatureFlags"),
805-
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
806-
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing,
807-
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
808808
disableDefaultPropsExceptForClasses =
809809
dynamicFeatureFlags.disableDefaultPropsExceptForClasses,
810-
enableFastJSX = dynamicFeatureFlags.enableFastJSX;
810+
enableDebugTracing = dynamicFeatureFlags.enableDebugTracing,
811+
enableRenderableContext = dynamicFeatureFlags.enableRenderableContext,
812+
enableTransitionTracing = dynamicFeatureFlags.enableTransitionTracing;
811813
dynamicFeatureFlags = dynamicFeatureFlags.renameElementSymbol;
812814
var REACT_LEGACY_ELEMENT_TYPE = Symbol.for("react.element"),
813815
REACT_ELEMENT_TYPE = dynamicFeatureFlags
@@ -849,6 +851,7 @@ __DEV__ &&
849851
prevGroupEnd;
850852
disabledLog.__reactDisabledLog = !0;
851853
var prefix,
854+
suffix,
852855
reentry = !1;
853856
var componentFrameCache = new (
854857
"function" === typeof WeakMap ? WeakMap : Map
@@ -857,9 +860,7 @@ __DEV__ &&
857860
specialPropKeyWarningShown;
858861
var didWarnAboutStringRefs = {};
859862
var didWarnAboutElementRef = {};
860-
var enableFastJSXWithStringRefs = enableFastJSX && !0,
861-
enableFastJSXWithoutStringRefs = enableFastJSXWithStringRefs && !1,
862-
didWarnAboutKeySpread = {},
863+
var didWarnAboutKeySpread = {},
863864
ownerHasKeyUseWarning = {};
864865
exports.Fragment = REACT_FRAGMENT_TYPE;
865866
exports.jsxDEV = function (

compiled/facebook-www/REVISION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e02baf6c92833a0d45a77fb2e741676f393c24f7
1+
db240980a3aeae65f148b1edf5a1187a2331307e
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e02baf6c92833a0d45a77fb2e741676f393c24f7
1+
db240980a3aeae65f148b1edf5a1187a2331307e

0 commit comments

Comments
 (0)