Skip to content

Commit

Permalink
[Float] support fetchpriority on ReactDOM.preload() and `ReactDOM.p…
Browse files Browse the repository at this point in the history
…reinit()` (#26880)

exposes fetchPriority as an option for `ReactDOM.preload()` and
`ReactDOM.preinit()`

the typings should be `'high' | 'low' | 'auto'`

DiffTrain build for [042d8f6](042d8f6)
  • Loading branch information
gnoff committed Jun 1, 2023
1 parent d6f9de5 commit ee61e4a
Show file tree
Hide file tree
Showing 21 changed files with 128 additions and 80 deletions.
2 changes: 1 addition & 1 deletion compiled/facebook-www/REVISION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
811022232efed62a3c943701bc99d18655bc78b3
042d8f606ce643d2eca955badbf07ea5b8ac266c
2 changes: 1 addition & 1 deletion compiled/facebook-www/React-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-www-modern-a6d62651";
var ReactVersion = "18.3.0-www-modern-c2caceb8";

// ATTENTION
// When adding new symbols to this file,
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactART-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}

var ReactVersion = "18.3.0-www-classic-3fed7141";
var ReactVersion = "18.3.0-www-classic-173d7c2e";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down
2 changes: 1 addition & 1 deletion compiled/facebook-www/ReactART-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function _assertThisInitialized(self) {
return self;
}

var ReactVersion = "18.3.0-www-modern-a6d62651";
var ReactVersion = "18.3.0-www-modern-c2caceb8";

var LegacyRoot = 0;
var ConcurrentRoot = 1;
Expand Down
4 changes: 2 additions & 2 deletions compiled/facebook-www/ReactART-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -10193,7 +10193,7 @@ var slice = Array.prototype.slice,
return null;
},
bundleType: 0,
version: "18.3.0-www-classic-b3787f70",
version: "18.3.0-www-classic-808eab78",
rendererPackageName: "react-art"
};
var internals$jscomp$inline_1318 = {
Expand Down Expand Up @@ -10224,7 +10224,7 @@ var internals$jscomp$inline_1318 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-b3787f70"
reconcilerVersion: "18.3.0-www-classic-808eab78"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1319 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
11 changes: 7 additions & 4 deletions compiled/facebook-www/ReactDOM-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -34188,7 +34188,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-classic-c483cedc";
var ReactVersion = "18.3.0-www-classic-632e744f";

function createPortal$1(
children,
Expand Down Expand Up @@ -43845,7 +43845,8 @@ function preloadPropsFromPreloadOptions(href, as, options) {
as: as,
crossOrigin: as === "font" ? "" : options.crossOrigin,
integrity: options.integrity,
type: options.type
type: options.type,
fetchPriority: options.fetchPriority
};
}

Expand Down Expand Up @@ -43982,7 +43983,8 @@ function stylesheetPropsFromPreinitOptions(href, precedence, options) {
href: href,
"data-precedence": precedence,
crossOrigin: options.crossOrigin,
integrity: options.integrity
integrity: options.integrity,
fetchPriority: options.fetchPriority
};
}

Expand All @@ -43992,7 +43994,8 @@ function scriptPropsFromPreinitOptions(src, options) {
async: true,
crossOrigin: options.crossOrigin,
integrity: options.integrity,
nonce: options.nonce
nonce: options.nonce,
fetchPriority: options.fetchPriority
};
} // This function is called in begin work and we should always have a currentDocument set

Expand Down
11 changes: 7 additions & 4 deletions compiled/facebook-www/ReactDOM-dev.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -34033,7 +34033,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-www-modern-675a1233";
var ReactVersion = "18.3.0-www-modern-c632da18";

function createPortal$1(
children,
Expand Down Expand Up @@ -44355,7 +44355,8 @@ function preloadPropsFromPreloadOptions(href, as, options) {
as: as,
crossOrigin: as === "font" ? "" : options.crossOrigin,
integrity: options.integrity,
type: options.type
type: options.type,
fetchPriority: options.fetchPriority
};
}

Expand Down Expand Up @@ -44492,7 +44493,8 @@ function stylesheetPropsFromPreinitOptions(href, precedence, options) {
href: href,
"data-precedence": precedence,
crossOrigin: options.crossOrigin,
integrity: options.integrity
integrity: options.integrity,
fetchPriority: options.fetchPriority
};
}

Expand All @@ -44502,7 +44504,8 @@ function scriptPropsFromPreinitOptions(src, options) {
async: true,
crossOrigin: options.crossOrigin,
integrity: options.integrity,
nonce: options.nonce
nonce: options.nonce,
fetchPriority: options.fetchPriority
};
} // This function is called in begin work and we should always have a currentDocument set

Expand Down
15 changes: 9 additions & 6 deletions compiled/facebook-www/ReactDOM-prod.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -15314,7 +15314,8 @@ function preload$1(href, options) {
as: as,
crossOrigin: "font" === as ? "" : options.crossOrigin,
integrity: options.integrity,
type: options.type
type: options.type,
fetchPriority: options.fetchPriority
}),
preloadPropsMap.set(key, href),
null !== ownerDocument.querySelector(limitedEscapedHref) ||
Expand Down Expand Up @@ -15356,7 +15357,8 @@ function preinit$1(href, options) {
href: href,
"data-precedence": precedence,
crossOrigin: options.crossOrigin,
integrity: options.integrity
integrity: options.integrity,
fetchPriority: options.fetchPriority
};
(options = preloadPropsMap.get(key)) &&
adoptPreloadPropsForStylesheet(href, options);
Expand Down Expand Up @@ -15396,7 +15398,8 @@ function preinit$1(href, options) {
async: !0,
crossOrigin: options.crossOrigin,
integrity: options.integrity,
nonce: options.nonce
nonce: options.nonce,
fetchPriority: options.fetchPriority
}),
(options = preloadPropsMap.get(key)) &&
adoptPreloadPropsForScript(href, options),
Expand Down Expand Up @@ -16652,7 +16655,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1822 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-3fed7141",
version: "18.3.0-www-classic-173d7c2e",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2196 = {
Expand Down Expand Up @@ -16682,7 +16685,7 @@ var internals$jscomp$inline_2196 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-3fed7141"
reconcilerVersion: "18.3.0-www-classic-173d7c2e"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2197 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16925,4 +16928,4 @@ exports.unstable_renderSubtreeIntoContainer = function (
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-classic-3fed7141";
exports.version = "18.3.0-www-classic-173d7c2e";
15 changes: 9 additions & 6 deletions compiled/facebook-www/ReactDOM-prod.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -15542,7 +15542,8 @@ function preload$1(href, options) {
as: as,
crossOrigin: "font" === as ? "" : options.crossOrigin,
integrity: options.integrity,
type: options.type
type: options.type,
fetchPriority: options.fetchPriority
}),
preloadPropsMap.set(key, href),
null !== ownerDocument.querySelector(limitedEscapedHref) ||
Expand Down Expand Up @@ -15584,7 +15585,8 @@ function preinit$1(href, options) {
href: href,
"data-precedence": precedence,
crossOrigin: options.crossOrigin,
integrity: options.integrity
integrity: options.integrity,
fetchPriority: options.fetchPriority
};
(options = preloadPropsMap.get(key)) &&
adoptPreloadPropsForStylesheet(href, options);
Expand Down Expand Up @@ -15624,7 +15626,8 @@ function preinit$1(href, options) {
async: !0,
crossOrigin: options.crossOrigin,
integrity: options.integrity,
nonce: options.nonce
nonce: options.nonce,
fetchPriority: options.fetchPriority
}),
(options = preloadPropsMap.get(key)) &&
adoptPreloadPropsForScript(href, options),
Expand Down Expand Up @@ -16179,7 +16182,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1781 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-bef260c7",
version: "18.3.0-www-modern-dfc97c3e",
rendererPackageName: "react-dom"
};
var internals$jscomp$inline_2160 = {
Expand Down Expand Up @@ -16210,7 +16213,7 @@ var internals$jscomp$inline_2160 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-bef260c7"
reconcilerVersion: "18.3.0-www-modern-dfc97c3e"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_2161 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down Expand Up @@ -16381,4 +16384,4 @@ exports.unstable_createEventHandle = function (type, options) {
return eventHandle;
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-modern-bef260c7";
exports.version = "18.3.0-www-modern-dfc97c3e";
15 changes: 9 additions & 6 deletions compiled/facebook-www/ReactDOM-profiling.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -16089,7 +16089,8 @@ function preload$1(href, options) {
as: as,
crossOrigin: "font" === as ? "" : options.crossOrigin,
integrity: options.integrity,
type: options.type
type: options.type,
fetchPriority: options.fetchPriority
}),
preloadPropsMap.set(key, href),
null !== ownerDocument.querySelector(limitedEscapedHref) ||
Expand Down Expand Up @@ -16131,7 +16132,8 @@ function preinit$1(href, options) {
href: href,
"data-precedence": precedence,
crossOrigin: options.crossOrigin,
integrity: options.integrity
integrity: options.integrity,
fetchPriority: options.fetchPriority
};
(options = preloadPropsMap.get(key)) &&
adoptPreloadPropsForStylesheet(href, options);
Expand Down Expand Up @@ -16171,7 +16173,8 @@ function preinit$1(href, options) {
async: !0,
crossOrigin: options.crossOrigin,
integrity: options.integrity,
nonce: options.nonce
nonce: options.nonce,
fetchPriority: options.fetchPriority
}),
(options = preloadPropsMap.get(key)) &&
adoptPreloadPropsForScript(href, options),
Expand Down Expand Up @@ -17427,7 +17430,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1907 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-classic-b3787f70",
version: "18.3.0-www-classic-808eab78",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -17471,7 +17474,7 @@ var devToolsConfig$jscomp$inline_1907 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-classic-b3787f70"
reconcilerVersion: "18.3.0-www-classic-808eab78"
});
assign(Internals, {
ReactBrowserEventEmitter: {
Expand Down Expand Up @@ -17701,7 +17704,7 @@ exports.unstable_renderSubtreeIntoContainer = function (
);
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-classic-b3787f70";
exports.version = "18.3.0-www-classic-808eab78";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
15 changes: 9 additions & 6 deletions compiled/facebook-www/ReactDOM-profiling.modern.js
Original file line number Diff line number Diff line change
Expand Up @@ -16311,7 +16311,8 @@ function preload$1(href, options) {
as: as,
crossOrigin: "font" === as ? "" : options.crossOrigin,
integrity: options.integrity,
type: options.type
type: options.type,
fetchPriority: options.fetchPriority
}),
preloadPropsMap.set(key, href),
null !== ownerDocument.querySelector(limitedEscapedHref) ||
Expand Down Expand Up @@ -16353,7 +16354,8 @@ function preinit$1(href, options) {
href: href,
"data-precedence": precedence,
crossOrigin: options.crossOrigin,
integrity: options.integrity
integrity: options.integrity,
fetchPriority: options.fetchPriority
};
(options = preloadPropsMap.get(key)) &&
adoptPreloadPropsForStylesheet(href, options);
Expand Down Expand Up @@ -16393,7 +16395,8 @@ function preinit$1(href, options) {
async: !0,
crossOrigin: options.crossOrigin,
integrity: options.integrity,
nonce: options.nonce
nonce: options.nonce,
fetchPriority: options.fetchPriority
}),
(options = preloadPropsMap.get(key)) &&
adoptPreloadPropsForScript(href, options),
Expand Down Expand Up @@ -16948,7 +16951,7 @@ Internals.Events = [
var devToolsConfig$jscomp$inline_1866 = {
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 0,
version: "18.3.0-www-modern-c229356b",
version: "18.3.0-www-modern-e321cbd2",
rendererPackageName: "react-dom"
};
(function (internals) {
Expand Down Expand Up @@ -16993,7 +16996,7 @@ var devToolsConfig$jscomp$inline_1866 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-www-modern-c229356b"
reconcilerVersion: "18.3.0-www-modern-e321cbd2"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = function (children, container) {
Expand Down Expand Up @@ -17151,7 +17154,7 @@ exports.unstable_createEventHandle = function (type, options) {
return eventHandle;
};
exports.unstable_runWithPriority = runWithPriority;
exports.version = "18.3.0-www-modern-c229356b";
exports.version = "18.3.0-www-modern-e321cbd2";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
11 changes: 7 additions & 4 deletions compiled/facebook-www/ReactDOMServer-dev.classic.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ if (__DEV__) {
var React = require("react");
var ReactDOM = require("react-dom");

var ReactVersion = "18.3.0-www-classic-d2e90a0e";
var ReactVersion = "18.3.0-www-classic-77da47da";

// This refers to a WWW module.
var warningWWW = require("warning");
Expand Down Expand Up @@ -7565,7 +7565,8 @@ function preloadPropsFromPreloadOptions(href, as, options) {
href: href,
crossOrigin: as === "font" ? "" : options.crossOrigin,
integrity: options.integrity,
type: options.type
type: options.type,
fetchPriority: options.fetchPriority
};
}

Expand Down Expand Up @@ -7602,7 +7603,8 @@ function stylesheetPropsFromPreinitOptions(href, precedence, options) {
href: href,
"data-precedence": precedence,
crossOrigin: options.crossOrigin,
integrity: options.integrity
integrity: options.integrity,
fetchPriority: options.fetchPriority
};
}

Expand All @@ -7626,7 +7628,8 @@ function scriptPropsFromPreinitOptions(src, options) {
async: true,
crossOrigin: options.crossOrigin,
integrity: options.integrity,
nonce: options.nonce
nonce: options.nonce,
fetchPriority: options.fetchPriority
};
}

Expand Down
Loading

0 comments on commit ee61e4a

Please sign in to comment.