From 1c9327ea67930310214acf059becb2ff4a4b35c9 Mon Sep 17 00:00:00 2001 From: gaearon Date: Fri, 24 Mar 2023 18:14:34 +0000 Subject: [PATCH] Update Rollup to 3.x (#26442) ## Summary This PR: - Updates Rollup from 2.x to latest 3.x, and updates associated plugins - Updates deprecated / altered config settings in the Rollup plugin pipeline - Fixes some file extension and import issues related to use of ESM in `react-dom-webpack-server` - Removes a now-obsolete `strip-unused-imports` Rollup plugin - Fixes an _existing_ bug with the Rollup 2.x plugin pipeline on `main` that was causing parts of `DOMProperty.js` to get left out of the `react-dom-webpack-server` JS bundles, by adding a new plugin to tell Rollup to treat that file as if it as side effects This PR should be functionally identical to the other existing "Rollup 3 upgrade" PR at #26078 . I'm filing this as a near-duplicate because I'm ready to push this change through ASAP so that I can follow it up with a PR that adds sourcemap support, that PR's artifact diffing seems like it's possibly stuck and I want to compare the build results, and I've got this set up against latest `main`. This gets React's build setup updated to the latest Rollup version, which is generally a good practice, but also ensures that any further Rollup config tweaks can be done using the current Rollup docs as a reference. ## How did you test this change? - Made builds from the latest `main` - Updated Rollup package versions and cross-compared the changes I needed to make locally to get successful builds vs #26078 - Diffed the output folders between `main` and this PR, and confirmed that the bundle contents are identical (with the exception of version strings and the `react-dom-webpack-server` bundle fix re-adding missing `DOMProperty.js` content) DiffTrain build for [909c6dacfde06b87fa22f2e8506c47124cf982b5](https://github.com/facebook/react/commit/909c6dacfde06b87fa22f2e8506c47124cf982b5) --- compiled/facebook-www/REVISION | 2 +- compiled/facebook-www/ReactART-prod.modern.js | 4 +- compiled/facebook-www/ReactDOM-dev.modern.js | 7 +- .../ReactDOMTesting-dev.classic.js | 7 +- .../ReactDOMTesting-dev.modern.js | 7 +- .../ReactFlightDOMRelayServer-dev.classic.js | 162 +----------------- .../ReactFlightDOMRelayServer-dev.modern.js | 162 +----------------- .../ReactFlightDOMRelayServer-prod.classic.js | 60 +------ .../ReactFlightDOMRelayServer-prod.modern.js | 60 +------ 9 files changed, 21 insertions(+), 450 deletions(-) diff --git a/compiled/facebook-www/REVISION b/compiled/facebook-www/REVISION index 51ceb6c7135e3..4b68730cb3a34 100644 --- a/compiled/facebook-www/REVISION +++ b/compiled/facebook-www/REVISION @@ -1 +1 @@ -9c54b29b44d24f8f8090da9c7ebf569747a444df +909c6dacfde06b87fa22f2e8506c47124cf982b5 diff --git a/compiled/facebook-www/ReactART-prod.modern.js b/compiled/facebook-www/ReactART-prod.modern.js index 5532a5e46dfc3..f55057dcd7296 100644 --- a/compiled/facebook-www/ReactART-prod.modern.js +++ b/compiled/facebook-www/ReactART-prod.modern.js @@ -9635,7 +9635,7 @@ var slice = Array.prototype.slice, return null; }, bundleType: 0, - version: "18.3.0-www-modern-1925ba21", + version: "18.3.0-www-modern-b7692384", rendererPackageName: "react-art" }; var internals$jscomp$inline_1323 = { @@ -9666,7 +9666,7 @@ var internals$jscomp$inline_1323 = { scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, - reconcilerVersion: "18.3.0-www-modern-1925ba21" + reconcilerVersion: "18.3.0-www-modern-b7692384" }; if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) { var hook$jscomp$inline_1324 = __REACT_DEVTOOLS_GLOBAL_HOOK__; diff --git a/compiled/facebook-www/ReactDOM-dev.modern.js b/compiled/facebook-www/ReactDOM-dev.modern.js index b5357c0ae709d..bdf6c53e70c6c 100644 --- a/compiled/facebook-www/ReactDOM-dev.modern.js +++ b/compiled/facebook-www/ReactDOM-dev.modern.js @@ -21994,9 +21994,7 @@ function readContextDuringReconcilation(consumer, context, renderLanes) { } function readContextForConsumer(consumer, context) { - var value = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; + var value = context._currentValue; if (lastFullyObservedContext === context); else { @@ -33524,7 +33522,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-1925ba21"; +var ReactVersion = "18.3.0-www-modern-b7692384"; function createPortal$1( children, @@ -42373,7 +42371,6 @@ function getCurrentEventPriority() { return getEventPriority(currentEvent.type); } -var isPrimaryRenderer = true; // if a component just imports ReactDOM (e.g. for findDOMNode). // Some environments might not have setTimeout or clearTimeout. diff --git a/compiled/facebook-www/ReactDOMTesting-dev.classic.js b/compiled/facebook-www/ReactDOMTesting-dev.classic.js index 1fed275a7bfdd..dfc07defa39c5 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.classic.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.classic.js @@ -24823,9 +24823,7 @@ function readContextDuringReconcilation(consumer, context, renderLanes) { } function readContextForConsumer(consumer, context) { - var value = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; + var value = context._currentValue; if (lastFullyObservedContext === context); else { @@ -36865,7 +36863,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-classic-ac60b8a6"; +var ReactVersion = "18.3.0-www-classic-08ca8562"; function createPortal$1( children, @@ -40017,7 +40015,6 @@ function getCurrentEventPriority() { return getEventPriority(currentEvent.type); } -var isPrimaryRenderer = true; // if a component just imports ReactDOM (e.g. for findDOMNode). // Some environments might not have setTimeout or clearTimeout. diff --git a/compiled/facebook-www/ReactDOMTesting-dev.modern.js b/compiled/facebook-www/ReactDOMTesting-dev.modern.js index 097bb63134764..ef416b2eee66a 100644 --- a/compiled/facebook-www/ReactDOMTesting-dev.modern.js +++ b/compiled/facebook-www/ReactDOMTesting-dev.modern.js @@ -22128,9 +22128,7 @@ function readContextDuringReconcilation(consumer, context, renderLanes) { } function readContextForConsumer(consumer, context) { - var value = isPrimaryRenderer - ? context._currentValue - : context._currentValue2; + var value = context._currentValue; if (lastFullyObservedContext === context); else { @@ -34141,7 +34139,7 @@ function createFiberRoot( return root; } -var ReactVersion = "18.3.0-www-modern-c338eadf"; +var ReactVersion = "18.3.0-www-modern-ea61562f"; function createPortal$1( children, @@ -42992,7 +42990,6 @@ function getCurrentEventPriority() { return getEventPriority(currentEvent.type); } -var isPrimaryRenderer = true; // if a component just imports ReactDOM (e.g. for findDOMNode). // Some environments might not have setTimeout or clearTimeout. diff --git a/compiled/facebook-www/ReactFlightDOMRelayServer-dev.classic.js b/compiled/facebook-www/ReactFlightDOMRelayServer-dev.classic.js index 9d9cb4cbd3e92..dfe65210fa9d8 100644 --- a/compiled/facebook-www/ReactFlightDOMRelayServer-dev.classic.js +++ b/compiled/facebook-www/ReactFlightDOMRelayServer-dev.classic.js @@ -215,9 +215,6 @@ var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a n // When falsy, it should be removed. var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. -// When falsy, it should be removed. - -var POSITIVE_NUMERIC = 6; function PropertyInfoRecord( name, @@ -240,27 +237,6 @@ function PropertyInfoRecord( this.sanitizeURL = sanitizeURL; this.removeEmptyString = removeEmptyString; } // When adding attributes to this list, be sure to also add them to -// This is a mapping from React prop names to the attribute names. - -[ - ["acceptCharset", "accept-charset"], - ["className", "class"], - ["htmlFor", "for"], - ["httpEquiv", "http-equiv"] -].forEach(function (_ref) { - var name = _ref[0], - attributeName = _ref[1]; - // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - new PropertyInfoRecord( - name, - STRING, - false, // mustUseProperty - attributeName, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false - ); -}); // These are "enumerated" HTML attributes that accept "true" and "false". // In React, we let users pass `true` and `false` even though technically // these aren't boolean attributes (they are coerced to strings). @@ -278,27 +254,6 @@ function PropertyInfoRecord( false ); }); // These are "enumerated" SVG attributes that accept "true" and "false". -// In React, we let users pass `true` and `false` even though technically -// these aren't boolean attributes (they are coerced to strings). -// Since these are SVG attributes, their attribute names are case-sensitive. - -[ - "autoReverse", - "externalResourcesRequired", - "focusable", - "preserveAlpha" -].forEach(function (name) { - // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - new PropertyInfoRecord( - name, - BOOLEANISH_STRING, - false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false - ); -}); // These are HTML boolean attributes. [ "allowFullScreen", @@ -337,67 +292,6 @@ function PropertyInfoRecord( false ); }); // These are the few React props that we set as DOM properties -// rather than attributes. These are all booleans. - -[ - "checked", // Note: `option.selected` is not updated if `select.multiple` is - // disabled with `removeAttribute`. We have special logic for handling this. - "multiple", - "muted", - "selected" // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. -].forEach(function (name) { - // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - new PropertyInfoRecord( - name, - BOOLEAN, - true, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false - ); -}); // These are HTML attributes that are "overloaded booleans": they behave like -// booleans, but can also accept a string value. - -[ - "capture", - "download" // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. -].forEach(function (name) { - // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - new PropertyInfoRecord( - name, - OVERLOADED_BOOLEAN, - false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false - ); -}); // These are HTML attributes that must be positive numbers. - -[ - "cols", - "rows", - "size", - "span" // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. -].forEach(function (name) { - // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - new PropertyInfoRecord( - name, - POSITIVE_NUMERIC, - false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false - ); -}); // These are HTML attributes that must be numbers. ["rowSpan", "start"].forEach(function (name) { // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions @@ -499,17 +393,7 @@ var capitalize = function (token) { // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - - new PropertyInfoRecord( - name, - STRING, - false, // mustUseProperty - attributeName, - null, // attributeNamespace - false, // sanitizeURL - false - ); + attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions }); // String SVG attributes with the xlink namespace. [ @@ -522,17 +406,7 @@ var capitalize = function (token) { // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - - new PropertyInfoRecord( - name, - STRING, - false, // mustUseProperty - attributeName, - "http://www.w3.org/1999/xlink", - false, // sanitizeURL - false - ); + attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions }); // String SVG attributes with the xml namespace. [ @@ -542,17 +416,7 @@ var capitalize = function (token) { // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - - new PropertyInfoRecord( - name, - STRING, - false, // mustUseProperty - attributeName, - "http://www.w3.org/XML/1998/namespace", - false, // sanitizeURL - false - ); + attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions }); // These attribute exists both in HTML and SVG. // The attribute name is case-sensitive in SVG so we can't just use // the React name like we do for attributes that exist only in HTML. @@ -569,26 +433,6 @@ var capitalize = function (token) { false ); }); // These attributes accept URLs. These must not allow javascript: URLS. - -new PropertyInfoRecord( - "xlinkHref", - STRING, - false, // mustUseProperty - "xlink:href", - "http://www.w3.org/1999/xlink", - true, // sanitizeURL - false -); - -new PropertyInfoRecord( - "formAction", - STRING, - false, // mustUseProperty - "formaction", // attributeName - null, // attributeNamespace - true, // sanitizeURL - false -); ["src", "href", "action"].forEach(function (attributeName) { // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions new PropertyInfoRecord( diff --git a/compiled/facebook-www/ReactFlightDOMRelayServer-dev.modern.js b/compiled/facebook-www/ReactFlightDOMRelayServer-dev.modern.js index 9d9cb4cbd3e92..dfe65210fa9d8 100644 --- a/compiled/facebook-www/ReactFlightDOMRelayServer-dev.modern.js +++ b/compiled/facebook-www/ReactFlightDOMRelayServer-dev.modern.js @@ -215,9 +215,6 @@ var OVERLOADED_BOOLEAN = 4; // An attribute that must be numeric or parse as a n // When falsy, it should be removed. var NUMERIC = 5; // An attribute that must be positive numeric or parse as a positive numeric. -// When falsy, it should be removed. - -var POSITIVE_NUMERIC = 6; function PropertyInfoRecord( name, @@ -240,27 +237,6 @@ function PropertyInfoRecord( this.sanitizeURL = sanitizeURL; this.removeEmptyString = removeEmptyString; } // When adding attributes to this list, be sure to also add them to -// This is a mapping from React prop names to the attribute names. - -[ - ["acceptCharset", "accept-charset"], - ["className", "class"], - ["htmlFor", "for"], - ["httpEquiv", "http-equiv"] -].forEach(function (_ref) { - var name = _ref[0], - attributeName = _ref[1]; - // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - new PropertyInfoRecord( - name, - STRING, - false, // mustUseProperty - attributeName, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false - ); -}); // These are "enumerated" HTML attributes that accept "true" and "false". // In React, we let users pass `true` and `false` even though technically // these aren't boolean attributes (they are coerced to strings). @@ -278,27 +254,6 @@ function PropertyInfoRecord( false ); }); // These are "enumerated" SVG attributes that accept "true" and "false". -// In React, we let users pass `true` and `false` even though technically -// these aren't boolean attributes (they are coerced to strings). -// Since these are SVG attributes, their attribute names are case-sensitive. - -[ - "autoReverse", - "externalResourcesRequired", - "focusable", - "preserveAlpha" -].forEach(function (name) { - // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - new PropertyInfoRecord( - name, - BOOLEANISH_STRING, - false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false - ); -}); // These are HTML boolean attributes. [ "allowFullScreen", @@ -337,67 +292,6 @@ function PropertyInfoRecord( false ); }); // These are the few React props that we set as DOM properties -// rather than attributes. These are all booleans. - -[ - "checked", // Note: `option.selected` is not updated if `select.multiple` is - // disabled with `removeAttribute`. We have special logic for handling this. - "multiple", - "muted", - "selected" // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. -].forEach(function (name) { - // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - new PropertyInfoRecord( - name, - BOOLEAN, - true, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false - ); -}); // These are HTML attributes that are "overloaded booleans": they behave like -// booleans, but can also accept a string value. - -[ - "capture", - "download" // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. -].forEach(function (name) { - // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - new PropertyInfoRecord( - name, - OVERLOADED_BOOLEAN, - false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false - ); -}); // These are HTML attributes that must be positive numbers. - -[ - "cols", - "rows", - "size", - "span" // NOTE: if you add a camelCased prop to this list, - // you'll need to set attributeName to name.toLowerCase() - // instead in the assignment below. -].forEach(function (name) { - // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - new PropertyInfoRecord( - name, - POSITIVE_NUMERIC, - false, // mustUseProperty - name, // attributeName - null, // attributeNamespace - false, // sanitizeURL - false - ); -}); // These are HTML attributes that must be numbers. ["rowSpan", "start"].forEach(function (name) { // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions @@ -499,17 +393,7 @@ var capitalize = function (token) { // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - - new PropertyInfoRecord( - name, - STRING, - false, // mustUseProperty - attributeName, - null, // attributeNamespace - false, // sanitizeURL - false - ); + attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions }); // String SVG attributes with the xlink namespace. [ @@ -522,17 +406,7 @@ var capitalize = function (token) { // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - - new PropertyInfoRecord( - name, - STRING, - false, // mustUseProperty - attributeName, - "http://www.w3.org/1999/xlink", - false, // sanitizeURL - false - ); + attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions }); // String SVG attributes with the xml namespace. [ @@ -542,17 +416,7 @@ var capitalize = function (token) { // you'll need to set attributeName to name.toLowerCase() // instead in the assignment below. ].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions - - new PropertyInfoRecord( - name, - STRING, - false, // mustUseProperty - attributeName, - "http://www.w3.org/XML/1998/namespace", - false, // sanitizeURL - false - ); + attributeName.replace(CAMELIZE, capitalize); // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions }); // These attribute exists both in HTML and SVG. // The attribute name is case-sensitive in SVG so we can't just use // the React name like we do for attributes that exist only in HTML. @@ -569,26 +433,6 @@ var capitalize = function (token) { false ); }); // These attributes accept URLs. These must not allow javascript: URLS. - -new PropertyInfoRecord( - "xlinkHref", - STRING, - false, // mustUseProperty - "xlink:href", - "http://www.w3.org/1999/xlink", - true, // sanitizeURL - false -); - -new PropertyInfoRecord( - "formAction", - STRING, - false, // mustUseProperty - "formaction", // attributeName - null, // attributeNamespace - true, // sanitizeURL - false -); ["src", "href", "action"].forEach(function (attributeName) { // $FlowFixMe[invalid-constructor] Flow no longer supports calling new on functions new PropertyInfoRecord( diff --git a/compiled/facebook-www/ReactFlightDOMRelayServer-prod.classic.js b/compiled/facebook-www/ReactFlightDOMRelayServer-prod.classic.js index e3b50ba46f5d4..7a0878bee561c 100644 --- a/compiled/facebook-www/ReactFlightDOMRelayServer-prod.classic.js +++ b/compiled/facebook-www/ReactFlightDOMRelayServer-prod.classic.js @@ -80,41 +80,16 @@ function PropertyInfoRecord( this.sanitizeURL = sanitizeURL; this.removeEmptyString = removeEmptyString; } -[ - ["acceptCharset", "accept-charset"], - ["className", "class"], - ["htmlFor", "for"], - ["httpEquiv", "http-equiv"] -].forEach(function (_ref) { - new PropertyInfoRecord(_ref[0], 1, !1, _ref[1], null, !1, !1); -}); ["contentEditable", "draggable", "spellCheck", "value"].forEach(function ( name ) { new PropertyInfoRecord(name, 2, !1, name.toLowerCase(), null, !1, !1); }); -[ - "autoReverse", - "externalResourcesRequired", - "focusable", - "preserveAlpha" -].forEach(function (name) { - new PropertyInfoRecord(name, 2, !1, name, null, !1, !1); -}); "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope" .split(" ") .forEach(function (name) { new PropertyInfoRecord(name, 3, !1, name.toLowerCase(), null, !1, !1); }); -["checked", "multiple", "muted", "selected"].forEach(function (name) { - new PropertyInfoRecord(name, 3, !0, name, null, !1, !1); -}); -["capture", "download"].forEach(function (name) { - new PropertyInfoRecord(name, 4, !1, name, null, !1, !1); -}); -["cols", "rows", "size", "span"].forEach(function (name) { - new PropertyInfoRecord(name, 6, !1, name, null, !1, !1); -}); ["rowSpan", "start"].forEach(function (name) { new PropertyInfoRecord(name, 5, !1, name.toLowerCase(), null, !1, !1); }); @@ -125,34 +100,15 @@ function capitalize(token) { "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering transform-origin underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height" .split(" ") .forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - new PropertyInfoRecord(name, 1, !1, attributeName, null, !1, !1); + attributeName.replace(CAMELIZE, capitalize); }); "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type" .split(" ") .forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - new PropertyInfoRecord( - name, - 1, - !1, - attributeName, - "http://www.w3.org/1999/xlink", - !1, - !1 - ); + attributeName.replace(CAMELIZE, capitalize); }); ["xml:base", "xml:lang", "xml:space"].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - new PropertyInfoRecord( - name, - 1, - !1, - attributeName, - "http://www.w3.org/XML/1998/namespace", - !1, - !1 - ); + attributeName.replace(CAMELIZE, capitalize); }); ["tabIndex", "crossOrigin"].forEach(function (attributeName) { new PropertyInfoRecord( @@ -165,16 +121,6 @@ function capitalize(token) { !1 ); }); -new PropertyInfoRecord( - "xlinkHref", - 1, - !1, - "xlink:href", - "http://www.w3.org/1999/xlink", - !0, - !1 -); -new PropertyInfoRecord("formAction", 1, !1, "formaction", null, !0, !1); ["src", "href", "action"].forEach(function (attributeName) { new PropertyInfoRecord( attributeName, diff --git a/compiled/facebook-www/ReactFlightDOMRelayServer-prod.modern.js b/compiled/facebook-www/ReactFlightDOMRelayServer-prod.modern.js index e3b50ba46f5d4..7a0878bee561c 100644 --- a/compiled/facebook-www/ReactFlightDOMRelayServer-prod.modern.js +++ b/compiled/facebook-www/ReactFlightDOMRelayServer-prod.modern.js @@ -80,41 +80,16 @@ function PropertyInfoRecord( this.sanitizeURL = sanitizeURL; this.removeEmptyString = removeEmptyString; } -[ - ["acceptCharset", "accept-charset"], - ["className", "class"], - ["htmlFor", "for"], - ["httpEquiv", "http-equiv"] -].forEach(function (_ref) { - new PropertyInfoRecord(_ref[0], 1, !1, _ref[1], null, !1, !1); -}); ["contentEditable", "draggable", "spellCheck", "value"].forEach(function ( name ) { new PropertyInfoRecord(name, 2, !1, name.toLowerCase(), null, !1, !1); }); -[ - "autoReverse", - "externalResourcesRequired", - "focusable", - "preserveAlpha" -].forEach(function (name) { - new PropertyInfoRecord(name, 2, !1, name, null, !1, !1); -}); "allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope" .split(" ") .forEach(function (name) { new PropertyInfoRecord(name, 3, !1, name.toLowerCase(), null, !1, !1); }); -["checked", "multiple", "muted", "selected"].forEach(function (name) { - new PropertyInfoRecord(name, 3, !0, name, null, !1, !1); -}); -["capture", "download"].forEach(function (name) { - new PropertyInfoRecord(name, 4, !1, name, null, !1, !1); -}); -["cols", "rows", "size", "span"].forEach(function (name) { - new PropertyInfoRecord(name, 6, !1, name, null, !1, !1); -}); ["rowSpan", "start"].forEach(function (name) { new PropertyInfoRecord(name, 5, !1, name.toLowerCase(), null, !1, !1); }); @@ -125,34 +100,15 @@ function capitalize(token) { "accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering transform-origin underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height" .split(" ") .forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - new PropertyInfoRecord(name, 1, !1, attributeName, null, !1, !1); + attributeName.replace(CAMELIZE, capitalize); }); "xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type" .split(" ") .forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - new PropertyInfoRecord( - name, - 1, - !1, - attributeName, - "http://www.w3.org/1999/xlink", - !1, - !1 - ); + attributeName.replace(CAMELIZE, capitalize); }); ["xml:base", "xml:lang", "xml:space"].forEach(function (attributeName) { - var name = attributeName.replace(CAMELIZE, capitalize); - new PropertyInfoRecord( - name, - 1, - !1, - attributeName, - "http://www.w3.org/XML/1998/namespace", - !1, - !1 - ); + attributeName.replace(CAMELIZE, capitalize); }); ["tabIndex", "crossOrigin"].forEach(function (attributeName) { new PropertyInfoRecord( @@ -165,16 +121,6 @@ function capitalize(token) { !1 ); }); -new PropertyInfoRecord( - "xlinkHref", - 1, - !1, - "xlink:href", - "http://www.w3.org/1999/xlink", - !0, - !1 -); -new PropertyInfoRecord("formAction", 1, !1, "formaction", null, !0, !1); ["src", "href", "action"].forEach(function (attributeName) { new PropertyInfoRecord( attributeName,