Skip to content

Commit

Permalink
Update vendored react (#46970)
Browse files Browse the repository at this point in the history
Update to latest next channel of react

mainly for facebook/react#26353

```
-  3706edb81 [Float][Fizz]: Don't preload nomodule scripts (#26353) (Josh Story)
-  2b003a5cc Split out ServerReferenceMetadata into Id and Bound Arguments (#26351) (Sebastian Markbåge)
-  62cd5af08 Codemod redundant async act scopes (#26350) (Andrew Clark)
-  037378202 Internal `act`: Call scope function after an async gap (#26347) (Andrew Clark)
-  d8e49f2af Use setTimeout to schedule work on the server in Edge environments (#26348) (Sebastian Markbåge)
-  83643778b Internal test helpers: Use Node's MessageChannel to queue task (#26345) (Andrew Clark)
-  f36ab0e37 Remove timers from ReactDOMSuspensePlaceholder tests (#26346) (Andrew Clark)
-  44d380794 Move internalAct to internal-test-utils package (#26344) (Andrew Clark)
-  8c100620c Build: specify Node.js 16 as minimum for dev (#26343) (Jan Kassens)
-  d81447304 [Internal API only] Delete non-awaited form of act (#26339) (Andrew Clark)
-  702fc984e Codemod act -> await act (4/?) (#26338) (Andrew Clark)
-  9fb2469a6 Restore definition of NativeMethods as an object for React Native (#26341) (Rubén Norte)
-  aef930314 [DevTools] upgrade electron to latest version & security improvements (#26337) (Mengdi Chen)
-  161f6ae42 Codemod act -> await act (3/?) (#26336) (Andrew Clark)
-  58605f798 Codemod act -> await act (2/?) (#26335) (Andrew Clark)
```
  • Loading branch information
huozhi authored Mar 9, 2023
1 parent 36ca159 commit 1e7f4a5
Show file tree
Hide file tree
Showing 41 changed files with 319 additions and 259 deletions.
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@
"random-seed": "0.3.0",
"react": "18.2.0",
"react-17": "npm:react@17.0.2",
"react-builtin": "npm:react@18.3.0-next-703c67560-20230307",
"react-builtin": "npm:react@18.3.0-next-3706edb81-20230308",
"react-dom": "18.2.0",
"react-dom-17": "npm:react-dom@17.0.2",
"react-dom-builtin": "npm:react-dom@18.3.0-next-703c67560-20230307",
"react-server-dom-webpack": "18.3.0-next-703c67560-20230307",
"react-dom-builtin": "npm:react-dom@18.3.0-next-3706edb81-20230308",
"react-server-dom-webpack": "18.3.0-next-3706edb81-20230308",
"react-ssr-prepass": "1.0.8",
"react-virtualized": "9.22.3",
"relay-compiler": "13.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if (process.env.NODE_ENV !== "production") {
var React = require('react');
var ReactDOM = require('react-dom');

var ReactVersion = '18.3.0-next-703c67560-20230307';
var ReactVersion = '18.3.0-next-3706edb81-20230308';

var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

Expand Down Expand Up @@ -3473,28 +3473,31 @@ function pushScript(target, props, resources, textEmbedded, insertionMode, noscr
var key = getResourceKey('script', src);

if (props.async !== true || props.onLoad || props.onError) {
// We can't resourcify scripts with load listeners. To avoid ambiguity with
// other Resourcified async scripts on the server we omit them from the server
// stream and expect them to be inserted during hydration on the client.
// We can still preload them however so the client can start fetching the script
// as soon as possible
var resource = resources.preloadsMap.get(key);
// we don't want to preload nomodule scripts
if (props.noModule !== true) {
// We can't resourcify scripts with load listeners. To avoid ambiguity with
// other Resourcified async scripts on the server we omit them from the server
// stream and expect them to be inserted during hydration on the client.
// We can still preload them however so the client can start fetching the script
// as soon as possible
var resource = resources.preloadsMap.get(key);

if (!resource) {
resource = {
type: 'preload',
chunks: [],
state: NoState,
props: preloadAsScriptPropsFromProps(props.src, props)
};
resources.preloadsMap.set(key, resource);
if (!resource) {
resource = {
type: 'preload',
chunks: [],
state: NoState,
props: preloadAsScriptPropsFromProps(props.src, props)
};
resources.preloadsMap.set(key, resource);

{
markAsImplicitResourceDEV(resource, props, resource.props);
}
{
markAsImplicitResourceDEV(resource, props, resource.props);
}

resources.usedScripts.add(resource);
pushLinkImpl(resource.chunks, resource.props);
resources.usedScripts.add(resource);
pushLinkImpl(resource.chunks, resource.props);
}
}

if (props.async !== true) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var React = require('react');
var ReactDOM = require('react-dom');
var stream = require('stream');

var ReactVersion = '18.3.0-next-703c67560-20230307';
var ReactVersion = '18.3.0-next-3706edb81-20230308';

var ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;

Expand Down Expand Up @@ -3480,28 +3480,31 @@ function pushScript(target, props, resources, textEmbedded, insertionMode, noscr
var key = getResourceKey('script', src);

if (props.async !== true || props.onLoad || props.onError) {
// We can't resourcify scripts with load listeners. To avoid ambiguity with
// other Resourcified async scripts on the server we omit them from the server
// stream and expect them to be inserted during hydration on the client.
// We can still preload them however so the client can start fetching the script
// as soon as possible
var resource = resources.preloadsMap.get(key);
// we don't want to preload nomodule scripts
if (props.noModule !== true) {
// We can't resourcify scripts with load listeners. To avoid ambiguity with
// other Resourcified async scripts on the server we omit them from the server
// stream and expect them to be inserted during hydration on the client.
// We can still preload them however so the client can start fetching the script
// as soon as possible
var resource = resources.preloadsMap.get(key);

if (!resource) {
resource = {
type: 'preload',
chunks: [],
state: NoState,
props: preloadAsScriptPropsFromProps(props.src, props)
};
resources.preloadsMap.set(key, resource);
if (!resource) {
resource = {
type: 'preload',
chunks: [],
state: NoState,
props: preloadAsScriptPropsFromProps(props.src, props)
};
resources.preloadsMap.set(key, resource);

{
markAsImplicitResourceDEV(resource, props, resource.props);
}
{
markAsImplicitResourceDEV(resource, props, resource.props);
}

resources.usedScripts.add(resource);
pushLinkImpl(resource.chunks, resource.props);
resources.usedScripts.add(resource);
pushLinkImpl(resource.chunks, resource.props);
}
}

if (props.async !== true) {
Expand Down
Loading

0 comments on commit 1e7f4a5

Please sign in to comment.